mirror of
https://github.com/sascha-hemi/pycom-documentation.git
synced 2026-03-21 16:06:43 +01:00
fix on alert info
This commit is contained in:
@@ -79,7 +79,7 @@ The CLI tool uses a combination of global and command specific parameters. The *
|
||||
While `pycom-fwtool-cli -h` shows help for global parameters and a list of available commands, command specific parameters can be viewed using `pycom-fwtool-cli [command] -h`
|
||||
|
||||
The parameter `-r, --reset` has been added as a courtesy for users of 3rd party ESP32 products. This functionality is **not supported** by the Expansion Board 2.0 and may cause this tool to crash or hang in certain circumstances.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
### Global Parameters
|
||||
|
||||
@@ -132,7 +132,7 @@ All other commands require that **the serial port is specified either through th
|
||||
#### Special note for Expansion Board 2.0
|
||||
|
||||
You will need to have a **jumper wire** connected between `G23` and `GND` to use any of the commands below. You will also need to **press the reset button** either before running each command or at least before running the first command. To avoid having to press the reset button again after each command, you can use the `-c` / `--continuation` option. The first command connecting to the device **MUST NOT** use the `-c` / `--continuation` option. This is to make sure a program called `_stub_` is uploaded onto the device. This `_stub_` cannot be uploaded more than once, so you need to tell the cli tool that the `_stub_` is already running, which is done through using the `-c` / `--continuation` option.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### chip\_id
|
||||
|
||||
@@ -267,7 +267,7 @@ optional arguments:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Note: The local `pybytes_config.json` file is overwritten when making any modifications using this command (requires Pybytes firmware `1.17.5.b6` or higher and Firmware updater `1.14.3`).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### cb
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ The firmware upgrade tool usually updates your device to the latest available fi
|
||||
|
||||
{{% hint style="info" %}}
|
||||
If you are using an Expansion Board 1.0 or 2.0, you will need to have a jumper connected between `G23` and `GND` to use either procedure below. You will also need to press the reset button before beginning.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
You can obtain previous firmware versions here:
|
||||
|
||||
@@ -24,7 +24,7 @@ You can obtain previous firmware versions here:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Prior to version `1.16.0.b1` the firmware for modules with LoRa functionality was frequency specific. From `1.16.0.b1` and onward, the firmware is region agnostic and this can either be set programatically or via the config block (see [here](../cli.md#lpwan)).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## GUI
|
||||
|
||||
|
||||
@@ -105,5 +105,5 @@ Because the encryption is done based on the physical flash address, there are 2
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Hint: on MicroPython interface, the method `pycom.ota_slot()` responds with the address of the next OTA partition available (either `0x10000` or `0x1A0000`).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ The pinout of the Deep Sleep Shield is available as a PDF File
|
||||
|
||||
{{% hint style="info" %}}
|
||||
To correctly connect a WiPy 2.0, LoPy or SiPy to the Deep Sleep Shield, align the white triangle on the Shield with the LED of the Pycom Device. Once the Pycom Device is seated onto the Deep Sleep Shield, this can then be connected to the Expansion Board
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ The pinout of the Deep Sleep Shield is available as a PDF File
|
||||
|
||||
{{% hint style="info" %}}
|
||||
To correctly connect a WiPy 2.0, LoPy or SiPy to the Deep Sleep Shield, align the white triangle on the Shield with the LED of the Pycom Device. Once the Pycom Device is seated onto the Deep Sleep Shield, this can then be connected to the Expansion Board
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -101,4 +101,4 @@ This method resets the PIC controller and resets it to the state previous to the
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that more functionality is being added weekly to these libraries. If a required feature is not available, feel free to contribute with a pull request at the [Pycom Libraries](https://github.com/pycom/pycom-libraries) GitHub repository.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
@@ -26,7 +26,7 @@ The pinout of the Expansion Board is available as a PDF File
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Be gentle when plugging/unplugging from the USB connector. Whilst the USB connector is soldered and is relatively strong, if it breaks off it can be very difficult to fix.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Battery Charger
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ The pinout of the Expansion Board is available as a PDF File
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Be gentle when plugging/unplugging from the USB connector. Whilst the USB connector is soldered and is relatively strong, if it breaks off it can be very difficult to fix.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Battery Charger
|
||||
|
||||
@@ -33,7 +33,7 @@ The Expansion Board features a single cell Li-Ion/Li-Po charger. When the board
|
||||
|
||||
{{% hint style="info" %}}
|
||||
To use the battery, pull `P8/G15` high (connect to `3v3`). If you want to use the SD card as well, use a 10k pull-up.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Differences between v2.0 and v3.0
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ The datasheet of the Pyscan is available as a PDF File.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
For the time being, we recommend to upload the `MFRC630.mpy` file via FTP due to current limitations of Pymakr that will be fixed shortly.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
Libraries for the rest of the components will be added soon.
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ aliases:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please Note: We have removed the labels from the pictures in the documentation due to inconsistencies with label orientation. *The LED must be aligned above the USB socket* when inserting or removing a development board from an expansion board/Pytrack/Pysense/Pyscan.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
**Store**: [Buy Here](https://pycom.io/product/fipy/)
|
||||
@@ -39,7 +39,7 @@ The pinout of the FiPy is available as a PDF File
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 (TX1/RX1), SPI (CLK, MOSI, MISO) and I2C (SDA, SCL) are defaults and can be changed in Software.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ aliases:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please Note: We have removed the labels from the pictures in the documentation due to inconsistencies with label orientation. *The LED must be aligned above the USB socket* when inserting or removing a development board from an expansion board/Pytrack/Pysense/Pyscan.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
**Store**: [Buy Here](https://pycom.io/product/gpy)
|
||||
|
||||
@@ -21,7 +21,7 @@ aliases:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please Note: We have removed the labels from the pictures in the documentation due to inconsistencies with label orientation. *The LED must be aligned above the USB socket* when inserting or removing a development board from an expansion board/Pytrack/Pysense/Pyscan.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
The datasheet of the GPy is available as a PDF File.
|
||||
@@ -42,7 +42,7 @@ The pinout of the GPy is available as a PDF File
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 (TX1/RX1), SPI (CLK, MOSI, MISO) and I2C (SDA, SCL) are defaults and can be changed in Software.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ aliases:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please Note: We have removed the labels from the pictures in the documentation due to inconsistencies with label orientation. *The LED must be aligned above the USB socket* when inserting or removing a development board from an expansion board/Pytrack/Pysense/Pyscan.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
**Store**: [Buy Here](https://pycom.io/product/lopy)
|
||||
@@ -34,7 +34,7 @@ The pinout of the LoPy is available as a PDF File
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 (TX1/RX1), SPI (CLK, MOSI, MISO) and I2C (SDA, SCL) are defaults and can be changed in Software.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ aliases:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please Note: We have removed the labels from the pictures in the documentation due to inconsistencies with label orientation. *The LED must be aligned above the USB socket* when inserting or removing a development board from an expansion board/Pytrack/Pysense/Pyscan.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
**Store**: [Buy Here](https://pycom.io/product/lopy4/)
|
||||
@@ -35,7 +35,7 @@ The pinout of the LoPy4 is available as a PDF File
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 (TX1/RX1), SPI (CLK, MOSI, MISO) and I2C (SDA, SCL) are defaults and can be changed in Software.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ aliases:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please Note: We have removed the labels from the pictures in the documentation due to inconsistencies with label orientation. *The LED must be aligned above the USB socket* when inserting or removing a development board from an expansion board/Pytrack/Pysense/Pyscan.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ The pinout of the SiPy is available as a PDF File
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 (TX1/RX1), SPI (CLK, MOSI, MISO) and I2C (SDA, SCL) are defaults and can be changed in Software.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ aliases:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please Note: We have removed the labels from the pictures in the documentation due to inconsistencies with label orientation. *The LED must be aligned above the USB socket* when inserting or removing a development board from an expansion board/Pytrack/Pysense/Pyscan.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
**Store**: Discontinued, See [WiPy3](../wipy3)
|
||||
@@ -36,7 +36,7 @@ The pinout of the WiPy2 is available as a PDF File.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 (TX1/RX1), SPI (CLK, MOSI, MISO) and I2C (SDA, SCL) are defaults and can be changed in Software.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ aliases:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please Note: We have removed the labels from the pictures in the documentation due to inconsistencies with label orientation. *The LED must be aligned above the USB socket* when inserting or removing a development board from an expansion board/Pytrack/Pysense/Pyscan.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
**Store**: [Buy Here](https://pycom.io/product/wipy-3-0/)
|
||||
@@ -34,7 +34,7 @@ The pinout of the WiPy3 is available as a PDF File.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 (TX1/RX1), SPI (CLK, MOSI, MISO) and I2C (SDA, SCL) are defaults and can be changed in Software.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Differences from WiPy 2.0
|
||||
|
||||
|
||||
@@ -19,15 +19,15 @@ When powering via `VIN`:
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Please **DO NOT** power the board via the `3.3V` pin as this may damage the device. ONLY use the `VIN` pin for powering Pycom devices.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
The battery connector for the Expansion Board is a **JST PHR-2** variant. The Expansion Board exposes the male connector and an external battery should use a female adapter in order to connect and power the expansion board. The polarity of the battery should be checked before being plugged into the expansion board, the cables may require swapping.
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
The `GPIO` pins of the modules are **NOT** `5V` tolerant, connecting them to voltages higher than `3.3V` might cause irreparable damage to the device.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Static electricity can damage components on the device and may destroy them. If there is a lot of static electricity in the area (e.g. dry and cold climates), take extra care not to shock the device. If the device came in a ESD bag (Silver packaging), the best way to store and carry the device is inside this bag as it will be protected against static discharges.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ The drawings for the G01 is available as a PDF File.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 (TX1/RX1), SPI (CLK, MOSI, MISO) and I2C (SDA, SCL) are defaults and can be changed in Software.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## AT Commands
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ The drawings for the L01 is available as a PDF File.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 (TX1/RX1), SPI (CLK, MOSI, MISO) and I2C (SDA, SCL) are defaults and can be changed in Software.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Tutorials
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ The L01 OEM reference board is a reference design suitable L01 as well as W01 ma
|
||||
|
||||
{{% hint style="info" %}}
|
||||
If you require a reference board for the L04 or G01, this design is **not** suitable as it does not feature a SIM slot or the double antenna connection. For the G01 or L04 please use the [Universal OEM Baseboard Reference](../universal_reference)
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Features
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ The drawings for the L04 is available as a PDF File.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 (TX1/RX1), SPI (CLK, MOSI, MISO) and I2C (SDA, SCL) are defaults and can be changed in Software.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
## Power Consumption
|
||||
|
||||
@@ -13,7 +13,7 @@ The universal OEM reference board is a reference design suitable W01, L01, L04 a
|
||||
|
||||
{{% hint style="info" %}}
|
||||
If you require a reference board for the G01, only this design is suitable. The L01 reference board does not contain the necessary SIM slot.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Features
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ The drawings for the W01 is available as a PDF File.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the PIN assignments for UART1 (TX1/RX1), SPI (CLK, MOSI, MISO) and I2C (SDA, SCL) are defaults and can be changed in Software.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Tutorials
|
||||
|
||||
|
||||
@@ -107,5 +107,5 @@ I2C.MASTER()
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Be aware that you can only reference these constants upon importing and constructing a object from a library.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -9,5 +9,5 @@ The standard Python libraries have been "micro-ified" to fit in with the philoso
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Some modules are available by an u-name, and also by their non-u-name. The non-u-name can be overridden by a file of that name in your package path. For example, `import json` will first search for a file `json.py` or directory `json` and load that package if it's found. If nothing is found, it will fallback to loading the built-in `ujson` module.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -9,5 +9,5 @@ The standard Python libraries have been "micro-ified" to fit in with the philoso
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Some modules are available by an u-name, and also by their non-u-name. The non-u-name can be overridden by a file of that name in your package path. For example, `import json` will first search for a file `json.py` or directory `json` and load that package if it's found. If nothing is found, it will fallback to loading the built-in `ujson` module.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Print exception with a traceback to a file-like object file (or `sys.stdout` by
|
||||
**Difference to CPython**
|
||||
|
||||
This is simplified version of a function which appears in the traceback module in CPython. Unlike `traceback.print_exception()`, this function takes just exception value instead of exception type, exception value, and traceback object; file argument should be positional; further arguments are not supported. CPython-compatible traceback module can be found in `micropython-lib`.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Constants
|
||||
|
||||
@@ -36,7 +36,7 @@ This is simplified version of a function which appears in the traceback module i
|
||||
**Difference to CPython**
|
||||
|
||||
CPython mandates more attributes for this object, but the actual useful bare minimum is implemented in MicroPython.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
* `sys.maxsize`: Maximum value which a native integer type can hold on the current platform, or maximum value representable by MicroPython integer type, if it's smaller than platform max value (that is the case for MicroPython ports without long int support).
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Convert binary data to hexadecimal representation. Returns bytes string.
|
||||
**Difference to CPython**
|
||||
|
||||
If additional argument, `sep` is supplied, it is used as a separator between hexadecimal values.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### ubinascii.unhexlify(data)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ The parameter `bits` is rounded upwards to the nearest multiple of 32 bits.
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Cryptography is not a trivial business. Doing things the wrong way could quickly result in decreased or no security. Please document yourself in the subject if you are depending on encryption to secure important information.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### crypto.generate\_rsa\_signature(message, private_key, \*, pers="esp32-tls")
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ This module implements "foreign data interface" for MicroPython. The idea behind
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Module ustruct Standard Python way to access binary data structures (doesn't scale well to large and complex structures).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Defining Structure Layout
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ Bind the `socket` to `address`. The socket must not already be bound. The `addre
|
||||
|
||||
{{% hint style="info" %}}
|
||||
In the case of LoRa sockets, the address parameter is simply an integer with the port number, for instance: `s.bind(1)`
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### socket.listen(\[backlog\])
|
||||
|
||||
@@ -126,7 +126,7 @@ The socket must be in blocking mode; it can have a timeout, but the file object'
|
||||
**Difference to CPython**
|
||||
|
||||
Closing the file object returned by `makefile()` **WILL** close the original socket as well.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### socket.read(size)
|
||||
|
||||
|
||||
@@ -90,5 +90,5 @@ Set or get the timezone offset, in seconds. If `secs` is not provided, it return
|
||||
|
||||
{{% hint style="info" %}}
|
||||
In MicroPython, `time.timezone` works the opposite way to Python. In [Python](https://docs.python.org/3/library/time.html#time.timezone), to get the local time, you write `local_time = utc - timezone`, while in MicroPython it is `local_time = utc + timezone`.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -23,4 +23,4 @@ Create a `stream` wrapper which allows transparent decompression of compressed d
|
||||
**Difference to CPython**
|
||||
|
||||
This class is MicroPython extension. It's included on provisional basis and may be changed considerably or removed in later versions.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
@@ -18,4 +18,4 @@ Currently, there are 2 classes that support interrupts; the [`Alarm`](../pycom/m
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Currently the interrupt system can queue up to **16 interrupts**.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
@@ -10,7 +10,7 @@ AES (Advanced Encryption Standard) is a symmetric block cipher standardised by N
|
||||
|
||||
{{% hint style="info" %}}
|
||||
AES is implemented using the ESP32 hardware module.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Quick Usage Example
|
||||
|
||||
@@ -65,5 +65,4 @@ Decrypt data with the key and the parameters set at initialisation.
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
To avoid security issues, IV should always be a random number and should never be reused to encrypt two different messages. The same applies to the counter in CTR mode. You can use `crypto.getrandbits()` for this purpose.
|
||||
{{< /hint >}}
|
||||
|
||||
{{% /hint %}}
|
||||
|
||||
@@ -89,7 +89,7 @@ Returns a byte string with a unique identifier of a board/SoC. It will vary from
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Use `ubinascii.hexlify()` to convert the byte string to hexadecimal form for ease of manipulation and use elsewhere.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### machine.info()
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ Returns a byte string with a unique identifier of a board/SoC. It will vary from
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Use `ubinascii.hexlify()` to convert the byte string to hexadecimal form for ease of manipulation and use elsewhere.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### machine.info()
|
||||
|
||||
|
||||
@@ -96,4 +96,4 @@ Converts the provided value into a voltage (in millivolts) in the same way volta
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
ADC pin input range is `0-1.1V`. This maximum value can be increased up to `3.3V` using the highest attenuation of `11dB`. **Do not exceed the maximum of 3.3V**, to avoid damaging the device.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
@@ -132,7 +132,7 @@ p_in.callback(Pin.IRQ_FALLING | Pin.IRQ_RISING, pin_handler)
|
||||
|
||||
{{% hint style="info" %}}
|
||||
For more information on how Pycom's products handle interrupts, see [here](/firmwareapi/notes#interrupt-handling).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Attributes
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ Deinitialise the RMT object.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
If an RMT object needs to be reconfigured from RX/TX to TX/RX, then either first `deinit()` must be called or the `init()` again with the desired configuration.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### rmt.pulses\_get(pulses, timeout)
|
||||
|
||||
@@ -107,7 +107,7 @@ Return value: Tuple of items with the following structure: `(level, duration)`:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Maximum of 128 pulses can be received in a row without receiving "idle" signal. If the incoming pulse sequence contains more than 128 pulses the rest is dropped and the receiver waits for another sequence of pulses. The `pulses_get` function can be called to receive more than 128 pulses, however the above mentioned limitation should be kept in mind when evaluating the received data.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### rmt.pulses\_send(duration, data, start\_level)
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ rtc.init((2017, 2, 28, 10, 30, 0, 0, 0))
|
||||
|
||||
{{% hint style="info" %}}
|
||||
`tzinfo` is ignored by this method. Use `time.timezone` to achieve similar results.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### rtc.now()
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ If you have one of the Pycom expansion boards, then simply insert the card into
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Make sure your SD card is formatted either as FAT16 or FAT32.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Quick Example Usage:
|
||||
|
||||
@@ -56,4 +56,4 @@ Disable the SD card.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the SD card library currently supports FAT16/32 formatted SD cards up to 32 GB. Future firmware updates will increase compatibility with additional formats and sizes.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
@@ -16,7 +16,7 @@ These two concepts are grouped into two different subclasses:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
You can create as many of these objects as needed.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
### Constructors
|
||||
|
||||
@@ -131,4 +131,4 @@ clock = Clock()
|
||||
|
||||
{{% hint style="info" %}}
|
||||
For more information on how Pycom's products handle interrupts, see [notes](/firmwareapi/notes#interrupt-handling).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
@@ -79,7 +79,7 @@ Construct a UART object on the given `bus`. `bus` can be `0, 1 or 2`. If the `bu
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
On the GPy/FiPy UART2 is unavailable because it is used to communicate with the cellular radio.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Methods
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ To use an external antenna, set `P12 as output pin.`
|
||||
|
||||
Pin('P12', mode=Pin.OUT)(True)
|
||||
```
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
### bluetooth.deinit()
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ To use an external antenna, set `P12 as output pin.`
|
||||
|
||||
Pin('P12', mode=Pin.OUT)(True)
|
||||
```
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
### bluetooth.deinit()
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ print(data)
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Please ensure that there is an antenna connected to your device before sending/receiving LoRa messages as improper use (e.g. without an antenna), may damage the device.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Additional Examples
|
||||
|
||||
@@ -93,7 +93,7 @@ The arguments are:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
In `LoRa.LORAWAN` mode, only `adr`, `public`, `tx_retries` and `device_class` are used. All the other params will be ignored as they are handled by the LoRaWAN stack directly. On the other hand, in `LoRa.LORA` mode from those 4 arguments, only the public one is important in order to program the sync word. In `LoRa.LORA` mode `adr`, `tx_retries` and `device_class` are ignored since they are only relevant to the LoRaWAN stack.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
For example, you can do:
|
||||
|
||||
@@ -444,7 +444,7 @@ s.bind(1)
|
||||
|
||||
{{% hint style="info" %}}
|
||||
The `bind()` method is only applicable when the radio is configured in `LoRa.LORAWAN` mode.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### socket.send(bytes)
|
||||
|
||||
@@ -500,7 +500,7 @@ s.setsockopt(socket.SOL_LORA, socket.SO_CONFIRMED, True)
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Socket options are only applicable when the LoRa radio is used in LoRa.LORAWAN mode. When using the radio in LoRa.LORA mode, use the class methods to change the spreading factor, bandwidth and coding rate to the desired values.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### socket.settimeout(value)
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ print(data)
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Please ensure that there is an antenna connected to your device before sending/receiving LoRa messages as improper use (e.g. without an antenna), may damage the device.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Additional Examples
|
||||
|
||||
@@ -88,7 +88,7 @@ The arguments are:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
In `LoRa.LORAWAN` mode, only `adr`, `public`, `tx_retries` and `device_class` are used. All the other params will be ignored as they are handled by the LoRaWAN stack directly. On the other hand, in `LoRa.LORA` mode from those 4 arguments, only the public one is important in order to program the sync word. In `LoRa.LORA` mode `adr`, `tx_retries` and `device_class` are ignored since they are only relevant to the LoRaWAN stack.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
For example, you can do:
|
||||
|
||||
@@ -432,7 +432,7 @@ LoRa-Mesh socket is created, if the Mesh was enabled before (`lora.mesh()` was c
|
||||
|
||||
{{% hint style="info" %}}
|
||||
The LoRa-Mesh socket supports only the following socket methods: `close()` , `bind()`, `sendto()`, and `recvfrom()`.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
LoRa sockets support the following standard methods from the socket module:
|
||||
|
||||
@@ -454,7 +454,7 @@ s.bind(1)
|
||||
|
||||
{{% hint style="info" %}}
|
||||
The `bind()` method is only applicable when the radio is configured in `LoRa.LORAWAN` mode.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### socket.send(bytes)
|
||||
|
||||
@@ -515,7 +515,7 @@ s.setsockopt(socket.SOL_LORA, socket.SO_CONFIRMED, True)
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Socket options are only applicable when the LoRa radio is used in LoRa.LORAWAN mode. When using the radio in LoRa.LORA mode, use the class methods to change the spreading factor, bandwidth and coding rate to the desired values.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### socket.settimeout(value)
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ Pymesh sockets is created, if the Mesh was enabled before (`lora.Mesh()` was cal
|
||||
|
||||
{{% hint style="info" %}}
|
||||
The Pymesh sockets supports only the following socket methods: `close()` , `bind()`, `sendto()`, and `recvfrom()`.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
LoRa sockets support the following standard methods from the socket module:
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ The GPy and FiPy support both new LTE-M protocols:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
**Please note:** The GPy and FiPy only support the two protocols above and are not compatible with older LTE standards.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
{{% hint style="info" %}}
|
||||
The Sequans modem used on Pycom's cellular enabled modules can only work in one of these modes at a time. In order to switch between the two protocols you need to flash a different firmware to the Sequans modem. Instructions for this can be found [here](/tutorials/lte/firmware).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
{{% hint style="info" %}}
|
||||
|
||||
@@ -33,7 +33,7 @@ The Sequans modem used on Pycom's cellular enabled modules can only work in one
|
||||
|
||||
- Fipy/GPy v1.2 with Sequans old modem Firmwares < (39xxx)==> Supports 6 Bands (3, 4, 12, 13, 20, 28)
|
||||
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## AT Commands
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ for i in range(1, 100):
|
||||
```
|
||||
|
||||
There will be a 20 second delay after every 2 packets.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
This class provides a driver for the Sigfox network processor in the Sigfox enabled Pycom devices.
|
||||
|
||||
@@ -50,7 +50,7 @@ s.send(bytes([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]))
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Please ensure that there is an antenna connected to your device before sending/receiving Sigfox messages as in proper use (e.g. without an antenna), may damage the device.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Constructors
|
||||
|
||||
@@ -69,7 +69,7 @@ sigfox = Sigfox(mode=Sigfox.FSK, frequency=912000000)
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Sigfox.FSK mode is not supported on LoPy 4 and FiPy.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -85,7 +85,7 @@ The arguments are:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
The SiPy comes in 2 different hardware flavours: a +14dBm Tx power version which can only work with `RCZ1` and `RCZ3` and a +22dBm version which works exclusively on `RCZ2` and `RCZ4`.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### sigfox.mac()
|
||||
|
||||
@@ -110,7 +110,7 @@ To return human-readable values you should import `ubinascii` and convert binary
|
||||
|
||||
print(ubinascii.hexlify(sigfox.mac()))
|
||||
```
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### sigfox.frequencies()
|
||||
|
||||
@@ -261,7 +261,7 @@ To communicate between two Sigfox capable devices, it may be used in FSK mode. T
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Sigfox.FSK mode is not supported on LoPy 4 and FiPy.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
**Device 1**:
|
||||
|
||||
@@ -295,5 +295,5 @@ while True:
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Remember to use the correct frequency for your region (868 MHz for Europe, 912 MHz for USA, etc.)
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ Create a WLAN object, and optionally configure it. See [`init`](../wlan.md#wlan-
|
||||
|
||||
{{% hint style="info" %}}
|
||||
The WLAN constructor is special in the sense that if no arguments besides the `id` are given, it will return the already existing WLAN instance without re-configuring it. This is because WLAN is a system feature of the WiPy. If the already existing instance is not initialised it will do the same as the other constructors an will initialise it with default values.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -93,7 +93,7 @@ To use an external antenna, set `P12 as output pin.`
|
||||
|
||||
Pin('P12', mode=Pin.OUT)(True)
|
||||
```
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### wlan.deinit()
|
||||
|
||||
@@ -115,7 +115,7 @@ Connect to a wifi access point using the given SSID, and other security paramete
|
||||
|
||||
{{% hint style="info" %}}
|
||||
The ESP32 only handles certificates with `pkcs8` format (but not the "Traditional SSLeay RSAPrivateKey" format). The private key should be RSA coded with 2048 bits at maximum.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### wlan.scan()
|
||||
|
||||
@@ -171,7 +171,7 @@ To use an external antenna, set `P12 as output pin.`
|
||||
|
||||
Pin('P12', mode=Pin.OUT)(True)
|
||||
```
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### wlan.mac()
|
||||
|
||||
|
||||
@@ -32,4 +32,4 @@ Now that you familiar with programming your device you will no doubt be keen to
|
||||
|
||||
{{% hint style="info" %}}
|
||||
You can navigate through this guide using the arrow buttons at the bottom of the page.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
@@ -115,11 +115,11 @@ aliases:
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
If you intend on using the LoRa/Sigfox connectivity of the FiPy you **must** connect a LoRa/Sigfox antenna to your FiPy before trying to use LoRa/Sigfox otherwise you risk damaging the device.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
{{% hint style="info" %}}
|
||||
The FiPy only supports LoRa on the 868MHz or 915MHz bands. It does not support 433MHz. For this you will require a LoPy4.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
* Firstly you will need to connect the U.FL to SMA pig tail to the FiPy using the U.FL connector on the same side of the FiPy as the LED.
|
||||
|
||||
@@ -134,7 +134,7 @@ The FiPy only supports LoRa on the 868MHz or 915MHz bands. It does not support 4
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
If you intend on using the LTE CAT-M1 or NB-IoT connectivity of the FiPy you **must** connect a LTE CAT-M1/NB-IoT antenna to your FiPy before trying to use LTE Cat-M1 or NB-IoT otherwise you risk damaging the device.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
* You will need to connect the antenna to the FiPy using the U.FL connector on the under side of the FiPy.
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ aliases:
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
If you intend on using the LTE CAT-M1 or NB-IoT connectivity of the GPy you **must** connect a LTE CAT-M1/NB-IoT antenna to your GPy before trying to use LTE Cat-M1 or NB-IoT otherwise you risk damaging the device.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
* You will need to connect the antenna to the GPy using the U.FL connector on the same side of the GPy as the LED.
|
||||
|
||||
|
||||
@@ -115,11 +115,11 @@ aliases:
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
If you intend on using the LoRa connectivity of the LoPy you **must** connect a LoRa antenna to your LoPy before trying to use LoRa otherwise you risk damaging the device.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
The LoPy only supports LoRa on the 868MHz or 915MHz bands. It does not support 433MHz. For this you will require a LoPy4.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
* Firstly you will need to connect the U.FL to SMA pig tail to the LoPy using the U.FL connector on the same side of the LoPy as the LED.
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ aliases:
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
If you intend on using the LoRa/Sigfox connectivity of the LoPy4 you **must** connect a LoRa/Sigfox antenna to your LoPy4 before trying to use LoRa/Sigfox otherwise you risk damaging the device.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
* Firstly you will need to connect the U.FL to SMA pig tail to the LoPy4 using one of the two the U.FL connectors on the same side of the LoPy4 as the LED. The one on the left hand side is for 433MHz (LoRa only), the one of the right hand side is for 868MHz/915MHz (LoRa & Sigfox). **Note:** This is different from the LoPy.
|
||||
|
||||
@@ -128,7 +128,7 @@ If you intend on using the LoRa/Sigfox connectivity of the LoPy4 you **must** co
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Since the LoRa chip only runs on one frequency band at a time you only need to connect an antenna to the appropriate U.FL connecor. You should be supplied with a the antenna that suits the band you intend using.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
### WiFi/Bluetooth (optional)
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ Please ensure you have the signal level of the UART adapter set to
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
If you intend on using the Sigfox connectivity of the SiPy you **must** connect a Sigfox antenna to your SiPy before trying to use Sigfox otherwise you risk damaging the device.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
* Firstly you will need to connect the U.FL to SMA pig tail to the SiPy using the U.FL connector on the same side of the SiPy as the LED.
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Here are the download links to the update tool. Please download the appropriate
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Previous versions of firmware are available for download [**here**](/advance/downgrade).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Updating Device Firmware
|
||||
|
||||
|
||||
@@ -119,5 +119,5 @@ print(pycom_devices[0]) # expect 'wipy'
|
||||
|
||||
{{% hint style="info" %}}
|
||||
For more Python examples, check out these [tutorials](https://www.tutorialspoint.com/python3/). Be aware of the implementation differences between MicroPython and Python 3.5.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ If you are using Atom, it is important to check at this point that Atom has succ
|
||||

|
||||
|
||||
If this is not the case you can press `alt-ctrl-r` on Windows/Linux or `ctrl-alt-cmd-l` on macOS, in order to reload Atom and fix the issue.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
4. Now that you have a project created, we need to add some files to it. A standard MicroPython project has the following structure:
|
||||
|
||||
|
||||
@@ -28,5 +28,5 @@ Micropython also has a number of Micropython specific libraries for accessing ha
|
||||
Micropython, unlike C/C++ or Arduino, **does not use braces {} to indicate blocks of code** specified for class and function definitions or flow control. Blocks of code are denoted by line indentation, which is strictly enforced.
|
||||
|
||||
The number of spaces in the indentation is variable but all statements within a block must be indented the same amount.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -24,5 +24,5 @@ There are a number of useful shortcuts for interacting with the MicroPython REPL
|
||||
* `Ctrl-D` on a blank line will do a soft reset.
|
||||
* `Ctrl-E` enters ‘paste mode' that allows you to copy and paste chunks of text. Exit this mode using `Ctrl-D`.
|
||||
* `Ctrl-F` performs a "safe-boot" of the device that prevents `boot.py` and `main.py` from executing
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -23,5 +23,5 @@ There are a number of useful shortcuts for interacting with the MicroPython REPL
|
||||
* `Ctrl-D` on a blank line will do a soft reset.
|
||||
* `Ctrl-E` enters ‘paste mode' that allows you to copy and paste chunks of text. Exit this mode using `Ctrl-D`.
|
||||
* `Ctrl-F` performs a "safe-boot" of the device that prevents `boot.py` and `main.py` from executing
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ This will allow screen to exited by pressing `CTRL-A Q`.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
On Linux, `picocom` or `minicom` may be used instead of `screen`. The usb serial address might also be listed as `/dev/ttyUSB01` or a higher increment for `ttyUSB`. Additionally, the elevated permissions to access the device (e.g. group uucp/dialout or use `sudo`) may be required.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Windows
|
||||
|
||||
|
||||
@@ -43,4 +43,4 @@ A terminal emulator is needed to open a telnet connection from Windows; the easi
|
||||
|
||||
{{% hint style="info" %}}
|
||||
When using a Pycom device with a personal, home or office WiFi access point, the telnet connection may still be used. In this instance, the user will need to determine the Pycom device's local IP address and substitute this for `192.168.4.1`, referred to in the earlier sections.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
@@ -40,7 +40,7 @@ If problems occur within the filesystem or you wish to factory reset your module
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Be aware, resetting the flash filesystem will delete all files inside the internal device storage (not the SD card) and they cannot be recovered.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Reset
|
||||
|
||||
|
||||
@@ -15,5 +15,5 @@ Some of our devices require registration before you can utilise specific feature
|
||||
|
||||
{{% hint style="info" %}}
|
||||
**Not all Pycom devices require activation**; most features work immediately out of the box!
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -15,5 +15,5 @@ Some of our devices require registration before you can utilise specific feature
|
||||
|
||||
{{% hint style="info" %}}
|
||||
**Not all Pycom devices require activation**; most features work immediately out of the box!
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -41,5 +41,5 @@ With ABP the encryption keys enabling communication with the network are preconf
|
||||
|
||||
{{% hint style="info" %}}
|
||||
If you cannot find your favourite LoRaWAN network in the list above, please consider writing a tutorial for how to connect a Pycom module with it and contribute it to this documentation via a [GitHub pull request](https://github.com/pycom/pycom-documentation).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -43,4 +43,4 @@ With ABP the encryption keys enabling communication with the network are preconf
|
||||
|
||||
{{% hint style="info" %}}
|
||||
If you cannot find your favourite LoRaWAN network in the list above, please consider writing a tutorial for how to connect a Pycom module with it and contribute it to this documentation via a [GitHub pull request](https://github.com/pycom/pycom-documentation).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
@@ -18,7 +18,7 @@ Sigfox Pac is one-time activation code, which will be invalidated after device's
|
||||
Keep in mind that firmware updater will always display the same (even invalid) Sigfox Pac.
|
||||
In case of successive registration to a new account (or device type) on Sigfox Backend, you need to get Sigfox Pac from device page on Sigfox Backend.
|
||||
See [Sigfox documentation](https://support.sigfox.com/docs/device-idpac-couple) for more info.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
After first firmware update you can also get your _Sigfox ID_ and _Sigfox PAC_ through a couple of commands via the REPL.
|
||||
|
||||
@@ -53,7 +53,7 @@ Then provide the required information including email address and complete regis
|
||||
|
||||
{{% hint style="info" %}}
|
||||
When registering your other devices (not your first device), you already have created Sigfox Account before. Be sure you are login with your Sigfox account. In that way all of your devices will be added to same Sigfox Account.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Use this, if you want to have full control over the Pybytes library on your devi
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Pybytes firmware already contains [Pybytes library](https://github.com/pycom/pycom-micropython-sigfox/tree/pybytes-master/esp32/frozen/Base). That means that you can [add your device quickly](../quick) without the need of flashing Pybytes library.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
### Step 1: Flash stable firmware to your device with Pycom firmware updater tool
|
||||
1. Open Pycom firmware updater tool
|
||||
@@ -37,7 +37,7 @@ You can download _Pybytes library_ at the device's settings page:
|
||||
{{% hint style="info" %}}
|
||||
In case you haven't installed Pymakr plugin, follow [these instructions](/pymakr/installation/atom).
|
||||
We recommend to install Pymakr in Atom.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
1. Connect your device to the computer with a USB cable.
|
||||
2. Open zip archive of Pybytes library and extract a containing folder.
|
||||
|
||||
@@ -37,7 +37,7 @@ Click again on the Continue button.
|
||||
{{% hint style="info" %}}
|
||||
If your device is already connected to your computer, on MacOS serial port will be automatically filled for you.
|
||||
At this step, you can also click on Rescan ports button to update ports listed in the Firmware updater.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
Check the options "Erase flash file system" and "Force update Pybytes registration";
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ aliases:
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Before you start you need to create Sigfox account. You need Pycom device with Sigfox to get your Sigfox account. [**Follow these instructions**](../..//gettingstarted/registration/sigfox).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Create Sigfox API credentials
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ aliases:
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Before you start you need to create Sigfox account. You need Pycom device with Sigfox to get your Sigfox account. [**Follow these instructions**](/gettingstarted/registration/sigfox).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Create Sigfox API credentials
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ and select Sigfox device type which is associated with Sigfox custom contract.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Detailed steps which are same for all devices are [**described here**](../../quick).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
After your device was flashed with Pybytes firmware in automatically start adding itself to Sigfox backend.
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ After you add your Sigfox credentials to Pybytes you can see DevKit contract typ
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Detailed steps which are same for all devices are [**described here**](../../quick).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Check sigfox status
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ In this section, we will explain to you how to create widgets for data visualisa
|
||||
|
||||
{{% hint style="info" %}}
|
||||
We assume that you already have your device connected to Pybytes. In case you haven't, check how to [add your device here](../connect/). After your done with that, you can proceed to the next example.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Step 1: Set up your python application
|
||||
|
||||
@@ -25,7 +25,7 @@ The first step is to have your python application uploaded and running on your P
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Scroll a bit down to see the picture of the project structure in Atom.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
This python application will send data from the array every 5 seconds to Pybytes.
|
||||
|
||||
@@ -64,7 +64,7 @@ In this code, we're calling the function `pybytes.send_signal(signalNumber, valu
|
||||
|
||||
**255** different values: **0 ... 254** (signalNumber 255 is reserved for the Pybytes terminal)
|
||||
* `value` is the value being attributed to that particular signal number
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
Your example project in Atom (with Pymakr) should look like this.
|
||||
Press *Upload* button to upload the code into your device.
|
||||
@@ -90,7 +90,7 @@ Go to Pybytes and on *Devices* page select your device;
|
||||
Then go to `Data` tab and click on the row in the *Undefined signals* table (recommended). Alternatively, you can click on *Define new signal* button.
|
||||
{{% hint style="info" %}}
|
||||
If you don't see your undefined signal in *Undefined signals* table, please reload your browser.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||

|
||||
|
||||
@@ -106,7 +106,7 @@ Your signal was defined!
|
||||
The name and unit are labels used to identify your signal inside Pybytes (In this example we defined `Sinwave` as the name of the signal and `Rad` as the unit).
|
||||
|
||||
The signal number has to match the signal number that you defined on `pybytes.send_signal` function call, inside your `main.py` code (In this example we defined `signalNumber = 1`);
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Step 3: Add a widget for the signal
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ These settings can also be applied on a per project basis by clicking `Settings`
|
||||
|
||||
{{% hint style="info" %}}
|
||||
This process is easiest with either a Pycom Expansion Board or a Pytrack/Pysense as the addresses are automatically selected. For external products such as FTDI USB Serial Cables, the serial address may need to be copied manually. Additionally, the reset button on the device may also need to be pressed before a connection message appears.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Connecting via Telnet
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ These settings can also be applied on a per project basis by clicking `All comma
|
||||
|
||||
{{% hint style="info" %}}
|
||||
This process is easiest with either a Pycom Expansion Board or a Pytrack/Pysense as the addresses are automatically selected. For external products such as FTDI USB Serial Cables, the serial address may need to be copied manually. Additionally, the reset button on the device may also need to be pressed before a connection message appears.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Connecting via Telnet
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ Use `print()` to output contents of variables to the console for you to read. Re
|
||||
Note that after writing or pasting any indented code like a function or a while loop, the user will have to press enter up to three times to tell MicroPython the code is to be closed (this is standard MicroPython & Python behaviour).
|
||||
|
||||
Also be aware that code written into the REPL is not saved after the device is powered off/on again.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Run
|
||||
|
||||
@@ -41,7 +41,7 @@ To test code on a device, create a new `.py` file or open an existing one, type
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Changes made to files won't be automatically uploaded to the board upon restarting or exiting the `Run` feature, as the Pycom board will not store this code. In order to push the code permanently to a device, use the `Upload` feature.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Projects
|
||||
|
||||
|
||||
@@ -147,5 +147,4 @@ Prints the bytes in `data` array in hexadecimal format, separated by spaces usin
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that more functionality is being added weekly to these libraries. If a required feature is not available, feel free to contribute with a pull request at the [Libraries GitHub repository](https://github.com/pycom/pycom-libraries)
|
||||
{{< /hint >}}
|
||||
|
||||
{{% /hint %}}
|
||||
|
||||
@@ -108,5 +108,5 @@ The following arguments may be passed into the constructor.
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that more functionality is being added weekly to these libraries. If a required feature is not available, feel free to contribute with a pull request at the [Libraries GitHub repository](https://github.com/pycom/pycom-libraries)
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -50,5 +50,5 @@ Read the longitude and latitude from the `L76GNSS`. Returns a **tuple** with the
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that more functionality is being added weekly to these libraries. If a required feature is not available, feel free to contribute with a pull request at the [Libraries GitHub repository](https://github.com/pycom/pycom-libraries)
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -109,5 +109,5 @@ Warning: When running via the repl calling `setup_sleep()` will hang/crash the r
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that more functionality is being added weekly to these libraries. If a required feature is not available, feel free to contribute with a pull request at the [Libraries GitHub repository](https://github.com/pycom/pycom-libraries)
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ The latest firmware DFU file can be downloaded from the links below:
|
||||
{{% hint style="info" %}}
|
||||
Make sure to choose the correct firmware version for your expansion board. both 3.0 and 3.1 versions have version numbers in the silkscreen on the back of the board. See the image below for examples highlighted in Red
|
||||

|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
While in the normal, application mode, the Pysense/Pytrack/Pyscan/Expansion Board v3 require a Serial USB CDC driver, in DFU, bootloader mode, the DFU driver is required. Below, the USB Product ID is depicted for each case.
|
||||
|
||||
@@ -117,7 +117,7 @@ $ dfu-util -D pytrack_0.0.8.dfu
|
||||
|
||||
{{% hint style="info" %}}
|
||||
You might need to run `dfu-util` as `sudo`. In that case, you will need to enter your password.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
An output, similar to the one below, will appear upon successful installation:
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ In addition to the Pysense or Pytrack specific libraries, you also need to uploa
|
||||
|
||||
{{% hint style="info" %}}
|
||||
The Pytrack and Pysense boards behave the same as the Expansion Board. `Upload`, `Run` and upload code to Pycom modules via the Pymakr Plugin, in exactly the same process.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Importing/Using the Libraries
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ This library is split into two layers. The top level `OTA` class implements all
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Although the above code is functional, it is provided only as an example of how an end user might implement a OTA update mechanism. It is not 100% feature complete e.g. even though it does backup previous versions of files, the roll back procedure is not implemented. This is left of the end user to do.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Example
|
||||
|
||||
@@ -139,7 +139,7 @@ Below is am example implementing the methodology previously explained in this tu
|
||||
|
||||
{{% hint style="info" %}}
|
||||
The example below will only work on a Pycom device with LoRa capabilities. If want to test it out on a device without LoRa functionality then simply comment out any code relating to LoRa. Leaving just the `WiFiOTA` initialisation and they `ota.connect()` and `ota.update()`
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
```python
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ data = rmt.pulses_get()
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
If tx_idle_level is not set to the opposite of the third value in the tx_carrier tuple, the carrier wave will continue to be generated when the RMT channel is idle.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Receiving
|
||||
|
||||
|
||||
@@ -57,4 +57,4 @@ clock = Clock()
|
||||
|
||||
{{% hint style="info" %}}
|
||||
There are no restrictions to what can be done in an interrupt. For example, it is possible to even do network requests with an interrupt. However, it is important to keep in mind that interrupts are handled sequentially, so it's good practice to keep them short. More information can be found in [`Interrupt Handling`](/firmwareapi/notes#interrupt-handling).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
@@ -33,7 +33,7 @@ When changing the WLAN mode, if following the instructions below, the WLAN conne
|
||||
2. Duplicate the REPL on UART. This way commands can be run via Serial USB.
|
||||
|
||||
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Connecting to a Router
|
||||
|
||||
@@ -84,7 +84,7 @@ if not wlan.isconnected():
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Notice how we check for the reset cause and the connection status, this is crucial in order to be able to soft reset the LoPy during a telnet session without breaking the connection.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Multiple Networks using a Static IP Address
|
||||
|
||||
|
||||
@@ -110,5 +110,5 @@ To adapt this code to user specific needs:
|
||||
* Increase the package size changing the `_LORA_PKG_FORMAT` to `BH%ds`. The `H` will allow the keeping of 2 bytes for size (for more information about [struct format](https://docs.python.org/2/library/struct.html#format-characters))
|
||||
* Reduce the package size with bitwise manipulation
|
||||
* Reduce the message size (for this demo, a string) to something more useful for specific development
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ This example shows how to:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
The LoRa-Mesh socket supports only the following socket methods: `close()`, `bind()`, `sendto()`, and `recvfrom()`.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
**Lora Mesh example**
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@ There are two methods of connecting LoPy devices to the nano-gateway, Over the A
|
||||
|
||||
{{% hint style="info" %}}
|
||||
It's important that the following code examples (also on GitHub) are used to connect to the nano-gateway as it only supports single channel connections.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
### OTAA (Over The Air Activation)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ aliases:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please ensure you have the latest Sequans modem firmware for the best network compatibility. Instructions for this can be found [here](../firmware).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
The LTE Cat M1 service gives full IP access through the cellular modem.
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ search: false
|
||||
|
||||
{{% hint style="info" %}}
|
||||
This article is only related to GPy, FiPy, and G01 boards
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
**Important**: When upgrading your modem for the first time, even if you have updated it in the past with the old firmware update method, you **MUST** use the "recovery" upgrade method described below. Otherwise you will risk breaking your module.
|
||||
@@ -24,7 +24,7 @@ Please also use the file upgdiff_33080-to-39529.dup (1.2M) from the archive.
|
||||
import sqnsupgrade
|
||||
sqnsupgrade.run('upgdiff_33080-to-39529.dup', 'updater.elf')
|
||||
```
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
Please read the following instructions carefully as there are some significant changes compared to the previous updater version.
|
||||
@@ -58,7 +58,7 @@ sqnsupgrade.run('upgdiff_38638-to-39529.dup')
|
||||
```
|
||||
If you are updating the Sequans firmware on your module for the first time, please use instead the file upgdiff_33080-to-39529.dup (1.2M) from the same archive.
|
||||
Similar upgrade packages are available for the NB-IoT firmwares.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Via SD card
|
||||
|
||||
@@ -138,7 +138,7 @@ SYSTEM VERSION
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Please note that the firmware update may seem to "stall" around 7-10% and again at 99%. This is not an indication of a failure but the fact that the modem has to do some tasks during and the updater will wait for these tasks to be completed. Unless the upgrade process is hanging for more than 5 minutes, **do not interrupt the process** as you will have to start again if you don't finish it. It may also take several minutes for the updater to load before responding to the AT wakeup command.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
After you have updated your modem once using the recovery method, you can now flash your modem again using just the `CATM1-38638.dup` or `NB1-37781.dup` file without specifying the `updater.elf` file. However, should the upgrade fail, your modem may end up in recovery mode and you will need the `updater.elf` file again. The updater will check for this and prompt you if using the `updater.elf` file is necessary.
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ aliases:
|
||||
|
||||
{{% hint style="info" %}}
|
||||
As shipped, Pycom modules only support CAT-M1, in order to use NB-IoT you need to flash a different firmware to the Sequans modem. Instructions for this can be found [here](../firmware).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## NB-IoT usage
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ s.send(bytes([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]))
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Please ensure that there is an antenna connected to your device before sending/receiving Sigfox messages as in proper use (e.g. without an antenna), may damage the device.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Disengage Sequence Number
|
||||
|
||||
|
||||
Reference in New Issue
Block a user