Dear Pycom community!
We have a new Beta release available: v1.20.3.b0
This includes a big update of the Espressif IDF from v3.3.1 to v4. The IDF is a foundational piece of our firmware, so this update can impact a lot of things.
Beta means, we do NOT advise you install this on production devices. But if you test this release on your development projects we'd love to hear your feedback! What works better, what has regressed compared to the regular release candidates?
Updatd the LoRaWAN specification version to 1.0.3 (Class A& C)
Added support for new regions (CN779, RU864 and KR920.)
Added BLE Mesh
WiPy2, SiPy, and LoPy1 and are not supported anymore since they only have 4MB flash.
WiPy3, LoPy4, FiPy, GPy, W01, L01, L04 and G01 are all supported
sqnsupdater is removed from this FW due to FW size limits, so you cannot perform updates of the LTE modem firmware while running this development release
MDNS is removed, also due to FW size limits
You can install this development release with the latest Firmware Updater tool 1.16.4 or download the .tar.gz packages from the docs. The .elf files can be downloaded from here. At this time the source code is not yet publicly available - we're working on that.
Clarification: Originally, I had published this as "Alpha release v1.20.2.a1 for pybytes", however, in order to make all update channels work as they should, the correct version number should have been a "Beta release v1.20.3.b0 for development". This has been corrected now. Nothing changed about the content. Apologies for the back and forth.
@Mao There are two options:
a) use the str() function or an string formatting methods to convert a non-ascii object into it's ascii representation, which you then can send with uart.write(). Like uart.write(str(100.3))
b) use the file = stream option of print, like:
from machine import UART
uart = UART(1)
print("The answer is", 42, ", but what is the question?", file=uart)
Obviously you can combine both methods for a pretty formatted output, a little bit easier than you could do with Arduino.
P.S.: Thanks to Dave Hylands pointing me at the file=xxx option again.
@nadvorvo Code 9 stands for NB-IoT RAT, so your connection is ok. You might get your packets lost over-the-air, as plain UDP does not allow for confirmation. You can also check with TCP or MQTT if your operator allows it (many operators block non-UDP communication)
@jg_spitfire The timestamp error happens if the downlink message arrives too late at the gateway. The reasons for that are manifold. Just one of them could be the LoPy4. If you have Wireshark or the like, you could narrow down, if it's the LoPy4 or something in you link to the internet and the TTN gateway. Please check also if you are using the TTN router for your region.
Sigfox RC4 definition:
Latin America: Argentina, Chile, Colombia, Costa Rica, Ecuador, El Salvador, Guatemala, Honduras, Nicaragua, Panama, Peru, Trinidad & Tobago, Uruguay.
Asia Pacific: Australia, Hong Kong, Indonesia, Malaysia, New Zealand, Singapore, Taiwan, Thailand.
So, try to select Australia or Colombia
The worst-case interrupt latency that I measured on pycom's Wipy board was approximately 1 ms (measured with an oscilloscope).
I did not find the timerchannel.capture ([value]) method on the micropython implementation of pycom.
In the meantime I switched to the Pybord D series with an STM32F7.
The measured interrupt latency is approx. 30us and the timer.capture method is implemented and can be called within the callback routine.
Measurements in the us scale are no problem, so this solution works for me.
@jg_spitfire That's the way TTN decided to send the downlink message in the RX2 node. The LoRa spec says:
The RX2 receive window uses a fixed frequency and data rate. The default parameters are 869.525 MHz / DR0 (SF12, 125 kHz)
Using SF9 is told by the TTN server to the node with the OTAA join accept message.