10478:de9106c55c3d | 10479:856476537696 |
---|---|
5 <link rel="stylesheet" href="styles.css"> | 5 <link rel="stylesheet" href="styles.css"> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <a NAME="top" ID="top"></a> | 8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.MicroPython.Devices.EspDevices</h1> | 9 <h1>eric7.MicroPython.Devices.EspDevices</h1> |
10 | |
11 <p> | 10 <p> |
12 Module implementing the device interface class for ESP32 and ESP8266 based | 11 Module implementing the device interface class for ESP32 and ESP8266 based |
13 boards. | 12 boards. |
14 </p> | 13 </p> |
14 | |
15 <h3>Global Attributes</h3> | 15 <h3>Global Attributes</h3> |
16 | |
17 <table> | 16 <table> |
18 <tr><td>None</td></tr> | 17 <tr><td>None</td></tr> |
19 </table> | 18 </table> |
19 | |
20 <h3>Classes</h3> | 20 <h3>Classes</h3> |
21 | |
22 <table> | 21 <table> |
23 | |
24 <tr> | 22 <tr> |
25 <td><a href="#EspDevice">EspDevice</a></td> | 23 <td><a href="#EspDevice">EspDevice</a></td> |
26 <td>Class implementing the device for ESP32 and ESP8266 based boards.</td> | 24 <td>Class implementing the device for ESP32 and ESP8266 based boards.</td> |
27 </tr> | 25 </tr> |
28 </table> | 26 </table> |
27 | |
29 <h3>Functions</h3> | 28 <h3>Functions</h3> |
30 | |
31 <table> | 29 <table> |
32 | |
33 <tr> | 30 <tr> |
34 <td><a href="#createDevice">createDevice</a></td> | 31 <td><a href="#createDevice">createDevice</a></td> |
35 <td>Function to instantiate a MicroPython device object.</td> | 32 <td>Function to instantiate a MicroPython device object.</td> |
36 </tr> | 33 </tr> |
37 <tr> | 34 <tr> |
45 <tr> | 42 <tr> |
46 <td><a href="#flashPythonFirmware">flashPythonFirmware</a></td> | 43 <td><a href="#flashPythonFirmware">flashPythonFirmware</a></td> |
47 <td>Slot to flash a MicroPython firmware to the device.</td> | 44 <td>Slot to flash a MicroPython firmware to the device.</td> |
48 </tr> | 45 </tr> |
49 </table> | 46 </table> |
47 | |
50 <hr /> | 48 <hr /> |
51 <hr /> | 49 <hr /> |
52 <a NAME="EspDevice" ID="EspDevice"></a> | 50 <a NAME="EspDevice" ID="EspDevice"></a> |
53 <h2>EspDevice</h2> | 51 <h2>EspDevice</h2> |
54 | |
55 <p> | 52 <p> |
56 Class implementing the device for ESP32 and ESP8266 based boards. | 53 Class implementing the device for ESP32 and ESP8266 based boards. |
57 </p> | 54 </p> |
55 | |
58 <h3>Derived from</h3> | 56 <h3>Derived from</h3> |
59 BaseDevice | 57 BaseDevice |
60 <h3>Class Attributes</h3> | 58 <h3>Class Attributes</h3> |
61 | |
62 <table> | 59 <table> |
63 <tr><td>None</td></tr> | 60 <tr><td>None</td></tr> |
64 </table> | 61 </table> |
62 | |
65 <h3>Class Methods</h3> | 63 <h3>Class Methods</h3> |
66 | |
67 <table> | 64 <table> |
68 <tr><td>None</td></tr> | 65 <tr><td>None</td></tr> |
69 </table> | 66 </table> |
67 | |
70 <h3>Methods</h3> | 68 <h3>Methods</h3> |
71 | |
72 <table> | 69 <table> |
73 | |
74 <tr> | 70 <tr> |
75 <td><a href="#EspDevice.__init__">EspDevice</a></td> | 71 <td><a href="#EspDevice.__init__">EspDevice</a></td> |
76 <td>Constructor</td> | 72 <td>Constructor</td> |
77 </tr> | 73 </tr> |
78 <tr> | 74 <tr> |
294 <tr> | 290 <tr> |
295 <td><a href="#EspDevice.writeCredentials">writeCredentials</a></td> | 291 <td><a href="#EspDevice.writeCredentials">writeCredentials</a></td> |
296 <td>Public method to write the given credentials to the connected device and modify the start script to connect automatically.</td> | 292 <td>Public method to write the given credentials to the connected device and modify the start script to connect automatically.</td> |
297 </tr> | 293 </tr> |
298 </table> | 294 </table> |
295 | |
299 <h3>Static Methods</h3> | 296 <h3>Static Methods</h3> |
300 | |
301 <table> | 297 <table> |
302 <tr><td>None</td></tr> | 298 <tr><td>None</td></tr> |
303 </table> | 299 </table> |
304 | 300 |
301 | |
305 <a NAME="EspDevice.__init__" ID="EspDevice.__init__"></a> | 302 <a NAME="EspDevice.__init__" ID="EspDevice.__init__"></a> |
306 <h4>EspDevice (Constructor)</h4> | 303 <h4>EspDevice (Constructor)</h4> |
307 <b>EspDevice</b>(<i>microPythonWidget, deviceType, parent=None</i>) | 304 <b>EspDevice</b>(<i>microPythonWidget, deviceType, parent=None</i>) |
308 | |
309 <p> | 305 <p> |
310 Constructor | 306 Constructor |
311 </p> | 307 </p> |
308 | |
312 <dl> | 309 <dl> |
313 | 310 |
314 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> | 311 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> |
315 <dd> | 312 <dd> |
316 reference to the main MicroPython widget | 313 reference to the main MicroPython widget |
325 </dd> | 322 </dd> |
326 </dl> | 323 </dl> |
327 <a NAME="EspDevice.__backupFlash" ID="EspDevice.__backupFlash"></a> | 324 <a NAME="EspDevice.__backupFlash" ID="EspDevice.__backupFlash"></a> |
328 <h4>EspDevice.__backupFlash</h4> | 325 <h4>EspDevice.__backupFlash</h4> |
329 <b>__backupFlash</b>(<i></i>) | 326 <b>__backupFlash</b>(<i></i>) |
330 | |
331 <p> | 327 <p> |
332 Private slot to backup the currently flashed firmware. | 328 Private slot to backup the currently flashed firmware. |
333 </p> | 329 </p> |
330 | |
334 <a NAME="EspDevice.__createCpyDevice" ID="EspDevice.__createCpyDevice"></a> | 331 <a NAME="EspDevice.__createCpyDevice" ID="EspDevice.__createCpyDevice"></a> |
335 <h4>EspDevice.__createCpyDevice</h4> | 332 <h4>EspDevice.__createCpyDevice</h4> |
336 <b>__createCpyDevice</b>(<i></i>) | 333 <b>__createCpyDevice</b>(<i></i>) |
337 | |
338 <p> | 334 <p> |
339 Private method to create a CircuitPython device interface. | 335 Private method to create a CircuitPython device interface. |
340 </p> | 336 </p> |
337 | |
341 <a NAME="EspDevice.__createEsp32Submenu" ID="EspDevice.__createEsp32Submenu"></a> | 338 <a NAME="EspDevice.__createEsp32Submenu" ID="EspDevice.__createEsp32Submenu"></a> |
342 <h4>EspDevice.__createEsp32Submenu</h4> | 339 <h4>EspDevice.__createEsp32Submenu</h4> |
343 <b>__createEsp32Submenu</b>(<i></i>) | 340 <b>__createEsp32Submenu</b>(<i></i>) |
344 | |
345 <p> | 341 <p> |
346 Private method to create the ESP32 submenu. | 342 Private method to create the ESP32 submenu. |
347 </p> | 343 </p> |
344 | |
348 <a NAME="EspDevice.__eraseFlash" ID="EspDevice.__eraseFlash"></a> | 345 <a NAME="EspDevice.__eraseFlash" ID="EspDevice.__eraseFlash"></a> |
349 <h4>EspDevice.__eraseFlash</h4> | 346 <h4>EspDevice.__eraseFlash</h4> |
350 <b>__eraseFlash</b>(<i></i>) | 347 <b>__eraseFlash</b>(<i></i>) |
351 | |
352 <p> | 348 <p> |
353 Private slot to erase the device flash memory. | 349 Private slot to erase the device flash memory. |
354 </p> | 350 </p> |
351 | |
355 <a NAME="EspDevice.__firmwareVersionResponse" ID="EspDevice.__firmwareVersionResponse"></a> | 352 <a NAME="EspDevice.__firmwareVersionResponse" ID="EspDevice.__firmwareVersionResponse"></a> |
356 <h4>EspDevice.__firmwareVersionResponse</h4> | 353 <h4>EspDevice.__firmwareVersionResponse</h4> |
357 <b>__firmwareVersionResponse</b>(<i>reply</i>) | 354 <b>__firmwareVersionResponse</b>(<i>reply</i>) |
358 | |
359 <p> | 355 <p> |
360 Private slot handling the response of the latest version request. | 356 Private slot handling the response of the latest version request. |
361 </p> | 357 </p> |
358 | |
362 <dl> | 359 <dl> |
363 | 360 |
364 <dt><i>reply</i> (QNetworkReply)</dt> | 361 <dt><i>reply</i> (QNetworkReply)</dt> |
365 <dd> | 362 <dd> |
366 reference to the reply object | 363 reference to the reply object |
367 </dd> | 364 </dd> |
368 </dl> | 365 </dl> |
369 <a NAME="EspDevice.__flashAddons" ID="EspDevice.__flashAddons"></a> | 366 <a NAME="EspDevice.__flashAddons" ID="EspDevice.__flashAddons"></a> |
370 <h4>EspDevice.__flashAddons</h4> | 367 <h4>EspDevice.__flashAddons</h4> |
371 <b>__flashAddons</b>(<i></i>) | 368 <b>__flashAddons</b>(<i></i>) |
372 | |
373 <p> | 369 <p> |
374 Private slot to flash some additional firmware images. | 370 Private slot to flash some additional firmware images. |
375 </p> | 371 </p> |
372 | |
376 <a NAME="EspDevice.__flashMicroPython" ID="EspDevice.__flashMicroPython"></a> | 373 <a NAME="EspDevice.__flashMicroPython" ID="EspDevice.__flashMicroPython"></a> |
377 <h4>EspDevice.__flashMicroPython</h4> | 374 <h4>EspDevice.__flashMicroPython</h4> |
378 <b>__flashMicroPython</b>(<i></i>) | 375 <b>__flashMicroPython</b>(<i></i>) |
379 | |
380 <p> | 376 <p> |
381 Private slot to flash a MicroPython firmware to the device. | 377 Private slot to flash a MicroPython firmware to the device. |
382 </p> | 378 </p> |
379 | |
383 <a NAME="EspDevice.__installEspTool" ID="EspDevice.__installEspTool"></a> | 380 <a NAME="EspDevice.__installEspTool" ID="EspDevice.__installEspTool"></a> |
384 <h4>EspDevice.__installEspTool</h4> | 381 <h4>EspDevice.__installEspTool</h4> |
385 <b>__installEspTool</b>(<i></i>) | 382 <b>__installEspTool</b>(<i></i>) |
386 | |
387 <p> | 383 <p> |
388 Private slot to install the esptool package via pip. | 384 Private slot to install the esptool package via pip. |
389 </p> | 385 </p> |
386 | |
390 <a NAME="EspDevice.__resetCountry" ID="EspDevice.__resetCountry"></a> | 387 <a NAME="EspDevice.__resetCountry" ID="EspDevice.__resetCountry"></a> |
391 <h4>EspDevice.__resetCountry</h4> | 388 <h4>EspDevice.__resetCountry</h4> |
392 <b>__resetCountry</b>(<i></i>) | 389 <b>__resetCountry</b>(<i></i>) |
393 | |
394 <p> | 390 <p> |
395 Private slot to reset the country of the connected ESP32 device. | 391 Private slot to reset the country of the connected ESP32 device. |
396 </p> | 392 </p> |
397 <p> | 393 <p> |
398 The country is the two-letter ISO 3166-1 Alpha-2 country code. This method | 394 The country is the two-letter ISO 3166-1 Alpha-2 country code. This method |
399 resets it to the default code 'XX' representing the "worldwide" region. | 395 resets it to the default code 'XX' representing the "worldwide" region. |
400 </p> | 396 </p> |
397 | |
401 <a NAME="EspDevice.__resetDevice" ID="EspDevice.__resetDevice"></a> | 398 <a NAME="EspDevice.__resetDevice" ID="EspDevice.__resetDevice"></a> |
402 <h4>EspDevice.__resetDevice</h4> | 399 <h4>EspDevice.__resetDevice</h4> |
403 <b>__resetDevice</b>(<i></i>) | 400 <b>__resetDevice</b>(<i></i>) |
404 | |
405 <p> | 401 <p> |
406 Private slot to reset the connected device. | 402 Private slot to reset the connected device. |
407 </p> | 403 </p> |
404 | |
408 <a NAME="EspDevice.__restoreFlash" ID="EspDevice.__restoreFlash"></a> | 405 <a NAME="EspDevice.__restoreFlash" ID="EspDevice.__restoreFlash"></a> |
409 <h4>EspDevice.__restoreFlash</h4> | 406 <h4>EspDevice.__restoreFlash</h4> |
410 <b>__restoreFlash</b>(<i></i>) | 407 <b>__restoreFlash</b>(<i></i>) |
411 | |
412 <p> | 408 <p> |
413 Private slot to restore a previously saved firmware. | 409 Private slot to restore a previously saved firmware. |
414 </p> | 410 </p> |
411 | |
415 <a NAME="EspDevice.__setCountry" ID="EspDevice.__setCountry"></a> | 412 <a NAME="EspDevice.__setCountry" ID="EspDevice.__setCountry"></a> |
416 <h4>EspDevice.__setCountry</h4> | 413 <h4>EspDevice.__setCountry</h4> |
417 <b>__setCountry</b>(<i></i>) | 414 <b>__setCountry</b>(<i></i>) |
418 | |
419 <p> | 415 <p> |
420 Private slot to configure the country of the connected ESP32 device. | 416 Private slot to configure the country of the connected ESP32 device. |
421 </p> | 417 </p> |
422 <p> | 418 <p> |
423 The country is the two-letter ISO 3166-1 Alpha-2 country code. | 419 The country is the two-letter ISO 3166-1 Alpha-2 country code. |
424 </p> | 420 </p> |
421 | |
425 <a NAME="EspDevice.__showChipID" ID="EspDevice.__showChipID"></a> | 422 <a NAME="EspDevice.__showChipID" ID="EspDevice.__showChipID"></a> |
426 <h4>EspDevice.__showChipID</h4> | 423 <h4>EspDevice.__showChipID</h4> |
427 <b>__showChipID</b>(<i></i>) | 424 <b>__showChipID</b>(<i></i>) |
428 | |
429 <p> | 425 <p> |
430 Private slot to show the ID of the ESP chip. | 426 Private slot to show the ID of the ESP chip. |
431 </p> | 427 </p> |
428 | |
432 <a NAME="EspDevice.__showFirmwareVersions" ID="EspDevice.__showFirmwareVersions"></a> | 429 <a NAME="EspDevice.__showFirmwareVersions" ID="EspDevice.__showFirmwareVersions"></a> |
433 <h4>EspDevice.__showFirmwareVersions</h4> | 430 <h4>EspDevice.__showFirmwareVersions</h4> |
434 <b>__showFirmwareVersions</b>(<i></i>) | 431 <b>__showFirmwareVersions</b>(<i></i>) |
435 | |
436 <p> | 432 <p> |
437 Private slot to show the firmware version of the connected device and the | 433 Private slot to show the firmware version of the connected device and the |
438 available firmware version. | 434 available firmware version. |
439 </p> | 435 </p> |
436 | |
440 <a NAME="EspDevice.__showFlashID" ID="EspDevice.__showFlashID"></a> | 437 <a NAME="EspDevice.__showFlashID" ID="EspDevice.__showFlashID"></a> |
441 <h4>EspDevice.__showFlashID</h4> | 438 <h4>EspDevice.__showFlashID</h4> |
442 <b>__showFlashID</b>(<i></i>) | 439 <b>__showFlashID</b>(<i></i>) |
443 | |
444 <p> | 440 <p> |
445 Private slot to show the ID of the ESP flash chip. | 441 Private slot to show the ID of the ESP flash chip. |
446 </p> | 442 </p> |
443 | |
447 <a NAME="EspDevice.__showMACAddress" ID="EspDevice.__showMACAddress"></a> | 444 <a NAME="EspDevice.__showMACAddress" ID="EspDevice.__showMACAddress"></a> |
448 <h4>EspDevice.__showMACAddress</h4> | 445 <h4>EspDevice.__showMACAddress</h4> |
449 <b>__showMACAddress</b>(<i></i>) | 446 <b>__showMACAddress</b>(<i></i>) |
450 | |
451 <p> | 447 <p> |
452 Private slot to show the MAC address of the ESP chip. | 448 Private slot to show the MAC address of the ESP chip. |
453 </p> | 449 </p> |
450 | |
454 <a NAME="EspDevice._getSetTimeCode" ID="EspDevice._getSetTimeCode"></a> | 451 <a NAME="EspDevice._getSetTimeCode" ID="EspDevice._getSetTimeCode"></a> |
455 <h4>EspDevice._getSetTimeCode</h4> | 452 <h4>EspDevice._getSetTimeCode</h4> |
456 <b>_getSetTimeCode</b>(<i></i>) | 453 <b>_getSetTimeCode</b>(<i></i>) |
457 | |
458 <p> | 454 <p> |
459 Protected method to get the device code to set the time. | 455 Protected method to get the device code to set the time. |
460 </p> | 456 </p> |
461 <p> | 457 <p> |
462 Note: This method must be implemented in the various device specific | 458 Note: This method must be implemented in the various device specific |
463 subclasses. | 459 subclasses. |
464 </p> | 460 </p> |
461 | |
465 <dl> | 462 <dl> |
466 <dt>Return:</dt> | 463 <dt>Return:</dt> |
467 <dd> | 464 <dd> |
468 code to be executed on the connected device to set the time | 465 code to be executed on the connected device to set the time |
469 </dd> | 466 </dd> |
475 </dd> | 472 </dd> |
476 </dl> | 473 </dl> |
477 <a NAME="EspDevice.activateBluetoothInterface" ID="EspDevice.activateBluetoothInterface"></a> | 474 <a NAME="EspDevice.activateBluetoothInterface" ID="EspDevice.activateBluetoothInterface"></a> |
478 <h4>EspDevice.activateBluetoothInterface</h4> | 475 <h4>EspDevice.activateBluetoothInterface</h4> |
479 <b>activateBluetoothInterface</b>(<i></i>) | 476 <b>activateBluetoothInterface</b>(<i></i>) |
480 | |
481 <p> | 477 <p> |
482 Public method to activate the Bluetooth interface. | 478 Public method to activate the Bluetooth interface. |
483 </p> | 479 </p> |
480 | |
484 <dl> | 481 <dl> |
485 <dt>Return:</dt> | 482 <dt>Return:</dt> |
486 <dd> | 483 <dd> |
487 flag indicating the new state of the Bluetooth interface | 484 flag indicating the new state of the Bluetooth interface |
488 </dd> | 485 </dd> |
501 </dd> | 498 </dd> |
502 </dl> | 499 </dl> |
503 <a NAME="EspDevice.addDeviceMenuEntries" ID="EspDevice.addDeviceMenuEntries"></a> | 500 <a NAME="EspDevice.addDeviceMenuEntries" ID="EspDevice.addDeviceMenuEntries"></a> |
504 <h4>EspDevice.addDeviceMenuEntries</h4> | 501 <h4>EspDevice.addDeviceMenuEntries</h4> |
505 <b>addDeviceMenuEntries</b>(<i>menu</i>) | 502 <b>addDeviceMenuEntries</b>(<i>menu</i>) |
506 | |
507 <p> | 503 <p> |
508 Public method to add device specific entries to the given menu. | 504 Public method to add device specific entries to the given menu. |
509 </p> | 505 </p> |
506 | |
510 <dl> | 507 <dl> |
511 | 508 |
512 <dt><i>menu</i> (QMenu)</dt> | 509 <dt><i>menu</i> (QMenu)</dt> |
513 <dd> | 510 <dd> |
514 reference to the context menu | 511 reference to the context menu |
515 </dd> | 512 </dd> |
516 </dl> | 513 </dl> |
517 <a NAME="EspDevice.addDeviceWifiEntries" ID="EspDevice.addDeviceWifiEntries"></a> | 514 <a NAME="EspDevice.addDeviceWifiEntries" ID="EspDevice.addDeviceWifiEntries"></a> |
518 <h4>EspDevice.addDeviceWifiEntries</h4> | 515 <h4>EspDevice.addDeviceWifiEntries</h4> |
519 <b>addDeviceWifiEntries</b>(<i>menu</i>) | 516 <b>addDeviceWifiEntries</b>(<i>menu</i>) |
520 | |
521 <p> | 517 <p> |
522 Public method to add device specific entries to the given menu. | 518 Public method to add device specific entries to the given menu. |
523 </p> | 519 </p> |
520 | |
524 <dl> | 521 <dl> |
525 | 522 |
526 <dt><i>menu</i> (QMenu)</dt> | 523 <dt><i>menu</i> (QMenu)</dt> |
527 <dd> | 524 <dd> |
528 reference to the context menu | 525 reference to the context menu |
529 </dd> | 526 </dd> |
530 </dl> | 527 </dl> |
531 <a NAME="EspDevice.canRunScript" ID="EspDevice.canRunScript"></a> | 528 <a NAME="EspDevice.canRunScript" ID="EspDevice.canRunScript"></a> |
532 <h4>EspDevice.canRunScript</h4> | 529 <h4>EspDevice.canRunScript</h4> |
533 <b>canRunScript</b>(<i></i>) | 530 <b>canRunScript</b>(<i></i>) |
534 | |
535 <p> | 531 <p> |
536 Public method to determine, if a script can be executed. | 532 Public method to determine, if a script can be executed. |
537 </p> | 533 </p> |
534 | |
538 <dl> | 535 <dl> |
539 <dt>Return:</dt> | 536 <dt>Return:</dt> |
540 <dd> | 537 <dd> |
541 tuple containing a flag indicating it is safe to start a | 538 tuple containing a flag indicating it is safe to start a |
542 Plotter and a reason why it cannot. | 539 Plotter and a reason why it cannot. |
549 </dd> | 546 </dd> |
550 </dl> | 547 </dl> |
551 <a NAME="EspDevice.canStartFileManager" ID="EspDevice.canStartFileManager"></a> | 548 <a NAME="EspDevice.canStartFileManager" ID="EspDevice.canStartFileManager"></a> |
552 <h4>EspDevice.canStartFileManager</h4> | 549 <h4>EspDevice.canStartFileManager</h4> |
553 <b>canStartFileManager</b>(<i></i>) | 550 <b>canStartFileManager</b>(<i></i>) |
554 | |
555 <p> | 551 <p> |
556 Public method to determine, if a File Manager can be started. | 552 Public method to determine, if a File Manager can be started. |
557 </p> | 553 </p> |
554 | |
558 <dl> | 555 <dl> |
559 <dt>Return:</dt> | 556 <dt>Return:</dt> |
560 <dd> | 557 <dd> |
561 tuple containing a flag indicating it is safe to start a | 558 tuple containing a flag indicating it is safe to start a |
562 File Manager and a reason why it cannot. | 559 File Manager and a reason why it cannot. |
569 </dd> | 566 </dd> |
570 </dl> | 567 </dl> |
571 <a NAME="EspDevice.canStartPlotter" ID="EspDevice.canStartPlotter"></a> | 568 <a NAME="EspDevice.canStartPlotter" ID="EspDevice.canStartPlotter"></a> |
572 <h4>EspDevice.canStartPlotter</h4> | 569 <h4>EspDevice.canStartPlotter</h4> |
573 <b>canStartPlotter</b>(<i></i>) | 570 <b>canStartPlotter</b>(<i></i>) |
574 | |
575 <p> | 571 <p> |
576 Public method to determine, if a Plotter can be started. | 572 Public method to determine, if a Plotter can be started. |
577 </p> | 573 </p> |
574 | |
578 <dl> | 575 <dl> |
579 <dt>Return:</dt> | 576 <dt>Return:</dt> |
580 <dd> | 577 <dd> |
581 tuple containing a flag indicating it is safe to start a | 578 tuple containing a flag indicating it is safe to start a |
582 Plotter and a reason why it cannot. | 579 Plotter and a reason why it cannot. |
589 </dd> | 586 </dd> |
590 </dl> | 587 </dl> |
591 <a NAME="EspDevice.canStartRepl" ID="EspDevice.canStartRepl"></a> | 588 <a NAME="EspDevice.canStartRepl" ID="EspDevice.canStartRepl"></a> |
592 <h4>EspDevice.canStartRepl</h4> | 589 <h4>EspDevice.canStartRepl</h4> |
593 <b>canStartRepl</b>(<i></i>) | 590 <b>canStartRepl</b>(<i></i>) |
594 | |
595 <p> | 591 <p> |
596 Public method to determine, if a REPL can be started. | 592 Public method to determine, if a REPL can be started. |
597 </p> | 593 </p> |
594 | |
598 <dl> | 595 <dl> |
599 <dt>Return:</dt> | 596 <dt>Return:</dt> |
600 <dd> | 597 <dd> |
601 tuple containing a flag indicating it is safe to start a REPL | 598 tuple containing a flag indicating it is safe to start a REPL |
602 and a reason why it cannot. | 599 and a reason why it cannot. |
609 </dd> | 606 </dd> |
610 </dl> | 607 </dl> |
611 <a NAME="EspDevice.checkInternet" ID="EspDevice.checkInternet"></a> | 608 <a NAME="EspDevice.checkInternet" ID="EspDevice.checkInternet"></a> |
612 <h4>EspDevice.checkInternet</h4> | 609 <h4>EspDevice.checkInternet</h4> |
613 <b>checkInternet</b>(<i></i>) | 610 <b>checkInternet</b>(<i></i>) |
614 | |
615 <p> | 611 <p> |
616 Public method to check, if the internet can be reached. | 612 Public method to check, if the internet can be reached. |
617 </p> | 613 </p> |
614 | |
618 <dl> | 615 <dl> |
619 <dt>Return:</dt> | 616 <dt>Return:</dt> |
620 <dd> | 617 <dd> |
621 tuple containing a flag indicating reachability and an error string | 618 tuple containing a flag indicating reachability and an error string |
622 </dd> | 619 </dd> |
628 </dd> | 625 </dd> |
629 </dl> | 626 </dl> |
630 <a NAME="EspDevice.connectWifi" ID="EspDevice.connectWifi"></a> | 627 <a NAME="EspDevice.connectWifi" ID="EspDevice.connectWifi"></a> |
631 <h4>EspDevice.connectWifi</h4> | 628 <h4>EspDevice.connectWifi</h4> |
632 <b>connectWifi</b>(<i>ssid, password, hostname</i>) | 629 <b>connectWifi</b>(<i>ssid, password, hostname</i>) |
633 | |
634 <p> | 630 <p> |
635 Public method to connect a device to a WiFi network. | 631 Public method to connect a device to a WiFi network. |
636 </p> | 632 </p> |
633 | |
637 <dl> | 634 <dl> |
638 | 635 |
639 <dt><i>ssid</i> (str)</dt> | 636 <dt><i>ssid</i> (str)</dt> |
640 <dd> | 637 <dd> |
641 name (SSID) of the WiFi network | 638 name (SSID) of the WiFi network |
662 </dd> | 659 </dd> |
663 </dl> | 660 </dl> |
664 <a NAME="EspDevice.deactivateBluetoothInterface" ID="EspDevice.deactivateBluetoothInterface"></a> | 661 <a NAME="EspDevice.deactivateBluetoothInterface" ID="EspDevice.deactivateBluetoothInterface"></a> |
665 <h4>EspDevice.deactivateBluetoothInterface</h4> | 662 <h4>EspDevice.deactivateBluetoothInterface</h4> |
666 <b>deactivateBluetoothInterface</b>(<i></i>) | 663 <b>deactivateBluetoothInterface</b>(<i></i>) |
667 | |
668 <p> | 664 <p> |
669 Public method to deactivate the Bluetooth interface. | 665 Public method to deactivate the Bluetooth interface. |
670 </p> | 666 </p> |
667 | |
671 <dl> | 668 <dl> |
672 <dt>Return:</dt> | 669 <dt>Return:</dt> |
673 <dd> | 670 <dd> |
674 flag indicating the new state of the Bluetooth interface | 671 flag indicating the new state of the Bluetooth interface |
675 </dd> | 672 </dd> |
688 </dd> | 685 </dd> |
689 </dl> | 686 </dl> |
690 <a NAME="EspDevice.deactivateInterface" ID="EspDevice.deactivateInterface"></a> | 687 <a NAME="EspDevice.deactivateInterface" ID="EspDevice.deactivateInterface"></a> |
691 <h4>EspDevice.deactivateInterface</h4> | 688 <h4>EspDevice.deactivateInterface</h4> |
692 <b>deactivateInterface</b>(<i>interface</i>) | 689 <b>deactivateInterface</b>(<i>interface</i>) |
693 | |
694 <p> | 690 <p> |
695 Public method to deactivate a given WiFi interface of the connected device. | 691 Public method to deactivate a given WiFi interface of the connected device. |
696 </p> | 692 </p> |
693 | |
697 <dl> | 694 <dl> |
698 | 695 |
699 <dt><i>interface</i> (str)</dt> | 696 <dt><i>interface</i> (str)</dt> |
700 <dd> | 697 <dd> |
701 designation of the interface to be deactivated (one of 'AP' | 698 designation of the interface to be deactivated (one of 'AP' |
722 </dd> | 719 </dd> |
723 </dl> | 720 </dl> |
724 <a NAME="EspDevice.deviceName" ID="EspDevice.deviceName"></a> | 721 <a NAME="EspDevice.deviceName" ID="EspDevice.deviceName"></a> |
725 <h4>EspDevice.deviceName</h4> | 722 <h4>EspDevice.deviceName</h4> |
726 <b>deviceName</b>(<i></i>) | 723 <b>deviceName</b>(<i></i>) |
727 | |
728 <p> | 724 <p> |
729 Public method to get the name of the device. | 725 Public method to get the name of the device. |
730 </p> | 726 </p> |
727 | |
731 <dl> | 728 <dl> |
732 <dt>Return:</dt> | 729 <dt>Return:</dt> |
733 <dd> | 730 <dd> |
734 name of the device | 731 name of the device |
735 </dd> | 732 </dd> |
741 </dd> | 738 </dd> |
742 </dl> | 739 </dl> |
743 <a NAME="EspDevice.disableWebrepl" ID="EspDevice.disableWebrepl"></a> | 740 <a NAME="EspDevice.disableWebrepl" ID="EspDevice.disableWebrepl"></a> |
744 <h4>EspDevice.disableWebrepl</h4> | 741 <h4>EspDevice.disableWebrepl</h4> |
745 <b>disableWebrepl</b>(<i></i>) | 742 <b>disableWebrepl</b>(<i></i>) |
746 | |
747 <p> | 743 <p> |
748 Public method to write the given WebREPL password to the connected device and | 744 Public method to write the given WebREPL password to the connected device and |
749 modify the start script to start the WebREPL server. | 745 modify the start script to start the WebREPL server. |
750 </p> | 746 </p> |
747 | |
751 <dl> | 748 <dl> |
752 <dt>Return:</dt> | 749 <dt>Return:</dt> |
753 <dd> | 750 <dd> |
754 tuple containing a flag indicating success and an error message | 751 tuple containing a flag indicating success and an error message |
755 </dd> | 752 </dd> |
761 </dd> | 758 </dd> |
762 </dl> | 759 </dl> |
763 <a NAME="EspDevice.disconnectWifi" ID="EspDevice.disconnectWifi"></a> | 760 <a NAME="EspDevice.disconnectWifi" ID="EspDevice.disconnectWifi"></a> |
764 <h4>EspDevice.disconnectWifi</h4> | 761 <h4>EspDevice.disconnectWifi</h4> |
765 <b>disconnectWifi</b>(<i></i>) | 762 <b>disconnectWifi</b>(<i></i>) |
766 | |
767 <p> | 763 <p> |
768 Public method to disconnect a device from the WiFi network. | 764 Public method to disconnect a device from the WiFi network. |
769 </p> | 765 </p> |
766 | |
770 <dl> | 767 <dl> |
771 <dt>Return:</dt> | 768 <dt>Return:</dt> |
772 <dd> | 769 <dd> |
773 tuple containing a flag indicating success and an error string | 770 tuple containing a flag indicating success and an error string |
774 </dd> | 771 </dd> |
780 </dd> | 777 </dd> |
781 </dl> | 778 </dl> |
782 <a NAME="EspDevice.enableWebrepl" ID="EspDevice.enableWebrepl"></a> | 779 <a NAME="EspDevice.enableWebrepl" ID="EspDevice.enableWebrepl"></a> |
783 <h4>EspDevice.enableWebrepl</h4> | 780 <h4>EspDevice.enableWebrepl</h4> |
784 <b>enableWebrepl</b>(<i>password</i>) | 781 <b>enableWebrepl</b>(<i>password</i>) |
785 | |
786 <p> | 782 <p> |
787 Public method to write the given WebREPL password to the connected device and | 783 Public method to write the given WebREPL password to the connected device and |
788 modify the start script to start the WebREPL server. | 784 modify the start script to start the WebREPL server. |
789 </p> | 785 </p> |
786 | |
790 <dl> | 787 <dl> |
791 | 788 |
792 <dt><i>password</i> (str)</dt> | 789 <dt><i>password</i> (str)</dt> |
793 <dd> | 790 <dd> |
794 password needed to authenticate | 791 password needed to authenticate |
807 </dd> | 804 </dd> |
808 </dl> | 805 </dl> |
809 <a NAME="EspDevice.forceInterrupt" ID="EspDevice.forceInterrupt"></a> | 806 <a NAME="EspDevice.forceInterrupt" ID="EspDevice.forceInterrupt"></a> |
810 <h4>EspDevice.forceInterrupt</h4> | 807 <h4>EspDevice.forceInterrupt</h4> |
811 <b>forceInterrupt</b>(<i></i>) | 808 <b>forceInterrupt</b>(<i></i>) |
812 | |
813 <p> | 809 <p> |
814 Public method to determine the need for an interrupt when opening the | 810 Public method to determine the need for an interrupt when opening the |
815 serial connection. | 811 serial connection. |
816 </p> | 812 </p> |
813 | |
817 <dl> | 814 <dl> |
818 <dt>Return:</dt> | 815 <dt>Return:</dt> |
819 <dd> | 816 <dd> |
820 flag indicating an interrupt is needed | 817 flag indicating an interrupt is needed |
821 </dd> | 818 </dd> |
827 </dd> | 824 </dd> |
828 </dl> | 825 </dl> |
829 <a NAME="EspDevice.getBluetoothStatus" ID="EspDevice.getBluetoothStatus"></a> | 826 <a NAME="EspDevice.getBluetoothStatus" ID="EspDevice.getBluetoothStatus"></a> |
830 <h4>EspDevice.getBluetoothStatus</h4> | 827 <h4>EspDevice.getBluetoothStatus</h4> |
831 <b>getBluetoothStatus</b>(<i></i>) | 828 <b>getBluetoothStatus</b>(<i></i>) |
832 | |
833 <p> | 829 <p> |
834 Public method to get Bluetooth status data of the connected board. | 830 Public method to get Bluetooth status data of the connected board. |
835 </p> | 831 </p> |
832 | |
836 <dl> | 833 <dl> |
837 <dt>Return:</dt> | 834 <dt>Return:</dt> |
838 <dd> | 835 <dd> |
839 list of tuples containing the translated status data label and | 836 list of tuples containing the translated status data label and |
840 the associated value | 837 the associated value |
854 </dd> | 851 </dd> |
855 </dl> | 852 </dl> |
856 <a NAME="EspDevice.getConnectedClients" ID="EspDevice.getConnectedClients"></a> | 853 <a NAME="EspDevice.getConnectedClients" ID="EspDevice.getConnectedClients"></a> |
857 <h4>EspDevice.getConnectedClients</h4> | 854 <h4>EspDevice.getConnectedClients</h4> |
858 <b>getConnectedClients</b>(<i></i>) | 855 <b>getConnectedClients</b>(<i></i>) |
859 | |
860 <p> | 856 <p> |
861 Public method to get a list of connected clients. | 857 Public method to get a list of connected clients. |
862 </p> | 858 </p> |
859 | |
863 <dl> | 860 <dl> |
864 <dt>Return:</dt> | 861 <dt>Return:</dt> |
865 <dd> | 862 <dd> |
866 a tuple containing a list of tuples containing the client MAC-Address | 863 a tuple containing a list of tuples containing the client MAC-Address |
867 and the RSSI (if supported and available) and an error message | 864 and the RSSI (if supported and available) and an error message |
874 </dd> | 871 </dd> |
875 </dl> | 872 </dl> |
876 <a NAME="EspDevice.getDeviceScan" ID="EspDevice.getDeviceScan"></a> | 873 <a NAME="EspDevice.getDeviceScan" ID="EspDevice.getDeviceScan"></a> |
877 <h4>EspDevice.getDeviceScan</h4> | 874 <h4>EspDevice.getDeviceScan</h4> |
878 <b>getDeviceScan</b>(<i>timeout=10</i>) | 875 <b>getDeviceScan</b>(<i>timeout=10</i>) |
879 | |
880 <p> | 876 <p> |
881 Public method to perform a Bluetooth device scan. | 877 Public method to perform a Bluetooth device scan. |
882 </p> | 878 </p> |
879 | |
883 <dl> | 880 <dl> |
884 | 881 |
885 <dt><i>timeout</i> (int (optional))</dt> | 882 <dt><i>timeout</i> (int (optional))</dt> |
886 <dd> | 883 <dd> |
887 duration of the device scan in seconds (defaults | 884 duration of the device scan in seconds (defaults |
902 </dd> | 899 </dd> |
903 </dl> | 900 </dl> |
904 <a NAME="EspDevice.getDocumentationUrl" ID="EspDevice.getDocumentationUrl"></a> | 901 <a NAME="EspDevice.getDocumentationUrl" ID="EspDevice.getDocumentationUrl"></a> |
905 <h4>EspDevice.getDocumentationUrl</h4> | 902 <h4>EspDevice.getDocumentationUrl</h4> |
906 <b>getDocumentationUrl</b>(<i></i>) | 903 <b>getDocumentationUrl</b>(<i></i>) |
907 | |
908 <p> | 904 <p> |
909 Public method to get the device documentation URL. | 905 Public method to get the device documentation URL. |
910 </p> | 906 </p> |
907 | |
911 <dl> | 908 <dl> |
912 <dt>Return:</dt> | 909 <dt>Return:</dt> |
913 <dd> | 910 <dd> |
914 documentation URL of the device | 911 documentation URL of the device |
915 </dd> | 912 </dd> |
921 </dd> | 918 </dd> |
922 </dl> | 919 </dl> |
923 <a NAME="EspDevice.getFirmwareUrl" ID="EspDevice.getFirmwareUrl"></a> | 920 <a NAME="EspDevice.getFirmwareUrl" ID="EspDevice.getFirmwareUrl"></a> |
924 <h4>EspDevice.getFirmwareUrl</h4> | 921 <h4>EspDevice.getFirmwareUrl</h4> |
925 <b>getFirmwareUrl</b>(<i></i>) | 922 <b>getFirmwareUrl</b>(<i></i>) |
926 | |
927 <p> | 923 <p> |
928 Public method to get the device firmware download URL. | 924 Public method to get the device firmware download URL. |
929 </p> | 925 </p> |
926 | |
930 <dl> | 927 <dl> |
931 <dt>Return:</dt> | 928 <dt>Return:</dt> |
932 <dd> | 929 <dd> |
933 firmware download URL of the device | 930 firmware download URL of the device |
934 </dd> | 931 </dd> |
940 </dd> | 937 </dd> |
941 </dl> | 938 </dl> |
942 <a NAME="EspDevice.getWifiData" ID="EspDevice.getWifiData"></a> | 939 <a NAME="EspDevice.getWifiData" ID="EspDevice.getWifiData"></a> |
943 <h4>EspDevice.getWifiData</h4> | 940 <h4>EspDevice.getWifiData</h4> |
944 <b>getWifiData</b>(<i></i>) | 941 <b>getWifiData</b>(<i></i>) |
945 | |
946 <p> | 942 <p> |
947 Public method to get data related to the current WiFi status. | 943 Public method to get data related to the current WiFi status. |
948 </p> | 944 </p> |
945 | |
949 <dl> | 946 <dl> |
950 <dt>Return:</dt> | 947 <dt>Return:</dt> |
951 <dd> | 948 <dd> |
952 tuple of three dictionaries containing the WiFi status data | 949 tuple of three dictionaries containing the WiFi status data |
953 for the WiFi client, access point and overall data | 950 for the WiFi client, access point and overall data |
967 </dd> | 964 </dd> |
968 </dl> | 965 </dl> |
969 <a NAME="EspDevice.hasBluetooth" ID="EspDevice.hasBluetooth"></a> | 966 <a NAME="EspDevice.hasBluetooth" ID="EspDevice.hasBluetooth"></a> |
970 <h4>EspDevice.hasBluetooth</h4> | 967 <h4>EspDevice.hasBluetooth</h4> |
971 <b>hasBluetooth</b>(<i></i>) | 968 <b>hasBluetooth</b>(<i></i>) |
972 | |
973 <p> | 969 <p> |
974 Public method to check the availability of Bluetooth. | 970 Public method to check the availability of Bluetooth. |
975 </p> | 971 </p> |
972 | |
976 <dl> | 973 <dl> |
977 <dt>Return:</dt> | 974 <dt>Return:</dt> |
978 <dd> | 975 <dd> |
979 flag indicating the availability of Bluetooth | 976 flag indicating the availability of Bluetooth |
980 </dd> | 977 </dd> |
993 </dd> | 990 </dd> |
994 </dl> | 991 </dl> |
995 <a NAME="EspDevice.hasFlashMenuEntry" ID="EspDevice.hasFlashMenuEntry"></a> | 992 <a NAME="EspDevice.hasFlashMenuEntry" ID="EspDevice.hasFlashMenuEntry"></a> |
996 <h4>EspDevice.hasFlashMenuEntry</h4> | 993 <h4>EspDevice.hasFlashMenuEntry</h4> |
997 <b>hasFlashMenuEntry</b>(<i></i>) | 994 <b>hasFlashMenuEntry</b>(<i></i>) |
998 | |
999 <p> | 995 <p> |
1000 Public method to check, if the device has its own flash menu entry. | 996 Public method to check, if the device has its own flash menu entry. |
1001 </p> | 997 </p> |
998 | |
1002 <dl> | 999 <dl> |
1003 <dt>Return:</dt> | 1000 <dt>Return:</dt> |
1004 <dd> | 1001 <dd> |
1005 flag indicating a specific flash menu entry | 1002 flag indicating a specific flash menu entry |
1006 </dd> | 1003 </dd> |
1012 </dd> | 1009 </dd> |
1013 </dl> | 1010 </dl> |
1014 <a NAME="EspDevice.hasNetworkTime" ID="EspDevice.hasNetworkTime"></a> | 1011 <a NAME="EspDevice.hasNetworkTime" ID="EspDevice.hasNetworkTime"></a> |
1015 <h4>EspDevice.hasNetworkTime</h4> | 1012 <h4>EspDevice.hasNetworkTime</h4> |
1016 <b>hasNetworkTime</b>(<i></i>) | 1013 <b>hasNetworkTime</b>(<i></i>) |
1017 | |
1018 <p> | 1014 <p> |
1019 Public method to check the availability of network time functions. | 1015 Public method to check the availability of network time functions. |
1020 </p> | 1016 </p> |
1017 | |
1021 <dl> | 1018 <dl> |
1022 <dt>Return:</dt> | 1019 <dt>Return:</dt> |
1023 <dd> | 1020 <dd> |
1024 flag indicating the availability of network time functions | 1021 flag indicating the availability of network time functions |
1025 </dd> | 1022 </dd> |
1038 </dd> | 1035 </dd> |
1039 </dl> | 1036 </dl> |
1040 <a NAME="EspDevice.hasWifi" ID="EspDevice.hasWifi"></a> | 1037 <a NAME="EspDevice.hasWifi" ID="EspDevice.hasWifi"></a> |
1041 <h4>EspDevice.hasWifi</h4> | 1038 <h4>EspDevice.hasWifi</h4> |
1042 <b>hasWifi</b>(<i></i>) | 1039 <b>hasWifi</b>(<i></i>) |
1043 | |
1044 <p> | 1040 <p> |
1045 Public method to check the availability of WiFi. | 1041 Public method to check the availability of WiFi. |
1046 </p> | 1042 </p> |
1043 | |
1047 <dl> | 1044 <dl> |
1048 <dt>Return:</dt> | 1045 <dt>Return:</dt> |
1049 <dd> | 1046 <dd> |
1050 tuple containing a flag indicating the availability of WiFi | 1047 tuple containing a flag indicating the availability of WiFi |
1051 and the WiFi type (esp32) | 1048 and the WiFi type (esp32) |
1058 </dd> | 1055 </dd> |
1059 </dl> | 1056 </dl> |
1060 <a NAME="EspDevice.hasWifiCountry" ID="EspDevice.hasWifiCountry"></a> | 1057 <a NAME="EspDevice.hasWifiCountry" ID="EspDevice.hasWifiCountry"></a> |
1061 <h4>EspDevice.hasWifiCountry</h4> | 1058 <h4>EspDevice.hasWifiCountry</h4> |
1062 <b>hasWifiCountry</b>(<i></i>) | 1059 <b>hasWifiCountry</b>(<i></i>) |
1063 | |
1064 <p> | 1060 <p> |
1065 Public method to check, if the device has support to set the WiFi country. | 1061 Public method to check, if the device has support to set the WiFi country. |
1066 </p> | 1062 </p> |
1063 | |
1067 <dl> | 1064 <dl> |
1068 <dt>Return:</dt> | 1065 <dt>Return:</dt> |
1069 <dd> | 1066 <dd> |
1070 flag indicating the support of WiFi country | 1067 flag indicating the support of WiFi country |
1071 </dd> | 1068 </dd> |
1077 </dd> | 1074 </dd> |
1078 </dl> | 1075 </dl> |
1079 <a NAME="EspDevice.isWifiApConnected" ID="EspDevice.isWifiApConnected"></a> | 1076 <a NAME="EspDevice.isWifiApConnected" ID="EspDevice.isWifiApConnected"></a> |
1080 <h4>EspDevice.isWifiApConnected</h4> | 1077 <h4>EspDevice.isWifiApConnected</h4> |
1081 <b>isWifiApConnected</b>(<i></i>) | 1078 <b>isWifiApConnected</b>(<i></i>) |
1082 | |
1083 <p> | 1079 <p> |
1084 Public method to check the WiFi connection status as access point. | 1080 Public method to check the WiFi connection status as access point. |
1085 </p> | 1081 </p> |
1082 | |
1086 <dl> | 1083 <dl> |
1087 <dt>Return:</dt> | 1084 <dt>Return:</dt> |
1088 <dd> | 1085 <dd> |
1089 flag indicating the WiFi connection status | 1086 flag indicating the WiFi connection status |
1090 </dd> | 1087 </dd> |
1096 </dd> | 1093 </dd> |
1097 </dl> | 1094 </dl> |
1098 <a NAME="EspDevice.isWifiClientConnected" ID="EspDevice.isWifiClientConnected"></a> | 1095 <a NAME="EspDevice.isWifiClientConnected" ID="EspDevice.isWifiClientConnected"></a> |
1099 <h4>EspDevice.isWifiClientConnected</h4> | 1096 <h4>EspDevice.isWifiClientConnected</h4> |
1100 <b>isWifiClientConnected</b>(<i></i>) | 1097 <b>isWifiClientConnected</b>(<i></i>) |
1101 | |
1102 <p> | 1098 <p> |
1103 Public method to check the WiFi connection status as client. | 1099 Public method to check the WiFi connection status as client. |
1104 </p> | 1100 </p> |
1101 | |
1105 <dl> | 1102 <dl> |
1106 <dt>Return:</dt> | 1103 <dt>Return:</dt> |
1107 <dd> | 1104 <dd> |
1108 flag indicating the WiFi connection status | 1105 flag indicating the WiFi connection status |
1109 </dd> | 1106 </dd> |
1115 </dd> | 1112 </dd> |
1116 </dl> | 1113 </dl> |
1117 <a NAME="EspDevice.removeCredentials" ID="EspDevice.removeCredentials"></a> | 1114 <a NAME="EspDevice.removeCredentials" ID="EspDevice.removeCredentials"></a> |
1118 <h4>EspDevice.removeCredentials</h4> | 1115 <h4>EspDevice.removeCredentials</h4> |
1119 <b>removeCredentials</b>(<i></i>) | 1116 <b>removeCredentials</b>(<i></i>) |
1120 | |
1121 <p> | 1117 <p> |
1122 Public method to remove the saved credentials from the connected device. | 1118 Public method to remove the saved credentials from the connected device. |
1123 </p> | 1119 </p> |
1120 | |
1124 <dl> | 1121 <dl> |
1125 <dt>Return:</dt> | 1122 <dt>Return:</dt> |
1126 <dd> | 1123 <dd> |
1127 tuple containing a flag indicating success and an error message | 1124 tuple containing a flag indicating success and an error message |
1128 </dd> | 1125 </dd> |
1134 </dd> | 1131 </dd> |
1135 </dl> | 1132 </dl> |
1136 <a NAME="EspDevice.runScript" ID="EspDevice.runScript"></a> | 1133 <a NAME="EspDevice.runScript" ID="EspDevice.runScript"></a> |
1137 <h4>EspDevice.runScript</h4> | 1134 <h4>EspDevice.runScript</h4> |
1138 <b>runScript</b>(<i>script</i>) | 1135 <b>runScript</b>(<i>script</i>) |
1139 | |
1140 <p> | 1136 <p> |
1141 Public method to run the given Python script. | 1137 Public method to run the given Python script. |
1142 </p> | 1138 </p> |
1139 | |
1143 <dl> | 1140 <dl> |
1144 | 1141 |
1145 <dt><i>script</i> (str)</dt> | 1142 <dt><i>script</i> (str)</dt> |
1146 <dd> | 1143 <dd> |
1147 script to be executed | 1144 script to be executed |
1148 </dd> | 1145 </dd> |
1149 </dl> | 1146 </dl> |
1150 <a NAME="EspDevice.scanNetworks" ID="EspDevice.scanNetworks"></a> | 1147 <a NAME="EspDevice.scanNetworks" ID="EspDevice.scanNetworks"></a> |
1151 <h4>EspDevice.scanNetworks</h4> | 1148 <h4>EspDevice.scanNetworks</h4> |
1152 <b>scanNetworks</b>(<i></i>) | 1149 <b>scanNetworks</b>(<i></i>) |
1153 | |
1154 <p> | 1150 <p> |
1155 Public method to scan for available WiFi networks. | 1151 Public method to scan for available WiFi networks. |
1156 </p> | 1152 </p> |
1153 | |
1157 <dl> | 1154 <dl> |
1158 <dt>Return:</dt> | 1155 <dt>Return:</dt> |
1159 <dd> | 1156 <dd> |
1160 tuple containing the list of available networks as a tuple of 'Name', | 1157 tuple containing the list of available networks as a tuple of 'Name', |
1161 'MAC-Address', 'channel', 'RSSI' and 'security' and an error string | 1158 'MAC-Address', 'channel', 'RSSI' and 'security' and an error string |
1168 </dd> | 1165 </dd> |
1169 </dl> | 1166 </dl> |
1170 <a NAME="EspDevice.setButtons" ID="EspDevice.setButtons"></a> | 1167 <a NAME="EspDevice.setButtons" ID="EspDevice.setButtons"></a> |
1171 <h4>EspDevice.setButtons</h4> | 1168 <h4>EspDevice.setButtons</h4> |
1172 <b>setButtons</b>(<i></i>) | 1169 <b>setButtons</b>(<i></i>) |
1173 | |
1174 <p> | 1170 <p> |
1175 Public method to enable the supported action buttons. | 1171 Public method to enable the supported action buttons. |
1176 </p> | 1172 </p> |
1173 | |
1177 <a NAME="EspDevice.setConnected" ID="EspDevice.setConnected"></a> | 1174 <a NAME="EspDevice.setConnected" ID="EspDevice.setConnected"></a> |
1178 <h4>EspDevice.setConnected</h4> | 1175 <h4>EspDevice.setConnected</h4> |
1179 <b>setConnected</b>(<i>connected</i>) | 1176 <b>setConnected</b>(<i>connected</i>) |
1180 | |
1181 <p> | 1177 <p> |
1182 Public method to set the connection state. | 1178 Public method to set the connection state. |
1183 </p> | 1179 </p> |
1184 <p> | 1180 <p> |
1185 Note: This method can be overwritten to perform actions upon connect | 1181 Note: This method can be overwritten to perform actions upon connect |
1186 or disconnect of the device. | 1182 or disconnect of the device. |
1187 </p> | 1183 </p> |
1184 | |
1188 <dl> | 1185 <dl> |
1189 | 1186 |
1190 <dt><i>connected</i> (bool)</dt> | 1187 <dt><i>connected</i> (bool)</dt> |
1191 <dd> | 1188 <dd> |
1192 connection state | 1189 connection state |
1193 </dd> | 1190 </dd> |
1194 </dl> | 1191 </dl> |
1195 <a NAME="EspDevice.setNetworkTime" ID="EspDevice.setNetworkTime"></a> | 1192 <a NAME="EspDevice.setNetworkTime" ID="EspDevice.setNetworkTime"></a> |
1196 <h4>EspDevice.setNetworkTime</h4> | 1193 <h4>EspDevice.setNetworkTime</h4> |
1197 <b>setNetworkTime</b>(<i>server="0.pool.ntp.org", tzOffset=0, timeout=10</i>) | 1194 <b>setNetworkTime</b>(<i>server="0.pool.ntp.org", tzOffset=0, timeout=10</i>) |
1198 | |
1199 <p> | 1195 <p> |
1200 Public method to set the time to the network time retrieved from an | 1196 Public method to set the time to the network time retrieved from an |
1201 NTP server. | 1197 NTP server. |
1202 </p> | 1198 </p> |
1199 | |
1203 <dl> | 1200 <dl> |
1204 | 1201 |
1205 <dt><i>server</i> (str (optional))</dt> | 1202 <dt><i>server</i> (str (optional))</dt> |
1206 <dd> | 1203 <dd> |
1207 name of the NTP server to get the network time from | 1204 name of the NTP server to get the network time from |
1230 </dd> | 1227 </dd> |
1231 </dl> | 1228 </dl> |
1232 <a NAME="EspDevice.startAccessPoint" ID="EspDevice.startAccessPoint"></a> | 1229 <a NAME="EspDevice.startAccessPoint" ID="EspDevice.startAccessPoint"></a> |
1233 <h4>EspDevice.startAccessPoint</h4> | 1230 <h4>EspDevice.startAccessPoint</h4> |
1234 <b>startAccessPoint</b>(<i>ssid, security=None, password=None, hostname=None, ifconfig=None, </i>) | 1231 <b>startAccessPoint</b>(<i>ssid, security=None, password=None, hostname=None, ifconfig=None, </i>) |
1235 | |
1236 <p> | 1232 <p> |
1237 Public method to start the access point interface. | 1233 Public method to start the access point interface. |
1238 </p> | 1234 </p> |
1235 | |
1239 <dl> | 1236 <dl> |
1240 | 1237 |
1241 <dt><i>ssid</i> (str)</dt> | 1238 <dt><i>ssid</i> (str)</dt> |
1242 <dd> | 1239 <dd> |
1243 SSID of the access point | 1240 SSID of the access point |
1273 </dd> | 1270 </dd> |
1274 </dl> | 1271 </dl> |
1275 <a NAME="EspDevice.stopAccessPoint" ID="EspDevice.stopAccessPoint"></a> | 1272 <a NAME="EspDevice.stopAccessPoint" ID="EspDevice.stopAccessPoint"></a> |
1276 <h4>EspDevice.stopAccessPoint</h4> | 1273 <h4>EspDevice.stopAccessPoint</h4> |
1277 <b>stopAccessPoint</b>(<i></i>) | 1274 <b>stopAccessPoint</b>(<i></i>) |
1278 | |
1279 <p> | 1275 <p> |
1280 Public method to stop the access point interface. | 1276 Public method to stop the access point interface. |
1281 </p> | 1277 </p> |
1278 | |
1282 <dl> | 1279 <dl> |
1283 <dt>Return:</dt> | 1280 <dt>Return:</dt> |
1284 <dd> | 1281 <dd> |
1285 tuple containg a flag indicating success and an error message | 1282 tuple containg a flag indicating success and an error message |
1286 </dd> | 1283 </dd> |
1292 </dd> | 1289 </dd> |
1293 </dl> | 1290 </dl> |
1294 <a NAME="EspDevice.writeCredentials" ID="EspDevice.writeCredentials"></a> | 1291 <a NAME="EspDevice.writeCredentials" ID="EspDevice.writeCredentials"></a> |
1295 <h4>EspDevice.writeCredentials</h4> | 1292 <h4>EspDevice.writeCredentials</h4> |
1296 <b>writeCredentials</b>(<i>ssid, password, hostname, country</i>) | 1293 <b>writeCredentials</b>(<i>ssid, password, hostname, country</i>) |
1297 | |
1298 <p> | 1294 <p> |
1299 Public method to write the given credentials to the connected device and modify | 1295 Public method to write the given credentials to the connected device and modify |
1300 the start script to connect automatically. | 1296 the start script to connect automatically. |
1301 </p> | 1297 </p> |
1298 | |
1302 <dl> | 1299 <dl> |
1303 | 1300 |
1304 <dt><i>ssid</i> (str)</dt> | 1301 <dt><i>ssid</i> (str)</dt> |
1305 <dd> | 1302 <dd> |
1306 SSID of the network to connect to | 1303 SSID of the network to connect to |
1334 <hr /> | 1331 <hr /> |
1335 <hr /> | 1332 <hr /> |
1336 <a NAME="createDevice" ID="createDevice"></a> | 1333 <a NAME="createDevice" ID="createDevice"></a> |
1337 <h2>createDevice</h2> | 1334 <h2>createDevice</h2> |
1338 <b>createDevice</b>(<i>microPythonWidget, deviceType, vid, pid, boardName, serialNumber</i>) | 1335 <b>createDevice</b>(<i>microPythonWidget, deviceType, vid, pid, boardName, serialNumber</i>) |
1339 | |
1340 <p> | 1336 <p> |
1341 Function to instantiate a MicroPython device object. | 1337 Function to instantiate a MicroPython device object. |
1342 </p> | 1338 </p> |
1339 | |
1343 <dl> | 1340 <dl> |
1344 | 1341 |
1345 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> | 1342 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> |
1346 <dd> | 1343 <dd> |
1347 reference to the main MicroPython widget | 1344 reference to the main MicroPython widget |
1383 <hr /> | 1380 <hr /> |
1384 <hr /> | 1381 <hr /> |
1385 <a NAME="eraseFlash" ID="eraseFlash"></a> | 1382 <a NAME="eraseFlash" ID="eraseFlash"></a> |
1386 <h2>eraseFlash</h2> | 1383 <h2>eraseFlash</h2> |
1387 <b>eraseFlash</b>(<i>port</i>) | 1384 <b>eraseFlash</b>(<i>port</i>) |
1388 | |
1389 <p> | 1385 <p> |
1390 Slot to erase the device flash memory. | 1386 Slot to erase the device flash memory. |
1391 </p> | 1387 </p> |
1388 | |
1392 <dl> | 1389 <dl> |
1393 | 1390 |
1394 <dt><i>port</i> (str)</dt> | 1391 <dt><i>port</i> (str)</dt> |
1395 <dd> | 1392 <dd> |
1396 name of the serial port device to be used | 1393 name of the serial port device to be used |
1400 <hr /> | 1397 <hr /> |
1401 <hr /> | 1398 <hr /> |
1402 <a NAME="flashAddonFirmware" ID="flashAddonFirmware"></a> | 1399 <a NAME="flashAddonFirmware" ID="flashAddonFirmware"></a> |
1403 <h2>flashAddonFirmware</h2> | 1400 <h2>flashAddonFirmware</h2> |
1404 <b>flashAddonFirmware</b>(<i>port</i>) | 1401 <b>flashAddonFirmware</b>(<i>port</i>) |
1405 | |
1406 <p> | 1402 <p> |
1407 Slot to flash some additional firmware images. | 1403 Slot to flash some additional firmware images. |
1408 </p> | 1404 </p> |
1405 | |
1409 <dl> | 1406 <dl> |
1410 | 1407 |
1411 <dt><i>port</i> (str)</dt> | 1408 <dt><i>port</i> (str)</dt> |
1412 <dd> | 1409 <dd> |
1413 name of the serial port device to be used | 1410 name of the serial port device to be used |
1417 <hr /> | 1414 <hr /> |
1418 <hr /> | 1415 <hr /> |
1419 <a NAME="flashPythonFirmware" ID="flashPythonFirmware"></a> | 1416 <a NAME="flashPythonFirmware" ID="flashPythonFirmware"></a> |
1420 <h2>flashPythonFirmware</h2> | 1417 <h2>flashPythonFirmware</h2> |
1421 <b>flashPythonFirmware</b>(<i>port</i>) | 1418 <b>flashPythonFirmware</b>(<i>port</i>) |
1422 | |
1423 <p> | 1419 <p> |
1424 Slot to flash a MicroPython firmware to the device. | 1420 Slot to flash a MicroPython firmware to the device. |
1425 </p> | 1421 </p> |
1422 | |
1426 <dl> | 1423 <dl> |
1427 | 1424 |
1428 <dt><i>port</i> (str)</dt> | 1425 <dt><i>port</i> (str)</dt> |
1429 <dd> | 1426 <dd> |
1430 name of the serial port device to be used | 1427 name of the serial port device to be used |