--- a/src/eric7/MicroPython/Devices/CircuitPythonDevices.py Tue May 06 11:09:21 2025 +0200 +++ b/src/eric7/MicroPython/Devices/CircuitPythonDevices.py Tue May 06 15:32:29 2025 +0200 @@ -806,10 +806,10 @@ 'connected': r.ipv4_address is not None, 'mac': binascii.hexlify(r.mac_address, ':').decode(), 'ifconfig': ( - str(r.ipv4_address) if r.ipv4_address else'0.0.0.0', - str(r.ipv4_subnet) if r.ipv4_subnet else'0.0.0.0', - str(r.ipv4_gateway) if r.ipv4_gateway else'0.0.0.0', - str(r.ipv4_dns) if r.ipv4_dns else'0.0.0.0', + str(r.ipv4_address) if r.ipv4_address else '0.0.0.0', + str(r.ipv4_subnet) if r.ipv4_subnet else '0.0.0.0', + str(r.ipv4_gateway) if r.ipv4_gateway else '0.0.0.0', + str(r.ipv4_dns) if r.ipv4_dns else '0.0.0.0', ), 'ipv6_addr': [], } @@ -821,7 +821,7 @@ if r.ap_info is not None: station.update({ 'ap_ssid': r.ap_info.ssid, - 'ap_bssid': binascii.hexlify(r.ap_info.bssid, ':'), + 'ap_bssid': binascii.hexlify(r.ap_info.bssid, ':').decode(), 'ap_rssi': r.ap_info.rssi, 'ap_channel': r.ap_info.channel, 'ap_country': r.ap_info.country, @@ -885,7 +885,7 @@ return station, ap, overall - def connectWifi(self, ssid, password, hostname): + def connectWifi(self, ssid, password, hostname, country=""): # noqa: U-100 """ Public method to connect a device to a WiFi network. @@ -895,6 +895,8 @@ @type str @param hostname host name of the device @type str + @param country WiFi country code + @type str @return tuple containing the connection status and an error string @rtype tuple of (bool, str) """