Firmware release 1.0.1.b1
-
Hello everyone,
As promised, releases will be done on Thursdays from now on. The change log from this new version is
- lib/lora: Add necessary code to allow ChannelAdd to work on 915mhz bands.
- lib/lora: Allow removal of channels in the 915Mhz band.
- docs: Document the newly added Bluetooth methods.
- esp32: Initial BLE API with scanning, connect and get services.
Special thanks to @cmsedore for the LoRa fixes :-)
We had planned to also add a method to get the characteristics from a BLE services, but we ran into problems and we are in touch with Espressif to have that resolved as soon as possible. Next week we will add the ability to read and write characteristic values.
Please have a look at the methods added to the BLE class in:
https://docs.pycom.io/pycom_esp32/library/network.Bluetooth.htmlIf you have any feedback or suggestions regarding the API, please do let us know!
I've also had good news from Espressif today, and it all looks like we will have the SDcard drivers ready for next week's release too!
The updater tool can be downloaded from here: https://www.pycom.io/support/supportdownloads/ (Under Firmware Updates)
All the source code is now available on Github too:
https://github.com/pycom/pycom-micropython
https://github.com/pycom/pycom-esp-idfCheers,
Daniel
-
@DongYin
look at:
https://docs.python.org/3/tutorial/inputoutput.html
there are paragraphs about files
also look here
https://docs.pycom.io/pycom_esp32/library/uos.htmlos.mkdir
create directory
-
@livius said in Firmware release 1.0.1.b1:
@DongYin said in Firmware release 1.0.1.b1:
If and how i can save any data to the flash?
you can write files to the `\flash' folder without any problem
Thank you! i used uos.mkdir("setting.ini") to write a file to '\flash', then how to write&read it by programs?
-
@Ralph
ok - maybe this steap is unnesceserry at all it is used only ifargs.tar = None
in update.py isdef erase_sytem_mem(self): # Erase first 3.5Mb (this way fs and MAC address will be untouched) self.erase(0, 0x3100000)
i will use
flash
switch from make
thank you again
-
@livius As I understand from my colleagues, the updater tool does the same as the flash command does: it only erases what it needs to, to write the firmware, partition and bootloader.
And yes that looks about right to me for windows. ESPPORT just needs to be the full comport.
-
@Ralph
thank you for the explanation
one question here - why then updater tool do erase mem?EDIT:
and for windows it is like this?
make BOARD=WIPY ESPPORT=COM6 flash
-
@livius it writes all three .bin files, but it doesn't erase anything else on the file system.
-
@Ralph said in Firmware release 1.0.1.b1:
make BOARD=LOPY ESPPORT=/dev/ttyUSB0 flash
what this command
flash
do?
write e.g. appimg.bin or also partition.bin, bootloader.bin some other things like erase mem...EDIT
placing the bin file in the /sys directory on the board itself using FTP, then rebooting the board
this does not work for me - but i tested this tommorow only once at night
then maybe i do something wrong
when i do this and restart the board it do not runi then reflash it with the updater tool once again
and flash board with command line to put my custom source code make
updater.py -f ......
but i must change script of updater.py and removeerase_sytem_mem
steap
from some reason this steap time out
a little hint here 'erase_sytem_mem' have one letter typing error should be 'erase_system_mem' ;-)
-
@livius, before Daniel replies, let me add that (if you didn't know this already,) you can still update your board manually by placing the bin file in the /sys directory on the board itself using FTP, then rebooting the board. Your idea of making it an option in the updater would probably be better, but until that happens, you can do it this way.
Edit: This works even nicer:
make BOARD=LOPY ESPPORT=/dev/ttyUSB0 flash
-
@DongYin said in Firmware release 1.0.1.b1:
If and how i can save any data to the flash?
you can write files to the `\flash' folder without any problem
-
@daniel
I set my Lopy to WLAN.STA mode and connect it with the router, then i ping it's IP address on my computer successfully.
But if there is a way i can ping the IP address of my computer on the Lopy.
If and how i can save any data to the flash?
-
@daniel
can you add to updater tool option to use files from dir not from internet?
e.g.- i can transfer all files to pendrive and go to computer without internet connection and update my board
- i can change something in source code and do custom
make
and need to flash it to the board
previously i do this simple by replace files in "updater" folder and run updater tool
-
@sakis
Thank you sir!
-
No problem. I just tested it and it is the right version:
(sysname='LoPy', nodename='LoPy', release='1.0.1.b1', version='v1.8.6-264-gadacebe on 2016-12-22', machine='LoPy with ESP32')
-
@sakis
Sorry, I was hoping this was a quick link check, not a download and actual test. I appreciate the time.
-
I see. I'll try the macOS update myself and let you know for sure here
-
Thanks but I unfortunately I am currently in the land of poor internet (Philippines) and that could be a 45min experiment.
It would be nice to know for sure and resolve any confusion for others as well.
-
Most likely the download link was not updated. The only way to be sure is by checking the output of
os.uname()
-
It also seems the Mac version points to 1.0.0.b1
-
@livius AP+STA is planned for early january after getting the BLE API complete.
That OSError means that you are trying to perform a socket operation on an invalid socket (one that is already closed). Probably you are trying to re-use a socket that was active before you switched between AP and STA mode or viceversa. Close your sockets before switching modes and open them again afterwards.
Cheers,
Daniel