🤖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.
    • 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