New Firmware Release Candidate v1.20.0
-
Hello Everyone ,
we've uploaded new Firmware Release
v1.20.0.rc0
as a candidate release for coming new stable releasev1.20.0
this release include the following changes:Improvements:
- Organized ports under one directory
- Micropython v1.9.4
- Disable/enable GIL when transmitting/receiving pulses in RMT module
- Unlock the GIL while accessing queues
- Add script to build release package via makefile or script in tools
- Improving Non-Blocking sockets
- Adaption for uasyncio MicroPython library
- Exposing new Socket Options
- Major LTE module Updates
- Re-structring of Frozen folder
- Fixed Issue with memory leak in thread lock creation
- Fixed problem in antenna switch in newer esp32 chip models
- General fixes and improvements to the LoRaWAN stack
- Applied workaround for
socket.connect
timeout - Added timeout option for
ussl.wrap_socket
to timeout SSL Handshake - Enabled reading the value of any descriptor with standard defined 2byte UUID in BLE
- Added Bluetooth timeout parameter to bluetooth.connect()
- Added support for new LTE bands (5,8)
New Features:
- Introduced new Filesystem
LittleFS
- Enabled uzlib in Micropython
- Added LightSleep functionality
- Added Dynamic filesystem functionality and new Bootmgr function in Pycom module
- Added support for RTC memory operations Read/Write
- Added Lora Mesh - openthread protocol
- Build Process now support building Pybytes firmwares via Build option
VARIANT
- New Frozen Libs for LTE Sequans modem upgrades
WiFi Updates:
- Added new API to get list of STAs connected to Soft-AP
- Updated wlan_scan to include other parameters
- Added timout handling in wlan_connect + refactoring
- Added new API for setting max tx power for Wifi
- Added Set/Get API for Country configuration
- Refactored "wlan_setup" function
- Fixed Issue of ftp/telnet servers enabling when wifi_on_boot is not enabled
- Added new API wlan.joined_ap_info()
- Added API to get/set wifi protocol + updated wlan_channel to support sniffing
- Added support for setting mac addr for STA and AP
- Added API for sending Raw 80211 messages
- Added promiscuous mode
You can download the sources from https://github.com/pycom/pycom-micropython-sigfox/tree/v1.20.0.rc0
You also can flash Pycom boards with this release by choosing
development
type in Firmware updater toolA link to Documentation page will be added soon.
Note: The function
os.mkfs()
has been replaced withos.fsformat()
To format the internal file system, useos.fsformat('/flash')
andos.fsformat('/sd')
to format SD cards (card needs to be mounted as '/sd')To mount the SD card, use this code:
sd = SD() fs = os.mkfat(sd) os.mount(fs, '/sd')
-
@iwahdan @Xykon
What happend to the development branch and version 1.19 (which is still in beta)?
Was it abandoned? As far as I can see they both branched from 1.18, but with similar changes, especially regarding the new directory structure.
Is everything that was new/fixed in 1.19 also in 1.20?
-
@crumble You have to do that after any checkout in the esp-idf repository. So if you change to v3.1, you have to repeat that. And in the Micropython subdirectory you have to rebuild mpy-cross.
-
@robert-hh
Thanks a lot Robert. I had done this in master branch only or it failed for some reason.Was not able to link it with idf_v3.1 but idf_v3.1.1 works.
-
@crumble Dis you issue in the esp-idf folder the command:
git submodule update --init
-
Update IDF libraries to pycom-esp-idf/idf_v3.1 ebff2ed
I tried to compile debian submodule on win10. But fail with a lot of the idf_v3.1* branches.
It misses include files from the folder mbedtlsmods/modussl.h:19:25: fatal error: mbedtls/net.h: No such file or directory compilation terminated. mods/moduhashlib.c:26:26: fatal error: mbedtls/sha1.h: No such file or directory compilation terminated. In file included from mods/modussl.c:28:0: mods/modussl.h:19:25: fatal error: mbedtls/net.h: No such file or directory compilation terminated. In file included from mods/lwipsocket.c:31:0: mods/modussl.h:19:25: fatal error: mbedtls/net.h: No such file or directory compilation terminated.
origin/master compiles without problems.
Can I give the original idf v3.1.2 a try or do I need your changes?
Hey, there is a change for i2c. I have no clue what this means, but i had to have it. Just too scared to brick the device without your go ;)
-
Bad luck today run into the i2c issue on init of pytrack:
File "main.py", line 62, in <module> File "lib\pytrack.py", line 8, in __init__ File "lib\pycoproc.py", line 102, in __init__ File "lib\pycoproc.py", line 164, in set_bits_in_memory File "lib\pycoproc.py", line 155, in magic_write_read File "lib\pycoproc.py", line 117, in _read OSError: I2C bus error
It will be nice, if this message has more details inside the development firmware. It is the same when reading or writing on the python level. But maybe a "doesn't work on my machine" is helpful, too ;)
-
I'm testing this new fw v1.20.0.rc4 release with GPY with lasted NB modem fw.
Resume:
1 - I'm able to connect and send data over NB (Portugal - MEO operator)
2 - rtc.ntp_sync() is working over NB and WIFI
3 - rtc.synced() is working over NB and WIFI
4 - I notice that sometimes the usocket.read() don't timeout, I will continue doing more tests.keep the good work.
-
-
@paul-thornton thanks for your answer,
Can i set this value ?
-
@rogerrr Hi, whilst I can confirm Macfilter/commissioner is on our roadmap but I dont have a timeframe for delivery at the moment.
re current security methods. All mesh traffic is currently encrypted with a pre shared key that matches across all nodes.
-
Hi,
When will be able to use macfilter and/or commissioner in cli function ?
Else, is there a way to secure the mesh networks ?Thanks
-
I move back to FAT file system. LittleFS worked fine for some time, but suddenly it was not possible to upload files with the ATOM plugin running Windows 10.
>>> >>> Uploading project (main folder)... Not safe booting, disabled in settings Reading file status Failed to read project status, uploading all files Creating dir lib [1/5] Writing file lib/dth.mpy (2kb) [2/5] Writing file lib/pycoproc.mpy (6kb) Failed to write file, trying again... Failed to write file, trying again... timeout [3/5] Writing file lib/pytrack.mpy (0kb) Failed to write file, trying again... Failed to write file, trying again... timeout [4/5] Writing file lib/sfGPS.mpy (7kb) Failed to write file, trying again... Failed to write file, trying again... timeout [5/5] Writing file main.py (4kb) Failed to write file, trying again... Failed to write file, trying again... Upload failed.: timeout Please reboot your device manually.
The failed to write messages do not pop up always after two files. Sometimes after main.py
I flashed the firmware with erasing the file system flag, it failed.
I flashed again with FAT and it worked.
Flashed 3rd time with LittleFS and failed again.Maybe a timestamp problem? I had no problems during the afternoon. Time zone is Berlin. Problem started around 20:00 local time.
FTP worked well.
-
@crumble said in New Firmware Release Candidate v1.20.0.rc0:
Have you changed someting in _thread or i2c as well?
Maybe it's the updated IDF libraries... I haven't changed anything in the source code related to that functionality.
-
Have you changed someting in _thread or i2c as well?
up to ec2 I had huge problems with i2c and a pytrack.
Under rc3 it was more stable when serializing i2c with a lock. But deepsleep failed once without visible i2c exception.Now it runs for some hours without a problem on a LoPy and WiPi3. I hope you have done a great job. Not that I have a lot of bad luck and and miss allways the issue.;)
-
A new version 1.20.0.rc4 is now available with the following updates:
Co-Authored-By: @iwahdan
mods/modusocket: use getaddrinfo() instead of n_gethostbyname() in mod_usocket_getaddrinfo()
esp32/modusocket:Add mpy API to get/set DNS servers ipv4 addr
mods/machrtc: Add optional parameter backup_server to specify two NTP servers
esp32: Fixes in order to get the LoRaWAN US915 certification passing
esp32/frozen: updated MQTTMsgHandler.py
esp32/pycom_config: fix typosCo-Authored-By: @robert-hh
help: Simplify and extend help()
mods/machspi.c: Fix the bug in spi.read()
esp32/micropython: correction to keyboard interrupts exposureUpdate IDF libraries to pycom-esp-idf/idf_v3.1 ebff2ed
mods/machrtc: Fixrtc.synced()
Fix typo in get_idf_libs.py
Example1: Set primary and secondary (backup) ntp server.
from machine import RTC rtc = RTC() rtc.ntp_sync('pool.ntp.org', backup_server='ntp.ubuntu.com') rtc.synced()
Example2: Check and update name server configuration
import socket # Check configured name servers socket.dnsserver() ==> ('8.8.8.8', '8.8.8.8') # Check primary name server (index: 0) socket.dnsserver(0) ==> (0, '8.8.8.8') # Set primary name server (index: 0) socket.dnsserver(0, '10.0.0.1') # Set secondary name server (index: 1) socket.dnsserver(1, '192.168.1.1') socket.dnsserver(0) ==> (0, '10.0.0.1') socket.dnsserver() ==> ('10.0.0.1', '192.168.1.1')
-
@iwahdan
I've now discovered what looks like a better way to enable the iccid() method to work after a reset.-
lte.reset()
-
lte.iccid() does not work
-
LTE.reconnect_uart()
-
lte.init()
-
lte.iccid() then works!
My guess is that other methods may not function correctly after a reset() without calling the LTE.reconnect_uart() method, but that is just speculation.
-
-
@iwahdan
Interesting discovery:-
As noted earier after a lte.reset() method call, the lte.iccid() method no longer returns a value.
-
The sqnsupgrade.info(True) method call resets the modem to a state where the lte.iccid() method returns a correct value.
-
In other words the sqnsupgrade.info(True) seems to do something to the modem state that lte.reset() does not.
I don't pretend to understand what the ramifications of this are, but I thought it was worth noting. I know of no other software command that will restore the modem to a state where the lte.iccid() method works.
-
-
@danielm I don't think it is RAI, but a release indicator flag that ublox has implemented in the socket send command, which tells the modem it can gi to PSM based on the PSM settings.
Nice work! Guess there will be plenty of alternatives when it comes to modems. But, as you say, they must also be a little user friendly.
-
@einarj
By release flag you mean RAI - Release Assistance Indicator? 165uWh per active cycle is pretty impressive. I would say on par with LoRa/LoRaWAN based solutions if not better.Because of the state of cellular support in Pycom products (after they are available on the market for more than a year) yesterday I started to implement similar solution - WiPy 3.0 with Quectel BC66 based on Mediatek MT2625. I do not have any power figures yet as I am currently working on basic library implementation.
If this solution will be working well it will also be pretty cost-efficient and future-proof as the modem also supports Rel.14/NB2.
I would also like to test BC66 with ESP32-WROOM running micropyhton.org ESP32 port which currently implements only basic features but could be suficient for simple sensors. This would lead to even more cost-efficient solution (for simple battery powered devices).
Edit: BC66 contains OpenCPU functionality which allows to run application code directly on the module but development in this environment seems like return to dark ages. Would be worth in case of manufacturing really big series of super-simple devices. The module does not even require voltage regulator when powered directly from battery.