300 @param withIP flag indicating to start the access point with an IP configuration |
300 @param withIP flag indicating to start the access point with an IP configuration |
301 @type bool |
301 @type bool |
302 """ |
302 """ |
303 from .WifiApConfigDialog import WifiApConfigDialog |
303 from .WifiApConfigDialog import WifiApConfigDialog |
304 |
304 |
305 dlg = WifiApConfigDialog(withIP=withIP, parent=self.__mpy) |
305 securityModes = self.__mpy.getDevice().getSecurityModes() |
|
306 dlg = WifiApConfigDialog( |
|
307 withIP=withIP, securityModes=securityModes, parent=self.__mpy |
|
308 ) |
306 if dlg.exec() == QDialog.DialogCode.Accepted: |
309 if dlg.exec() == QDialog.DialogCode.Accepted: |
307 ssid, password, security, hostname, ifconfig = dlg.getApConfig() |
310 ssid, password, securityMode, hostname, ifconfig = dlg.getApConfig() |
308 |
311 |
309 ok, err = self.__mpy.getDevice().startAccessPoint( |
312 ok, err = self.__mpy.getDevice().startAccessPoint( |
310 ssid, |
313 ssid, |
311 security=security, |
314 security=securityMode, |
312 password=password, |
315 password=password, |
313 hostname=hostname, |
316 hostname=hostname, |
314 ifconfig=ifconfig if withIP else None, |
317 ifconfig=ifconfig if withIP else None, |
315 ) |
318 ) |
316 if ok: |
319 if ok: |