src/eric7/Documentation/Source/eric7.MicroPython.Devices.RP2040Devices.html

branch
eric7
changeset 10153
ffe7432f716b
parent 10144
45a9177c8e77
child 10479
856476537696
equal deleted inserted replaced
10152:33e7b9d3f91c 10153:ffe7432f716b
78 <tr> 78 <tr>
79 <td><a href="#RP2040Device.__flashPython">__flashPython</a></td> 79 <td><a href="#RP2040Device.__flashPython">__flashPython</a></td>
80 <td>Private slot to flash a MicroPython firmware to the device.</td> 80 <td>Private slot to flash a MicroPython firmware to the device.</td>
81 </tr> 81 </tr>
82 <tr> 82 <tr>
83 <td><a href="#RP2040Device.__resetCountry">__resetCountry</a></td>
84 <td>Private slot to reset the country of the connected ESP32 device.</td>
85 </tr>
86 <tr>
83 <td><a href="#RP2040Device.__resetDevice">__resetDevice</a></td> 87 <td><a href="#RP2040Device.__resetDevice">__resetDevice</a></td>
84 <td>Private slot to reset the connected device.</td> 88 <td>Private slot to reset the connected device.</td>
85 </tr> 89 </tr>
86 <tr> 90 <tr>
87 <td><a href="#RP2040Device.__setCountry">__setCountry</a></td> 91 <td><a href="#RP2040Device.__setCountry">__setCountry</a></td>
220 <td>Public method to check the availability of network time functions.</td> 224 <td>Public method to check the availability of network time functions.</td>
221 </tr> 225 </tr>
222 <tr> 226 <tr>
223 <td><a href="#RP2040Device.hasWifi">hasWifi</a></td> 227 <td><a href="#RP2040Device.hasWifi">hasWifi</a></td>
224 <td>Public method to check the availability of WiFi.</td> 228 <td>Public method to check the availability of WiFi.</td>
229 </tr>
230 <tr>
231 <td><a href="#RP2040Device.hasWifiCountry">hasWifiCountry</a></td>
232 <td>Public method to check, if the device has support to set the WiFi country.</td>
225 </tr> 233 </tr>
226 <tr> 234 <tr>
227 <td><a href="#RP2040Device.isLanConnected">isLanConnected</a></td> 235 <td><a href="#RP2040Device.isLanConnected">isLanConnected</a></td>
228 <td>Public method to check the LAN connection status.</td> 236 <td>Public method to check the LAN connection status.</td>
229 </tr> 237 </tr>
337 <b>__flashPython</b>(<i></i>) 345 <b>__flashPython</b>(<i></i>)
338 346
339 <p> 347 <p>
340 Private slot to flash a MicroPython firmware to the device. 348 Private slot to flash a MicroPython firmware to the device.
341 </p> 349 </p>
350 <a NAME="RP2040Device.__resetCountry" ID="RP2040Device.__resetCountry"></a>
351 <h4>RP2040Device.__resetCountry</h4>
352 <b>__resetCountry</b>(<i></i>)
353
354 <p>
355 Private slot to reset the country of the connected ESP32 device.
356 </p>
357 <p>
358 The country is the two-letter ISO 3166-1 Alpha-2 country code. This method
359 resets it to the default code 'XX' representing the "worldwide" region.
360 </p>
342 <a NAME="RP2040Device.__resetDevice" ID="RP2040Device.__resetDevice"></a> 361 <a NAME="RP2040Device.__resetDevice" ID="RP2040Device.__resetDevice"></a>
343 <h4>RP2040Device.__resetDevice</h4> 362 <h4>RP2040Device.__resetDevice</h4>
344 <b>__resetDevice</b>(<i></i>) 363 <b>__resetDevice</b>(<i></i>)
345 364
346 <p> 365 <p>
352 371
353 <p> 372 <p>
354 Private slot to configure the country of the connected RP2040 device. 373 Private slot to configure the country of the connected RP2040 device.
355 </p> 374 </p>
356 <p> 375 <p>
357 The country is the two letter country code. 376 The country is the two-letter ISO 3166-1 Alpha-2 country code.
358 </p> 377 </p>
359 <a NAME="RP2040Device.__showFirmwareVersions" ID="RP2040Device.__showFirmwareVersions"></a> 378 <a NAME="RP2040Device.__showFirmwareVersions" ID="RP2040Device.__showFirmwareVersions"></a>
360 <h4>RP2040Device.__showFirmwareVersions</h4> 379 <h4>RP2040Device.__showFirmwareVersions</h4>
361 <b>__showFirmwareVersions</b>(<i></i>) 380 <b>__showFirmwareVersions</b>(<i></i>)
362 381
559 tuple of (bool, str) 578 tuple of (bool, str)
560 </dd> 579 </dd>
561 </dl> 580 </dl>
562 <a NAME="RP2040Device.connectToLan" ID="RP2040Device.connectToLan"></a> 581 <a NAME="RP2040Device.connectToLan" ID="RP2040Device.connectToLan"></a>
563 <h4>RP2040Device.connectToLan</h4> 582 <h4>RP2040Device.connectToLan</h4>
564 <b>connectToLan</b>(<i>config</i>) 583 <b>connectToLan</b>(<i>config, hostname</i>)
565 584
566 <p> 585 <p>
567 Public method to connect the connected device to the LAN. 586 Public method to connect the connected device to the LAN.
568 </p> 587 </p>
569 <dl> 588 <dl>
571 <dt><i>config</i> (str or tuple of (str, str, str, str))</dt> 590 <dt><i>config</i> (str or tuple of (str, str, str, str))</dt>
572 <dd> 591 <dd>
573 configuration for the connection (either the string 'dhcp' 592 configuration for the connection (either the string 'dhcp'
574 for a dynamic address or a tuple of four strings with the IPv4 parameters. 593 for a dynamic address or a tuple of four strings with the IPv4 parameters.
575 </dd> 594 </dd>
595 <dt><i>hostname</i> (str)</dt>
596 <dd>
597 host name of the device
598 </dd>
576 </dl> 599 </dl>
577 <dl> 600 <dl>
578 <dt>Return:</dt> 601 <dt>Return:</dt>
579 <dd> 602 <dd>
580 tuple containing a flag indicating success and an error message 603 tuple containing a flag indicating success and an error message
586 tuple of (bool, str) 609 tuple of (bool, str)
587 </dd> 610 </dd>
588 </dl> 611 </dl>
589 <a NAME="RP2040Device.connectWifi" ID="RP2040Device.connectWifi"></a> 612 <a NAME="RP2040Device.connectWifi" ID="RP2040Device.connectWifi"></a>
590 <h4>RP2040Device.connectWifi</h4> 613 <h4>RP2040Device.connectWifi</h4>
591 <b>connectWifi</b>(<i>ssid, password</i>) 614 <b>connectWifi</b>(<i>ssid, password, hostname</i>)
592 615
593 <p> 616 <p>
594 Public method to connect a device to a WiFi network. 617 Public method to connect a device to a WiFi network.
595 </p> 618 </p>
596 <dl> 619 <dl>
600 name (SSID) of the WiFi network 623 name (SSID) of the WiFi network
601 </dd> 624 </dd>
602 <dt><i>password</i> (str)</dt> 625 <dt><i>password</i> (str)</dt>
603 <dd> 626 <dd>
604 password needed to connect 627 password needed to connect
628 </dd>
629 <dt><i>hostname</i> (str)</dt>
630 <dd>
631 host name of the device
605 </dd> 632 </dd>
606 </dl> 633 </dl>
607 <dl> 634 <dl>
608 <dt>Return:</dt> 635 <dt>Return:</dt>
609 <dd> 636 <dd>
1110 <dt>Raises <b>OSError</b>:</dt> 1137 <dt>Raises <b>OSError</b>:</dt>
1111 <dd> 1138 <dd>
1112 raised to indicate an issue with the device 1139 raised to indicate an issue with the device
1113 </dd> 1140 </dd>
1114 </dl> 1141 </dl>
1142 <a NAME="RP2040Device.hasWifiCountry" ID="RP2040Device.hasWifiCountry"></a>
1143 <h4>RP2040Device.hasWifiCountry</h4>
1144 <b>hasWifiCountry</b>(<i></i>)
1145
1146 <p>
1147 Public method to check, if the device has support to set the WiFi country.
1148 </p>
1149 <dl>
1150 <dt>Return:</dt>
1151 <dd>
1152 flag indicating the support of WiFi country
1153 </dd>
1154 </dl>
1155 <dl>
1156 <dt>Return Type:</dt>
1157 <dd>
1158 bool
1159 </dd>
1160 </dl>
1115 <a NAME="RP2040Device.isLanConnected" ID="RP2040Device.isLanConnected"></a> 1161 <a NAME="RP2040Device.isLanConnected" ID="RP2040Device.isLanConnected"></a>
1116 <h4>RP2040Device.isLanConnected</h4> 1162 <h4>RP2040Device.isLanConnected</h4>
1117 <b>isLanConnected</b>(<i></i>) 1163 <b>isLanConnected</b>(<i></i>)
1118 1164
1119 <p> 1165 <p>
1288 tuple of (bool, str) 1334 tuple of (bool, str)
1289 </dd> 1335 </dd>
1290 </dl> 1336 </dl>
1291 <a NAME="RP2040Device.startAccessPoint" ID="RP2040Device.startAccessPoint"></a> 1337 <a NAME="RP2040Device.startAccessPoint" ID="RP2040Device.startAccessPoint"></a>
1292 <h4>RP2040Device.startAccessPoint</h4> 1338 <h4>RP2040Device.startAccessPoint</h4>
1293 <b>startAccessPoint</b>(<i>ssid, security=None, password=None, ifconfig=None</i>) 1339 <b>startAccessPoint</b>(<i>ssid, security=None, password=None, hostname=None, ifconfig=None, </i>)
1294 1340
1295 <p> 1341 <p>
1296 Public method to start the access point interface. 1342 Public method to start the access point interface.
1297 </p> 1343 </p>
1298 <dl> 1344 <dl>
1306 security method (defaults to None) 1352 security method (defaults to None)
1307 </dd> 1353 </dd>
1308 <dt><i>password</i> (str (optional))</dt> 1354 <dt><i>password</i> (str (optional))</dt>
1309 <dd> 1355 <dd>
1310 password (defaults to None) 1356 password (defaults to None)
1357 </dd>
1358 <dt><i>hostname</i> (str (optional))</dt>
1359 <dd>
1360 host name of the device (defaults to None)
1311 </dd> 1361 </dd>
1312 <dt><i>ifconfig</i> (tuple of (str, str, str, str))</dt> 1362 <dt><i>ifconfig</i> (tuple of (str, str, str, str))</dt>
1313 <dd> 1363 <dd>
1314 IPv4 configuration for the access point if not default 1364 IPv4 configuration for the access point if not default
1315 (IPv4 address, netmask, gateway address, DNS server address) 1365 (IPv4 address, netmask, gateway address, DNS server address)
1346 tuple of (bool, str) 1396 tuple of (bool, str)
1347 </dd> 1397 </dd>
1348 </dl> 1398 </dl>
1349 <a NAME="RP2040Device.writeCredentials" ID="RP2040Device.writeCredentials"></a> 1399 <a NAME="RP2040Device.writeCredentials" ID="RP2040Device.writeCredentials"></a>
1350 <h4>RP2040Device.writeCredentials</h4> 1400 <h4>RP2040Device.writeCredentials</h4>
1351 <b>writeCredentials</b>(<i>ssid, password</i>) 1401 <b>writeCredentials</b>(<i>ssid, password, hostname, country</i>)
1352 1402
1353 <p> 1403 <p>
1354 Public method to write the given credentials to the connected device and modify 1404 Public method to write the given credentials to the connected device and modify
1355 the start script to connect automatically. 1405 the start script to connect automatically.
1356 </p> 1406 </p>
1362 </dd> 1412 </dd>
1363 <dt><i>password</i> (str)</dt> 1413 <dt><i>password</i> (str)</dt>
1364 <dd> 1414 <dd>
1365 password needed to authenticate 1415 password needed to authenticate
1366 </dd> 1416 </dd>
1417 <dt><i>hostname</i> (str)</dt>
1418 <dd>
1419 host name of the device
1420 </dd>
1421 <dt><i>country</i> (str)</dt>
1422 <dd>
1423 WiFi country code
1424 </dd>
1367 </dl> 1425 </dl>
1368 <dl> 1426 <dl>
1369 <dt>Return:</dt> 1427 <dt>Return:</dt>
1370 <dd> 1428 <dd>
1371 tuple containing a flag indicating success and an error message 1429 tuple containing a flag indicating success and an error message
1377 tuple of (bool, str) 1435 tuple of (bool, str)
1378 </dd> 1436 </dd>
1379 </dl> 1437 </dl>
1380 <a NAME="RP2040Device.writeLanAutoConnect" ID="RP2040Device.writeLanAutoConnect"></a> 1438 <a NAME="RP2040Device.writeLanAutoConnect" ID="RP2040Device.writeLanAutoConnect"></a>
1381 <h4>RP2040Device.writeLanAutoConnect</h4> 1439 <h4>RP2040Device.writeLanAutoConnect</h4>
1382 <b>writeLanAutoConnect</b>(<i>config</i>) 1440 <b>writeLanAutoConnect</b>(<i>config, hostname</i>)
1383 1441
1384 <p> 1442 <p>
1385 Public method to generate a script and associated configuration to connect the 1443 Public method to generate a script and associated configuration to connect the
1386 device to the LAN during boot time. 1444 device to the LAN during boot time.
1387 </p> 1445 </p>
1389 1447
1390 <dt><i>config</i> (str or tuple of (str, str, str, str))</dt> 1448 <dt><i>config</i> (str or tuple of (str, str, str, str))</dt>
1391 <dd> 1449 <dd>
1392 configuration for the connection (either the string 'dhcp' 1450 configuration for the connection (either the string 'dhcp'
1393 for a dynamic address or a tuple of four strings with the IPv4 parameters. 1451 for a dynamic address or a tuple of four strings with the IPv4 parameters.
1452 </dd>
1453 <dt><i>hostname</i> (str)</dt>
1454 <dd>
1455 host name of the device
1394 </dd> 1456 </dd>
1395 </dl> 1457 </dl>
1396 <dl> 1458 <dl>
1397 <dt>Return:</dt> 1459 <dt>Return:</dt>
1398 <dd> 1460 <dd>

eric ide

mercurial