I am not sure how I can fix this....I have already tried a factory reset
from network import LoRa
lora = LoRa(mode=LoRa.LORAWAN)
Gives me : FFFFFFFFFFFFFFFF
When I try to connect to The Things Network, my gateway shows the following dev eui (lora-mac) in the ttn console
12:47:55 868.3 4/5 SF9 BW125 205.8 app eui:70B3D57EF0004E35 dev eui:FFFFFFFFFFFFFFFF payload size:23 bytes
@Xykon That's work !! :-) thanks a lot
The Lora MAC is actually stored in flash memory. You can set it by uploading an 8 byte binary file containing your MAC address as /flash/sys/lpwan.mac (see github source)
Try running the following code directly on your LoPy to generate the file (make sure to use a unique MAC address):
fo = open("/flash/sys/lpwan.mac", "wb") mac_write=bytes([0x01,0xb1,0xd1,0x41,0x91,0x31,0xb1,0xb4]) fo.write(mac_write) fo.close()
Then reset your LoPy... you should see the following message during boot on the serial console:
LPWAN MAC write OK
Let me know if this works for you
@emerout Did you check between erase & reflash, whether the device was erased? For instance by trying to run it.
Is it possible to set lora device address programmatically when operate in OTAA mode ?
I have performed :
$ bin/esptool.py --port /dev/tty.usbserial erase_flash
and then :
$ bin/updater.py -t Downloads/LoPy_868-1.7.8.b1.tar.gz -p /dev/tty.usbserial -s 921600 flash
re-uploaded my program,
No success, mac is still FFFF...
@robert-hh I did try it to erase the flash.
I have the same problem, address returned by lora.mac() is still FFFFFFFFFFFFFFFF.
First time I played with Lopy, I have a different and right mac address.
Then I try to use a custom firmware, flash it, with no success (other story with external lib)
I came back to official firmware LoPy_868-1.7.6.b1.
And know it is stuck with this ffff... mac.
Any help appreciated !
This post is deleted!
@bmarkus unfortunately that doesn't work either. I already tried this.
Also when I look at the output of lora.mac() it returns b'\xff\xff\xff\xff\xff\xff\xff\xff' so one could only expect the id to be FFFFFFFFFFFFFFFF.
@bucknall Still having this issue.
I upgraded firmware LoPy to '1.7.9.b3'.
PyTrack firmware is v0.0.4
LoPy Model: LoPy1.0r
I made another Firmware update but the MAC address is still FFFFFFFFFFFFFFFF
Did your LoPy was ever flashed with a custom firmware using the IDF? Did you perform a bulk erase on the flash memory?
Hi @Camot, I've checked with Daniel and he asked me to verify if you used the ESP-IDF tool to erase the flash on your device?
Try performing another firmware update and it should correctly write over the flash with our firmware and correct the LoRa MAC address.
Thanks for your patience!
Any news? My Lopy still have this invalid Lora-MAC