robert-hh / Shared-Stuff

Various files for MicroPython devices
47 stars 16 forks source link

How to Flash heltec_ws*.bin #3

Closed johannes-777 closed 4 years ago

johannes-777 commented 4 years ago

Hi Robert, I am not quite sure, but if I understood correctly, you tried to port pycom's firmware to heltec wirless stick. This is very interesting, especially their networking module, which is nicely extended to LoRa, just like VW extended the Linux socket interface to CAN (and pushed it into the kernel).
Could you explain the status of this project? I just flashed a WSL (heltec_wsl-1.20.2.rc6->heltec.bin) but only received resets:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 188777542, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3f400020,len:254520

robert-hh commented 4 years ago

I have two tarballs here: https://github.com/robert-hh/Shared-Stuff which you can flash to the device using the Pycom updater.py at https://github.com/pycom/pycom-micropython-sigfox/tree/Dev/esp32/tools/fw_updater and the -r option. python2 updater.py -r -p -s 460800 flash -t I just verified that on a Heltec WSL. Note that the packages for WSL and WS are different. The WSL has not display and sports a different ESP32 chip. And the WS has 8 MB flash, the WSL only 4 MB.

johannes-777 commented 4 years ago

Thank you, that worked! Now I just tried the lorawan-otaa example, but my Wireless Stick Lite just won't join. https://docs.pycom.io/tutorials/lora/lorawan-otaa/ I use a gateway from imst and all my cubecell nodes join immediately.

However, I also tried this example with my freshly complied micropython for esp32: https://lemariva.com/blog/2020/02/tutorial-micropython-esp32-sends-data-over-lorawan It is forked from adafruits "tiny-lora" and only accepts ABP activation and unconfirmed uplink. This didn't send packets to TTN either, so it might be the Wireless Stick (I could read the SX127x registers, so pins for spi should be right).

Did you try the lorawan-otaa example?

robert-hh commented 4 years ago

I'm not sure. I tried ABP join and downlink messages. But a friend uses that image more intense and did not report any errors.

johannes-777 commented 4 years ago

I confirm that ABP indeed works with up- and downlink. However, it seems linke s.recv only works reliably, if s.send comes before.