From ed7a96beefd68c6c4f54852709527ec48dc24e4c Mon Sep 17 00:00:00 2001 From: iwahdan88 Date: Wed, 11 Sep 2019 18:13:53 +0200 Subject: [PATCH 1/4] Added OTA via FTP method documentation --- content/tutorials/all/ota.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/content/tutorials/all/ota.md b/content/tutorials/all/ota.md index 0690a7d..b897c1e 100644 --- a/content/tutorials/all/ota.md +++ b/content/tutorials/all/ota.md @@ -10,7 +10,7 @@ aliases: Pycom modules come with the ability to update the devices firmware, while it is still running, we call this an "over the air" (OTA) update. The [`pycom`](/firmwareapi/pycom/pycom) library provides several functions to achieve this. This example will demonstrate how you could potentially use this functionality to update deployed devices. The full source code of this example can be found [here](https://github.com/pycom/pycom-libraries/tree/master/examples/OTA). -## Method +## Method A Here we will describe one possible update methodology you could use that is implemented by this example. @@ -211,4 +211,22 @@ while True: sleep(5) ``` +## Method B +OTA software updates can be performed through the FTP server. Download the appropriate .tar.gz file for the Firmware you want to upgrade/downgrade to from [here](https://docs.pycom.io/advance/downgrade/). +ertact the application bin file eg (wipy.bin) for WiPy, rename that file to ``appimg.bin`` Upload the ``appimg.bin`` file +to: ``/flash/sys/appimg.bin``. +once the file is succesfully transfered through the FTP server, the upload is complete and the ``appimg.bin`` file will be automatically deleted. + +To boot up from the new Firmware just reset the device via Reset button or via reset Command: + + >>> import machine + >>> machine.reset() + + +In order to check your software version, do: + +```python +import os +os.uname().release +``` \ No newline at end of file From 27e717b75d389681688fe65e8dcc958416acb8d6 Mon Sep 17 00:00:00 2001 From: iwahdan88 Date: Wed, 11 Sep 2019 18:33:17 +0200 Subject: [PATCH 2/4] Micor update to OTA --- content/tutorials/all/ota.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/content/tutorials/all/ota.md b/content/tutorials/all/ota.md index b897c1e..49aad5b 100644 --- a/content/tutorials/all/ota.md +++ b/content/tutorials/all/ota.md @@ -214,19 +214,20 @@ while True: ## Method B OTA software updates can be performed through the FTP server. Download the appropriate .tar.gz file for the Firmware you want to upgrade/downgrade to from [here](https://docs.pycom.io/advance/downgrade/). -ertact the application bin file eg (wipy.bin) for WiPy, rename that file to ``appimg.bin`` Upload the ``appimg.bin`` file -to: ``/flash/sys/appimg.bin``. -once the file is succesfully transfered through the FTP server, the upload is complete and the ``appimg.bin`` file will be automatically deleted. +extract the application bin file eg. (wipy.bin) for WiPy, rename that file to ``appimg.bin`` Upload the ``appimg.bin`` file +to: ``/flash/sys/appimg.bin`` via your FTP client. +once the file is succesfully transfered through the FTP server, the Firmware upgrade is complete and the ``appimg.bin`` file will be automatically deleted. To boot up from the new Firmware just reset the device via Reset button or via reset Command: - >>> import machine - >>> machine.reset() - +``` +import machine +machine.reset() +``` In order to check your software version, do: -```python +``` import os os.uname().release ``` \ No newline at end of file From 073daf1300509031681885efdd1f140d887c7f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9za=20Husi?= Date: Fri, 13 Sep 2019 13:18:29 +0200 Subject: [PATCH 3/4] PYFW-247: Add MicroPython API for setting BLE tx Power Level --- content/firmwareapi/pycom/network/bluetooth/_index.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/content/firmwareapi/pycom/network/bluetooth/_index.md b/content/firmwareapi/pycom/network/bluetooth/_index.md index 8cce3d9..953b37b 100644 --- a/content/firmwareapi/pycom/network/bluetooth/_index.md +++ b/content/firmwareapi/pycom/network/bluetooth/_index.md @@ -255,6 +255,15 @@ bluetooth.service('abc123') Closes the BLE connection with the client. +### bluetooth.tx\_power(type, level) + +Gets or sets the TX Power level. +If called with only `type` parameter it returns with the current value belonging to the given type. +If both `type` and `level` parameters are given, it sets the TX Power. + +Valid values for `type`: `Bluetooth.TX_PWR_CONN` -> for handling connection, `Bluetooth.TX_PWR_ADV` -> for advertising, `Bluetooth.TX_PWR_SCAN` -> for scan, `Bluetooth.TX_PWR_DEFAULT` -> default, if others not set +Valid values for `level`: Bluetooth.TX_PWR_N12` -> -12dbm, `Bluetooth.TX_PWR_N9` -> -9dbm, `Bluetooth.TX_PWR_N6` -> -6dbm, `Bluetooth.TX_PWR_N3` -> -3dbm, `Bluetooth.TX_PWR_0` -> 0dbm, `Bluetooth.TX_PWR_P3` -> 3dbm, `Bluetooth.TX_PWR_P6` -> 6dbm, `Bluetooth.TX_PWR_P9` -> 9dbm + ## Constants * Bluetooth mode: `Bluetooth.BLE` @@ -265,6 +274,8 @@ Closes the BLE connection with the client. * Characteristic properties (bit values that can be combined): `Bluetooth.PROP_BROADCAST`, `Bluetooth.PROP_READ`, `Bluetooth.PROP_WRITE_NR`, `Bluetooth.PROP_WRITE`, `Bluetooth.PROP_NOTIFY`, `Bluetooth.PROP_INDICATE`, `Bluetooth.PROP_AUTH`, `Bluetooth.PROP_EXT_PROP` * Characteristic callback events: `Bluetooth.CHAR_READ_EVENT`, `Bluetooth.CHAR_WRITE_EVENT`, `Bluetooth.NEW_ADV_EVENT`, `Bluetooth.CLIENT_CONNECTED`, `Bluetooth.CLIENT_DISCONNECTED`, `Bluetooth.CHAR_NOTIFY_EVENT` * Antenna type: `Bluetooth.INT_ANT`, `Bluetooth.EXT_ANT` +* TX Power type: `Bluetooth.TX_PWR_CONN`, `Bluetooth.TX_PWR_ADV`, `Bluetooth.TX_PWR_SCAN`, `Bluetooth.TX_PWR_DEFAULT` +* TX Power level: `Bluetooth.TX_PWR_N12`, `Bluetooth.TX_PWR_N9`, `Bluetooth.TX_PWR_N6`, `Bluetooth.TX_PWR_N3`, `Bluetooth.TX_PWR_0`, `Bluetooth.TX_PWR_P3`, `Bluetooth.TX_PWR_P6`, `Bluetooth.TX_PWR_P9` ## Exceptions From 2a328a1d882376302245d3947d12709f32a65c21 Mon Sep 17 00:00:00 2001 From: iwahdan88 Date: Tue, 24 Sep 2019 10:44:51 +0200 Subject: [PATCH 4/4] [PYFW-315] Updated Docs for smart Config --- content/firmwareapi/pycom/network/wlan.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/content/firmwareapi/pycom/network/wlan.md b/content/firmwareapi/pycom/network/wlan.md index 9139805..1cdaab5 100644 --- a/content/firmwareapi/pycom/network/wlan.md +++ b/content/firmwareapi/pycom/network/wlan.md @@ -328,6 +328,10 @@ This function is used to set the filter mask for Wifi control packets in promisc To get the current Filter mask, call the function with empty args. +### wlan.smartConfig() + +Start Smart Config process for provessioning Wifi ssid/pwd + ## Constants * WLAN mode: `WLAN.STA`, `WLAN.AP`, `WLAN.STA_AP` @@ -353,6 +357,10 @@ To get the current Filter mask, call the function with empty args. `WLAN.EVENT_PKT_MISC`: misc paket recieved in promiscuous mode. `WLAN.EVENT_PKT_ANY`: Any packet recieved in promiscuous mode. + + `SMART_CONF_DONE`: Smart Config of wifi ssid/pwd Finished + + `SMART_CONF_TIEMOUT`: Smart Config of wifi ssid/pwd timed-out * Control packet filters in promiscuous mode: