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

    Stuck getting started on COM.NB-IoT (SIM7020G) with Core2

    Modules
    2
    2
    2.6k
    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.
    • T
      torntrousers
      last edited by

      Have a new COM.NB-IoT (SIM7020G) with Core2 but can't get get anything much to work.

      Have an external 5v power supply for the COM.NB-IoT and inserted a SIM card and attached to the Core2. POwering on the external power supply starts LEDs flashing in the COM.NB-IoT and the Core2 boots up, so that looks like its all connected together properly.

      Flashing the Core2 with the EasyLoader from the COM.NB-IoT doc page and connecting a Serial Monitor shows:
      M5Stack initializing... AT+CSQ
      AT+CSQ
      AT+CSQ
      AT+CSQ
      with the AT+CSQ repeating every 10 seconds.

      So it looks like there is a problem with the serial connection to the COM.NB-IoT.

      Hunting around I found this repo: https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/COMX_NB-IoT

      That uses #include <M5Stack.h> which doesn't appear to work with the Core2 so changing it to #include <M5Core2.h> and adding #include <AXP192.h> to fix another compile error, and
      this doc page https://shop.m5stack.com/products/com-nb-iot-modulesim7020g talks about changing:

          M5.begin();
      Serial2.begin(115200, SERIAL_8N1, 5, 13);
      

      to:

        M5.begin(true, true, true, false, kMBusModeInput);
        Serial2.begin(115200, SERIAL_8N1, 13, 14);
      

      So all that gets it compiling cleanly, but still it doesn't talk to the COMX_NB-IoT and just gets repeating AT+CSQ.

      Any help would be greatly appreciated.

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

        Hello @torntrousers

        if you use GPIO 13, 14 in your code (as suggested) then in the COM.NB-IoT module you'll need to set dip switches for GPIO 16, 17 to on (the other four to off).

        The GPIO numbering in modules are (so far) always matching the numbering in M5Stack (Base, Gray, Fire) devices but unfortunately M5Core2 uses some different GPIOs on the M5 bus.

        This comparison I've put together a while ago might help.

        Thanks
        Felix

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

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