🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    AtomDTU NB-IoT

    Atom
    2
    32
    13.1k
    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.
    • F
      Felix22
      last edited by

      hello
      Have any of you gotten the Atom DTU NB-IoT to work?
      I have a SIM from q.beyond/iot-sim.com.
      It shows me a provider, but I can't establish a connection or nothing arrives in the q.beyond portal.
      With UIFlow it hangs during initialization.
      All current C examples do not run (anymore) and abort with error messages when compiling.
      The red LED next to the antenna lights up constantly and the blue LED flashes quickly.
      Could anyone help me, please.
      Best regards
      Felix

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by felmue

        Hello @Felix22

        in UIFlow1 Init NB-IoT DTU block tries a series of AT commands and if one of them is not successful it does not continue and hangs. The AT commands test for proper communication with the modem, then checks that no PIN is set and finally checks if the modem has registered with the provider.

        So lets try to break that down and manually setup the serial connection and try one AT command at the time.

        Below are some UIFlow1 blocks to simply check if the communication with the modem works.

        0_1708213008032_UIFlow1_AtomDTU_Test_20240218.png

        The result in the terminal should be: b'\r\nOK\r\n' or b'AT\r\r\nOK\r\n'.

        Let me know what you get and we go from there.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • F
          Felix22
          last edited by

          thanks
          The return is
          b'AT\r\r\nOK\r\n'

          1 Reply Last reply Reply Quote 0
          • felmueF
            felmue
            last edited by

            Hello @Felix22

            ok, his means your modem is alive and responding.

            Now, please try the following commands (which are the same as are used in Init NB-IoT DTU) block, but we can see the responses of the modem:

            0_1708274932090_UIFlow1_AtomDTU_Test2_20240218.png

            You should get something like:

            b'\r\nOK\r\n'
            b'\r\nOK\r\n'
            b'\r\nOK\r\n'
            b'\r\n+CPIN: READY\r\n\r\nOK\r\n'
            b'\r\n+CGCONTRDP: 1,5,"<YourAPN>","10.100.100.100.255.255.255.0"\r\n\r\nOK\r\n'
            

            Thanks
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

            1 Reply Last reply Reply Quote 0
            • F
              Felix22
              last edited by

              0_1708288442013_eb925181-2048-4cfe-a388-0c10709ae543-grafik.png
              0_1708288355085_9ac21d0f-18fe-438f-b04c-8b3b22d40126-grafik.png

              Yesterday i have made the similar with Arduino-C-Code and become as Response the carrier Code 28801 = Swisscom-Network but no response in q.beyond-Control-Panel...

              I have tested with a complete new AtomDTU. Flash with v1.13.2

              I think, no response :-((

              1 Reply Last reply Reply Quote 0
              • felmueF
                felmue
                last edited by felmue

                Hello @Felix22

                I just read in the q.beyond FAQ says that the SIM card needs to be activated.

                0_1708291594220_qbeyondsimactivate20240218.png

                I assume you did that already?

                Thanks
                Felix

                GPIO translation table M5Stack / M5Core2
                Information about various M5Stack products.
                Code examples

                1 Reply Last reply Reply Quote 0
                • F
                  Felix22
                  last edited by

                  0_1708292002977_2589df10-d449-4ea5-991e-330f5bf38dbb-image.png

                  Yes, I have do it. She is activated.
                  The connection from 17.2.24 comes from a old iPhone

                  1 Reply Last reply Reply Quote 0
                  • felmueF
                    felmue
                    last edited by

                    Hello @Felix22

                    ok, let's see what providers your modem can see.

                    Note: the last AT command AT+COPS=? can take a couple of minutes as it has to scan through all bands. (in my case it took about 3 minutes.)

                    0_1708293101539_UIFlow1_AtomDTU_Test3_20240218.png

                    Expected output:

                    b'\r\nOK\r\n'
                    b'\r\nOK\r\n'
                    b'\r\n+COPS: 0,2,"22801",9\r\n\r\nOK\r\n'
                    None
                    b'\r\n+COPS: (1,"SWISS GSM","SWISS","22801",9),(1,"sunrise","sunrise","22802",9),,(0-4),(0-2)\r\n\r\nOK\r\n'
                    

                    Thanks
                    Felix

                    GPIO translation table M5Stack / M5Core2
                    Information about various M5Stack products.
                    Code examples

                    1 Reply Last reply Reply Quote 0
                    • F
                      Felix22
                      last edited by

                      0_1708295470396_47c4ee57-843e-4408-934c-259ade9fceba-grafik.png

                      :-)

                      1 Reply Last reply Reply Quote 0
                      • felmueF
                        felmue
                        last edited by

                        Hello @Felix22

                        ok, so it seem that the modem is registered with Swisscom, but doesn't get an IP address since AT+COPS? succeeds, but AT+CGCONTRDP fails.

                        At this point I am not sure what might be the issue. Is there anything in the q.beyond portal, like a log showing some error?

                        Also since you used your iPhone with that SIM card before there might be some kind of security check not accepting a connection from a different device. On the q.beyond portal, is there a way to reset / clear the data from the previous connection?

                        Thanks
                        Felix

                        GPIO translation table M5Stack / M5Core2
                        Information about various M5Stack products.
                        Code examples

                        1 Reply Last reply Reply Quote 0
                        • F
                          Felix22
                          last edited by

                          Interesting, this is the response from the DigitalRepublic-SIM-Card how has no NarrowBand.
                          He see the Network also...
                          0_1708297944952_298947a5-15ca-4ffb-9d38-ba507125f028-grafik.png

                          Now, ih have deactivated and new activated the SIM.
                          0_1708299667609_8d6a03a6-055a-400c-81b1-6a1d0b20b0a1-grafik.png

                          Now its a "3" = "Operator forbidden" (?) (Swisscom)
                          and
                          1 for sunrise

                          1 Reply Last reply Reply Quote 0
                          • felmueF
                            felmue
                            last edited by

                            Hello @Felix22

                            hmm, strange. Do you know which roaming partner (Swisscom and/or Sunrise) q.beyond has in Switzerland for NB-IoT? Maybe worth checking with q.beyond support.

                            Thanks
                            Felix

                            GPIO translation table M5Stack / M5Core2
                            Information about various M5Stack products.
                            Code examples

                            1 Reply Last reply Reply Quote 0
                            • F
                              Felix22
                              last edited by

                              Many thanks.

                              I will write to the support from q.beyond.

                              If the connection will go on. What are the Code for an MQTT connection ?
                              If i become an IP-Address, can i use the "normal" MQTT Blockly ??

                              Regards,
                              Felix

                              1 Reply Last reply Reply Quote 0
                              • felmueF
                                felmue
                                last edited by felmue

                                Hello @Felix22

                                please refer to the SIM7020 documentation for MQTT commands. You can find the PDFs here - section Related Link.

                                As soon as the modem gets an IP address the last AT command AT+CGCONTRDP sent by Init NB-IoT DTU block should succeed and then you can use all the other MQTT blocks.

                                Thanks
                                Felix

                                GPIO translation table M5Stack / M5Core2
                                Information about various M5Stack products.
                                Code examples

                                1 Reply Last reply Reply Quote 0
                                • F
                                  Felix22
                                  last edited by

                                  a.beyond say, she works in Switzerland with Swisscom NB.
                                  How can I explicit connect to Swisscom (AT-Command) ?

                                  1 Reply Last reply Reply Quote 0
                                  • felmueF
                                    felmue
                                    last edited by

                                    Hello @Felix22

                                    AT+COPS=1,2,"22801"

                                    Thanks
                                    Felix

                                    GPIO translation table M5Stack / M5Core2
                                    Information about various M5Stack products.
                                    Code examples

                                    1 Reply Last reply Reply Quote 0
                                    • F
                                      Felix22
                                      last edited by

                                      b'AT+CSQ\r\r\n+CSQ: 18,0\r\n\r\nOK\r\n'
                                      men, i have a signal ?

                                      b'AT+CSTT="iotsim.melita.io","",""\r\r\nOK\r\n'
                                      b'AT+CSTT?\r\r\n+CSTT: "iotsim.melita.io","",""\r\n\r\nOK\r\n'
                                      APN is set correct ?

                                      b'AT+CGREG?\r\r\n+CGREG: 0,5\r\n\r\nOK\r\n'
                                      Registered ?

                                      b'AT+COPS: 1,2,"22801"\r\r\nERROR\r\n'
                                      b'AT+COPS?\r\r\n+COPS: 0,2,"22801",9\r\n\r\nOK\r\n'

                                      b'AT+CGACT?\r\r\n+CGACT: 1,0\r\n\r\nOK\r\n'

                                      If i have a connection, do i become an ip-address ?
                                      with the command AT+CIFSR

                                      1 Reply Last reply Reply Quote 0
                                      • felmueF
                                        felmue
                                        last edited by

                                        Hello @Felix22

                                        it is my understanding that AT+CIFSR returns the local IP address in a TCP or UDP connection. (It's an AT command for compatibility with SIM800.)

                                        See PDF document SIM7020 Series_TCPIP_Application Note_V1.04 - 6.2 TCP Client Connection. You'll find the link to the PDF here.

                                        The way I use to set the APN is described in the same TCP/IP PDF - 3.2 APN Manual Configuration.

                                        Thanks
                                        Felix

                                        GPIO translation table M5Stack / M5Core2
                                        Information about various M5Stack products.
                                        Code examples

                                        1 Reply Last reply Reply Quote 0
                                        • F
                                          Felix22
                                          last edited by

                                          0_1708381086058_d7703b57-eaf8-471b-809b-c995d219f6fa-grafik.png

                                          Result:

                                          b'\r\nOK\r\n'
                                          b'\r\nOK\r\n'
                                          b'\r\nOK\r\n'
                                          b'\r\nOK\r\n'
                                          b'\r\nOK\r\n\r\n+CPIN: READY\r\n'
                                          b'\r\n+CGREG: 0,5\r\n\r\nOK\r\n'
                                          b'\r\n+CGCONTRDP: 1,5,"iotsim.melita.io","10.xx.xx.xx.255.255.255.0",,"212.xx.xx.xx","212.xx.xx.xx",,,,,1500\r\n\r\nOK\r\n'

                                          Im a big step wider... now, i have become my ip address... :-)
                                          Now i think... MQTT, next step.

                                          1 Reply Last reply Reply Quote 0
                                          • F
                                            Felix22
                                            last edited by

                                            Juhuuuu !!
                                            It works !
                                            More Information and the solution will follow...

                                            @felmue : many thanks

                                            Felix

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post