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

    ATOM-DTU-NB-IoT - modem does not respond anymore

    Atom
    6
    27
    12.2k
    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
      fkarner @felmue
      last edited by

      Hello,

      I'm working as well with the above mentioned hardware (7020G modem). For a while the program worked fine. Unfortunately since some time the modem does not respond anymore.

      The example MQTT code given here does not work (no errors). I think I'm using the needed libraries, so I would not expect errors coming from there. The here already mentioned way to solve the problem by changing the baudrate was not successfull - still silence.

      The Serial Monitor Output indicates that the initialisation is not possible:
      21:23:10.998 -> waiting....1067s
      21:23:26.485 -> waiting....1082s
      21:23:41.922 -> waiting....1098s
      21:23:57.420 -> waiting....1113s
      21:24:12.866 -> waiting....1129s
      21:24:28.348 -> waiting....1144s
      21:24:43.793 -> waiting....1159s
      21:24:59.276 -> waiting....1175s

      so the M5Atom is still stuck here:

       while (!modem.init()) {
              log("waiting...." + String((millis() - start) / 1000) + "s");
          };
      

      I really don't know how to solve this problem. Since I'm not an expert in programming I would be thankful if someone could help me out with a code to send simple AT-Commands via the Serial Input.

      Thanks in advance
      flori

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

        Hello @fkarner

        hmm, since you already tried changing the modem baudrate I am at a loss what might have gone wrong.

        Maybe my serial pass-through example can shed some light onto this issue?

        Thanks
        Felix

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

        F 1 Reply Last reply Reply Quote 0
        • F
          fkarner @felmue
          last edited by fkarner

          @felmue said in ATOM-DTU-NB-IoT - modem does not respond anymore:

          hmm, since you already tried changing the modem baudrate I am at a loss what might have gone wrong.

          Hi Felix,

          thank you very much for your answer and the code example. I can upload the code, without errors. The Atom stops here:

          19:19:49.162 -> ets Jun 8 2016 00:22:57
          19:19:49.162 ->
          19:19:49.162 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
          19:19:49.162 -> configsip: 188777542, SPIWP:0xee
          19:19:49.162 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
          19:19:49.162 -> mode:DIO, clock div:1
          19:19:49.162 -> load:0x3fff0030,len:1344
          19:19:49.162 -> load:0x40078000,len:13964
          19:19:49.162 -> load:0x40080400,len:3600
          19:19:49.162 -> entry 0x400805f0
          19:19:51.594 -> Start SIM7020 passthrough test

          Unfortunately I do not get answer thru the serial monitor... I've tried:
          AT+CEER=?, AT+CGMI=?, AT+CFUN=1. No response... By the way the modem LED's show acitivity red is on, blue flashes with ~.5Hz....

          After that I reinstalled Arduino IDE. Now there are only the M5Stack Boards and the Arduino Boards listed. As Libraries I installed only the M5Unified and the M5GFX. I'm clueless. What could I try next?

          Update: I've tried another 7020G modem. That one answers....

          *19:43:58.890 -> ets Jun 8 2016 00:22:57
          19:43:58.890 ->
          19:43:58.890 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
          19:43:58.922 -> configsip: 188777542, SPIWP:0xee
          19:43:58.922 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
          19:43:58.922 -> mode:DIO, clock div:1
          19:43:58.922 -> load:0x3fff0030,len:1344
          19:43:58.922 -> load:0x40078000,len:13964
          19:43:58.922 -> load:0x40080400,len:3600
          19:43:58.922 -> entry 0x400805f0
          19:44:01.378 -> Start SIM7020 passthrough test
          19:44:04.165 -> AT+CEER=?

          19:44:04.197 -> +CEER: (0,1)
          19:44:04.197 ->
          19:44:04.197 -> OK
          19:44:14.518 -> AT+CGMI=?*

          Thanks, flori

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

            Hello @fkarner

            thank you for the update. So it's confirmed something's wrong with the first SIM7020G. I still suspect the baudrate got changed somehow, especially since you are writing that the LEDs behave normally.

            Thanks
            Felix

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

            F 1 Reply Last reply Reply Quote 0
            • F
              fkarner @felmue
              last edited by

              Hi @felmue

              Yes I agree, there must be something wrong with this module. I will investigate that later... First priority is to set up one DTU NB IOT module.

              Unfortunately also with the working modem I get errors using the MQTT code example:

              12:37:55.848 -> Initializing modem...
              12:37:55.848 -> [ 62][E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected
              12:37:55.848 -> E (61) gpio: gpio_set_level(227): GPIO output gpio_num error
              12:37:56.138 -> E (364) gpio: gpio_set_level(227): GPIO output gpio_num error

              May they come from the reistallation of Arduino IDE?
              Here are my compiling settings:
              confi.png

              I found the error code here. For sure there must be something wrong with the serial communication.... Strange....

              flori

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

                Hello @fkarner

                I get the same error, but it's not fatal. The error stems from the fact that in ATOM_DTU_NB.h a GPIO is defined, e.g.

                #define ATOM_DTU_SIM7020_RESET -1
                

                for the SIM7020 reset which isn't connected in the DTU.
                If you change that to something like 13 the error goes away.

                The program is probably stuck in Inititalzing modem as it tries to check for the SIM card and that it doesn't have a PIN defined.

                Have you double-checked that the SIM card is placed in the correct orientation and that it doesn't use a PIN?

                Thanks
                Felix

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

                F 1 Reply Last reply Reply Quote 0
                • F
                  fkarner @felmue
                  last edited by

                  Hi again @felmue,

                  Nice to know that there is no problem caused by this error.

                  Contacts facing upward, shape as indicated on the label, should be OK?
                  The SIM card does not use a PIN, nevertheless I tried this:

                  void nbConnect(void) {
                    unsigned long start = millis();
                    log("SimStatus: " + String(modem.getSimStatus()));
                   if (GSM_PIN && modem.getSimStatus() != 3) 
                      {
                      modem.simUnlock("0000");
                      }
                    log("SimStatus: " + String(modem.getSimStatus()));
                  ....
                  

                  gives this:
                  19:20:52.856 -> SimStatus: 0
                  19:21:13.040 -> SimStatus: 0
                  19:21:13.040 -> Initializing modem...

                  So according to this, the SIM card is not ready, right? Could there be a mechanical problem with the SIM card itself?

                  flori

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

                    Hello @fkarner

                    I get SimStatus: 1 when SIM card is installed and recognized. (I get SimStatus: 0 if I remove the SIM card.)

                    So yes, it appears that something is either wrong with the SIM card you are using or with the sim card slot in the DTU.

                    Thanks
                    Felix

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

                    F 1 Reply Last reply Reply Quote 0
                    • F
                      fkarner @felmue
                      last edited by

                      Hello @felmue,

                      I used your pass-through code example to send the AT+CSMINS? command wich gives this with inserted SIM card:

                      20:21:03.854 -> AT+CSMINS?
                      20:21:03.854 -> +CSMINS: 0,0
                      20:21:03.854 ->
                      20:21:03.854 -> OK

                      So it seems that the SIM card is not recognized... Maybe broken. Do you have any recommendation for Nb Iot SIM cards? Maybe https://www.miotiq.com/ for Italy?

                      Thanks flori

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

                        Hello @fkarner

                        Miotiq, in my opinion, is a good offer - I tested with one myself. And they list Italy as supported country.

                        However, when I tried a while ago, the Miotiq SIM did not allow the modem to connect directly to my server. The modem always has to use the Miotiq backend as a proxy. See here.

                        So for instance the M5Stack MQTT example will not work as the modem cannot connect directly to M5Stack MQTT server.

                        Thanks
                        Felix

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

                        F 1 Reply Last reply Reply Quote 0
                        • F
                          fkarner @felmue
                          last edited by fkarner

                          Hi @felmue

                          @felmue said in ATOM-DTU-NB-IoT - modem does not respond anymore:

                          So for instance the M5Stack MQTT example will not work as the modem cannot connect directly to M5Stack MQTT server.

                          Good to know that. If you hadn't pointed that out, I would have fallen into the next trap.
                          So then second best option would be iotcreators? I don't find any information about the need to connect first to a proxy, and the SIMCom7020G is in the list of the certified modems. Should I go for it?

                          Thanks flori

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

                            Hello @fkarner

                            well, while the website iotcreators.com is still up theirs SIM cards no longer seem to be activated. From the iotcreators.com discord server:
                            a user asks: "... I'm wondering if iotcreators.com is still active ..." and
                            [STAFF] Afzal answers: "It is not. Sorry. I tried my best to keep it alive"

                            Thanks
                            Felix

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

                            F 1 Reply Last reply Reply Quote 0
                            • F
                              fkarner @felmue
                              last edited by fkarner

                              Hi @felmue

                              Ok, than next option would be simbase.com. They offer Sim Cards also for individuals. Prices seem a bit higher... Covererage is given also for Italy.
                              Anyone has experience with this service?

                              Thanks, flori

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