Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Lora-Mac=‎FFFFFFFFFFFFFFFF

    Scheduled Pinned Locked Moved LoPy
    lopymac
    26 Posts 11 Posters 12.0k Views 13 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E Offline
      emerout @robert-hh
      last edited by

      @robert-hh said in Lora-Mac=‎FFFFFFFFFFFFFFFF:

      @emerout Did you try to erase the flash with esptool.py?

      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-hhR 1 Reply Last reply Reply Quote 0
      • E Offline
        emerout
        last edited by

        Is it possible to set lora device address programmatically when operate in OTAA mode ?

        1 Reply Last reply Reply Quote 0
        • robert-hhR Offline
          robert-hh @emerout
          last edited by

          @emerout Did you check between erase & reflash, whether the device was erased? For instance by trying to run it.

          E 1 Reply Last reply Reply Quote 0
          • E Offline
            emerout @robert-hh
            last edited by

            @robert-hh Yes, after erase there wasn't any python >>> prompt.
            Then after flashing firmware, my boot.py and main.py was gone.

            1 Reply Last reply Reply Quote 0
            • X Offline
              Xykon administrators
              last edited by Xykon

              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

              Christian Ehlers

              E C J 3 Replies Last reply Reply Quote 8
              • E Offline
                emerout @Xykon
                last edited by

                @Xykon That's work !! :-) thanks a lot

                1 Reply Last reply Reply Quote 0
                • C Offline
                  cinezaster @Xykon
                  last edited by

                  @Xykon Thanks

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    Colateral @daniel
                    last edited by

                    @daniel For a custom firmware is always FFFFFFFFFFFF. There is some build parameter to get the mac as you have for official firmware? How we can set up the mac?

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      KenM
                      last edited by KenM

                      My lora mac ID changed after [v1.20.0.rc13] Release Candidate firmware update of my Lopy4?
                      I used the code above to change it back to the original mac ID.

                      I also did the firmware udpate on another Lopy4 but I didn't notice a connecton problem there.

                      1 Reply Last reply Reply Quote 1
                      • J Offline
                        jg_spitfire @Xykon
                        last edited by

                        @Xykon Hi, how could I make sure I am using an unique MAC?, thanks

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • 1
                        • 2
                        • 2 / 2
                        • First post
                          Last post

                        Pycom on Twitter

                        Pycom