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

    Sigfox freezing

    Scheduled Pinned Locked Moved SiPy
    sipysigfoxfreeze
    15 Posts 3 Posters 3.2k Views 3 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.
    • J Offline
      jmarcelino @derchris
      last edited by

      @derchris
      Ok thanks and where do you have your SiPy, are you using the Expansion board from Pycom?

      D 1 Reply Last reply Reply Quote 0
      • D Offline
        derchris @jmarcelino
        last edited by

        @jmarcelino it's on the expansion board :)

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          jmarcelino @derchris
          last edited by

          @derchris
          Can you post the rest of your code? Do you have anything extra in your main.py / boot.py or any other files

          D 1 Reply Last reply Reply Quote 0
          • D Offline
            derchris @jmarcelino
            last edited by derchris

            @jmarcelino thanks for the quick support!

            Here's the code (note that even if I remove everything after the Sigfox init, it does not work):

            boot.py

            from machine import UART
            import machine
            import os

            uart = UART(0, baudrate=115200)
            os.dupterm(uart)

            machine.main('main.py')

            main.py

            from network import Sigfox
            import socket
            print("hello WiPy!")

            sigfox = Sigfox(mode=Sigfox.SIGFOX, rcz=Sigfox.RCZ1)

            s = socket.socket(socket.AF_SIGFOX, socket.SOCK_RAW)

            s.setblocking(True)

            s.setsockopt(socket.SOL_SIGFOX, socket.SO_RX, False)

            s.send(bytes([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]))

            print("hello WiPy!")

            robert-hhR 2 Replies Last reply Reply Quote 0
            • robert-hhR Offline
              robert-hh @derchris
              last edited by

              @derchris Just some non-related notes: The content of boot.py is not needed, because the dupterm part is done by _boot.py, which resides in frozen bytecode, and "main.py" is the default name for the main script.
              A hint on style: code sections can be enclosed in line with three backquotes (```). That keeps indentation.
              The content of _boot.py is:

              # _boot.py -- always run on boot-up, even during safe boot
              import os
              from machine import UART
              os.dupterm(UART(0, 115200))
              
              1 Reply Last reply Reply Quote 0
              • robert-hhR Offline
                robert-hh @derchris
                last edited by

                @derchris Another question: You said it's mounted on the expansion board. Which kind of antenna are you using?

                D 1 Reply Last reply Reply Quote 0
                • D Offline
                  derchris @robert-hh
                  last edited by derchris

                  @robert-hh see, that's why I wanna go C ;)

                  the "official" Sigfox Antenna Kit (SKU 0700461242598)

                  Plus: I'd expect the board not to completely freeze if there's something wrong with the antenna (I've read the note that it might break the board, though) - because that might happen in real life uses where we can't control the user's setup

                  J 1 Reply Last reply Reply Quote 0
                  • J Offline
                    jmarcelino @derchris
                    last edited by jmarcelino

                    @derchris

                    I don't think it's related to the antenna because there is no transmission when initilializing the Sigfox class, but in general if you operate RF devices without an antenna there is this surge of reflected energy that goes nowhere and could cause problems - it's not usual in Sigfox because it's low power.

                    Can you try running a firmware upgrade again, maybe something didn't get quite right.

                    I do this all the time with SiPy and never seen one crash like that.

                    Also there is no messages at all when it crashes?

                    D 1 Reply Last reply Reply Quote 0
                    • D Offline
                      derchris @jmarcelino
                      last edited by

                      @jmarcelino well, maybe (probably) it‘s me who‘s doing something wrong. As stated in the other thread, I flashed the Sipy with some basic esp32 stuff but afterwards re-flashed it with the firmware upgrade tool 3 times and always get the Sigfox credentials after it flashed. I even did a makefs flash...
                      Is there another way for a factory reset, just to be sure?
                      And when I say it freezes, I mean the terminal within VSCode is not responding, I can‘t enter anything and there‘s no output (It shows my prints before the init though) until I reset the device (power cycle or reset button)

                      J 1 Reply Last reply Reply Quote 0
                      • J Offline
                        jmarcelino @derchris
                        last edited by

                        @derchris
                        If you have a development environment setup as in https://github.com/pycom/pycom-micropython-sigfox/tree/master/esp32 you can do a

                        make erase

                        to really clear the flash

                        D 1 Reply Last reply Reply Quote 0
                        • D Offline
                          derchris @jmarcelino
                          last edited by derchris

                          @jmarcelino
                          In the meantime I downgraded to 1.6.0b1 and at least with this version it's only blocking at the socket.send - which might have to do with weak RSSI or so, I guess. Trying to upgrade to 1.9 now

                          Edit: upgraded to 1.9, freeze with init as before... strange :(

                          1 Reply Last reply Reply Quote 0
                          • D Offline
                            derchris
                            last edited by

                            giving up for now and hoping for the FiPy

                            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 / 1
                            • First post
                              Last post

                            Pycom on Twitter

                            Pycom