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 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: diff --git a/content/tutorials/all/ota.md b/content/tutorials/all/ota.md index 0690a7d..49aad5b 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,23 @@ 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/). +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() +``` + +In order to check your software version, do: + +``` +import os +os.uname().release +``` \ No newline at end of file