Sony's Developer World forum

    • Home
    • Forum guidelines

    Upcoming maintenance 

     

    Dear Customers and Partners.

    This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.

    This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.

    We apologize for any inconvenience.

     

     

    Arduino Library for LTE support

    Spresense
    3
    4
    1584
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • bobwilmes 0 1 1
      bobwilmes 0 1 1 last edited by

      Unfortunately I couldn't attend the LTE webinar this morning.
      Is there a replay video on YouTube ?
      I wanted to ask if there is an Arduino sketch library for using the LTE modem.

      I found this example on Github that uses Spresense LTE to connect to the IoT network called Ambient
      but it doesn't provide further detail.

      https://github.com/bobwilmes/Spresense-Playground/tree/master/sketches/CO2Sensing/viaLTE/CO2_sensing_to_Ambient

      N 1 Reply Last reply Reply Quote
      • N
        nimish @bobwilmes 0 1 1 last edited by

        @bobwilmes-0-1-1 There's a few Arduino "Examples" that involve LTE that you can try, I used it to confirm the modem worked.

        They all use: https://developer.sony.com/develop/spresense/developer-tools/api-reference/api-references-arduino/LTE_8h.html

        1 Reply Last reply Reply Quote
        • bobwilmes 0 1 1
          bobwilmes 0 1 1 last edited by

          @nimish Thanks for the LTE Arduino link
          I am trying to connect to Amazon AWS IoT using LTE.
          LTE Test Example not working. I checked with the https://iot.truphone.com site and my SIM is activated. When I ran the example LTE Test Modem Arduino Script (https://developer.sony.com/develop/spresense/docs/arduino_tutorials_en.html#_publish_gnss_positioning_information_to_aws_server)
          it returns "Starting modem test...." but the modem beign never returns.

          *** Has anyone else run into problems getting their LTE modem to start ? ***
          I used the ICCID of the modem for the IMEI.

          /*

          • LteTestModem.ino - Example for obtaining modem information
          • Copyright 2019, 2021 Sony Semiconductor Solutions Corporation
          • This library is free software; you can redistribute it and/or
          • modify it under the terms of the GNU Lesser General Public
          • License as published by the Free Software Foundation; either
          • version 2.1 of the License, or (at your option) any later version.
          • This library is distributed in the hope that it will be useful,
          • but WITHOUT ANY WARRANTY; without even the implied warranty of
          • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
          • Lesser General Public License for more details.
          • You should have received a copy of the GNU Lesser General Public
          • License along with this library; if not, write to the Free Software
          • Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
          • This sketch turns on the modem and gets IMEI and FW version.
          • Do not need a SIM card for this example.
            */

          // libraries
          #include <LTE.h>

          // initialize the library instance
          LTEModem modem;

          // IMEI variable
          String IMEI = "8944477100001754988";
          String VERSION = "1";
          LTENetworkRatType RAT = LTE_NET_RAT_UNKNOWN;
          void setup() {
          // initialize serial communications and wait for port to open:
          Serial.begin(115200);
          while (!Serial) {
          ; /* wait for serial port to connect. Needed for native USB port only */
          }

          // start modem test (reset and check response)
          Serial.println("Starting modem test...");
          // Power on the modem
          if (LTE_IDLE == modem.begin()) {
          Serial.println("modem.begin() succeeded.");
          } else {
          Serial.println("Could not transition to LTE_IDLE.");
          Serial.println("Please check the status of the LTE board.");
          for (;;) {
          sleep(1);
          }
          }
          }

          void loop() {

          // IMEI of the modem
          IMEI = modem.getIMEI();
          Serial.println("IMEI: " + IMEI);

          //Firmware version of the modem.
          VERSION = modem.getFirmwareVersion();
          Serial.println("VERSION: " + VERSION);

          // Current RAT of the modem.
          RAT = modem.getRAT();

          switch (RAT) {
          case LTE_NET_RAT_CATM:
          Serial.println("RAT: LTE-M (LTE Cat-M1)");
          break;
          case LTE_NET_RAT_NBIOT:
          Serial.println("RAT: NB-IoT");
          break;
          default:
          Serial.println("RAT: Unknown type [" + String(RAT) + "]");
          break;
          }

          sleep(1);
          }

          C 1 Reply Last reply Reply Quote
          • C
            CamilaSouza DeveloperWorld @bobwilmes 0 1 1 last edited by

            Hello, @bobwilmes-0-1-1
            From your latest question I guess you were able to solve this problem? Let me know what was the solution if that is the case 🙂

            1 Reply Last reply Reply Quote
            • First post
              Last post
            Developer World
            Copyright © 2021 Sony Group Corporation. All rights reserved.
            • Contact us
            • Legal