<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[IoT BASE cycles continuously (Core2 stacked on top)]]></title><description><![CDATA[<p dir="auto">I have taken the stock example for the IoT BASE and updated it for the Core2. Similarly, it has been modified to remove the MQTT functions, for now, to just allow AT commands for debug. I changed IoT BASE library changed for pin 27 (instead of 12 for the orginal Core).</p>
<p dir="auto">However, on initial load from Arduino IDE I get the following error message:<br />
E (1659) I2C: i2s_driver_uninstall(2047): I2S port 0 has not installed</p>
<p dir="auto">The Core2 starts without other issues, begins to connect to the network, etc. However, when I actually checked the wayside I could see that the device was creating and deleting a session about every 7 seconds, wierd. When using the AT commands I could see similar OK---OK, --- , OK---OK, etc. In the IoT BASE there is an LED, hard to see from exterior, so I took the case off. From power up I could see almost exactly the same in hardware from the LED on (about 7 secs), off (about 3 secs), and repeat. I can't find anything in the SIM7080G spec that could do this.</p>
<p dir="auto">My questions are this:<br />
#1 What is the cause of the error message, is it related, and how to solve?<br />
#2 Is the IoT BASE faulty?<br />
#3 Is there another conflict Core2 vs IoT BASE that this is a symptom of?<br />
#4 Does anyone have a working Core2 IoT BASE example I could try?<br />
#5 Have I missed anything else in my ported example from Core to Core2?</p>
<pre><code class="language-#include">// #include &lt;M5GFX.h&gt;
#include "IoT_BASE_SIM7080.h"
#include &lt;PubSubClient.h&gt;
#include &lt;TinyGsmClient.h&gt;
#include &lt;time.h&gt;
#include &lt;sys/time.h&gt;


#define MQTT_BROKER "mqtt.m5stack.com"
#define MQTT_PORT 1883
#define MQTT_USERNAME "IoT_BASE_CATM"
#define MQTT_PASSWORD "IoT_BASE_PWD"
#define MQTT_D_TOPIC "IoT_BASE_CATM/D"
#define MQTT_U_TOPIC "IoT_BASE_CATM/U"  //  上传数据主题

#define UPLOAD_INTERVAL 10000
uint32_t lastReconnectAttempt = 0;

TinyGsm modem(SerialAT);

TinyGsmClient tcpClient(modem);
PubSubClient mqttClient(MQTT_BROKER, MQTT_PORT, tcpClient);

void mqttCallback(char *topic, byte *payload, unsigned int len);
bool mqttConnect(void);
void nbConnect(void);

// Your GPRS credentials, if any
const char apn[] = "soracom.io";
const char gprsUser[] = "sora";
const char gprsPass[] = "sora";

struct tm now;
char s_time[50];

// M5GFX display;
// M5Canvas canvas(&amp;display);

// Module baud rate
uint32_t rate = 0;  // Set to 0 for Auto-Detect

void log(String info) {
  // canvas.println(info);
  // canvas.pushSprite(0, 0);
  M5.Lcd.print(info);
  SerialMon.println(info);
}

void setup() {
  M5.begin();
  iotBaseInit();
  // display.begin();
  // canvas.setColorDepth(1);  // mono color
  //canvas.setFont(&amp;fonts::efontCN_14);
  // canvas.createSprite(display.width(), display.height());
  // canvas.setTextSize(2);
  // canvas.setPaletteColor(1, GREEN);
  // canvas.setTextScroll(true);
  // canvas.println("&gt;&gt;IoT BASE MQTT TEST");
  // canvas.pushSprite(0, 0);
  M5.Lcd.setTextSize(2);
  M5.Lcd.print("&gt;&gt;IoT BASE MQTT TEST");
  SerialAT.begin(SIM7080_BAUDRATE, SERIAL_8N1, IoT_BASE_SIM7080_RX,
                 IoT_BASE_SIM7080_TX);
  nbConnect();
}

void loop() {
  if (!rate) {
    rate = TinyGsmAutoBaud(SerialAT);
  }

  if (!rate) {
    SerialMon.println(F("***********************************************************"));
    SerialMon.println(F(" Module does not respond!"));
    SerialMon.println(F("   Check your Serial wiring"));
    SerialMon.println(F("   Check the module is correctly powered and turned on"));
    SerialMon.println(F("***********************************************************"));
    delay(30000L);
    return;
  }

  // SerialAT.begin(rate);

  // Access AT commands from Serial Monitor
  SerialMon.println(F("***********************************************************"));
  SerialMon.println(F(" You can now send AT commands"));
  SerialMon.println(F(" Enter \"AT\" (without quotes), and you should see \"OK\""));
  SerialMon.println(F(" If it doesn't work, select \"Both NL &amp; CR\" in Serial Monitor"));
  SerialMon.println(F("***********************************************************"));

  while (true) {
    if (SerialAT.available()) {
      SerialMon.write(SerialAT.read());
    }  // else {
    //log("no SerialAT");
    //}
    if (SerialMon.available()) {
      SerialAT.write(SerialMon.read());
    }  //else {
    //  log("no SerialMon");
    //}
    delay(50);
  }
}

void nbConnect(void) {
  unsigned long start = millis();
  log("Initializing modem...");
  while (!modem.init()) {
    log("waiting...." + String((millis() - start) / 1000) + "s");
  };

  start = millis();
  log("Waiting for network...");
  while (!modem.waitForNetwork()) {
    log("waiting...." + String((millis() - start) / 1000) + "s");
  }

  log("Waiting for GPRS connect...");
  if (!modem.gprsConnect(apn, gprsUser, gprsPass)) {
    log("waiting...." + String((millis() - start) / 1000) + "s");
  }
  log("success");
}</code></pre>
]]></description><link>https://community.m5stack.com/topic/5772/iot-base-cycles-continuously-core2-stacked-on-top</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Mar 2026 12:18:05 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5772.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Nov 2023 08:56:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to IoT BASE cycles continuously (Core2 stacked on top) on Mon, 06 Nov 2023 11:46:42 GMT]]></title><description><![CDATA[<p dir="auto">Cool, thanks, <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a>. I might put the modem on/off on a button instead for a bit more control while testing.</p>
]]></description><link>https://community.m5stack.com/post/22661</link><guid isPermaLink="true">https://community.m5stack.com/post/22661</guid><dc:creator><![CDATA[gavin67890]]></dc:creator><pubDate>Mon, 06 Nov 2023 11:46:42 GMT</pubDate></item><item><title><![CDATA[Reply to IoT BASE cycles continuously (Core2 stacked on top) on Sat, 04 Nov 2023 18:03:24 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/46536">@gavin67890</a></p>
<p dir="auto">check this document <a href="https://www.waveshare.com/w/upload/e/e7/SIM7080G_Hardware_Design_V1.03.pdf" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>; section <em>3.2 Power on/Power off Function</em></p>
<p dir="auto">Other SIMCOM modems have specific times for the on pulse vs. off pulse (e.g. shorter to power on and longer for power off). However the SIM7080G only has minimal values specified for both and they are even overlapping. So yes, it could be that when the modem is already running the pulse turns it off.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/22649</link><guid isPermaLink="true">https://community.m5stack.com/post/22649</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 04 Nov 2023 18:03:24 GMT</pubDate></item><item><title><![CDATA[Reply to IoT BASE cycles continuously (Core2 stacked on top) on Sat, 04 Nov 2023 18:04:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a>,</p>
<p dir="auto">Ha, I was literally working your <a href="https://forum.m5stack.com/topic/4694/uiflow-and-cat-m-module-sim7080g" target="_blank" rel="noopener noreferrer nofollow ugc">post</a>. I checked Issues, not Pull Requests on GitHub. I have raised an Issue to second your observation.</p>
<p dir="auto">I changed mine to:</p>
<pre><code>void iotBaseInit() {
    pinMode(IoT_BASE_SIM7080_EN, OUTPUT);
    digitalWrite(IoT_BASE_SIM7080_EN, LOW);
    delay(5000);
    digitalWrite(IoT_BASE_SIM7080_EN, HIGH);
    delay(2000);
    digitalWrite(IoT_BASE_SIM7080_EN, LOW);
};
</code></pre>
<p dir="auto">I don't get the slow on off blink on the LED, it stays solid. How sensitive are the timings, I noticed your other example below was quite rapid:</p>
<pre><code>digitalWrite(27, 0)
  wait_ms(100)
  digitalWrite(27, 1)
  wait_ms(100)
  digitalWrite(27, 0)
  wait_ms(100) # GB: Required?
</code></pre>
<p dir="auto">With the value top above a long 5s high pulse the LED held steady from the Arduino upload. The behaviour from the Core2 reset button is odd, I think it turned the modem off, so more fiddling. But IOU a virtual beer!!!</p>
<p dir="auto">Also, I made a tiny mod to the IoT BASE with a small round file. Now the LED is visible for fault finding.<br />
<img src="/assets/uploads/files/1699120931336-screenshot-2023-11-04-at-17.58.48.png" alt="0_1699120920082_Screenshot 2023-11-04 at 17.58.48.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/22648</link><guid isPermaLink="true">https://community.m5stack.com/post/22648</guid><dc:creator><![CDATA[gavin67890]]></dc:creator><pubDate>Sat, 04 Nov 2023 18:04:42 GMT</pubDate></item><item><title><![CDATA[Reply to IoT BASE cycles continuously (Core2 stacked on top) on Sat, 04 Nov 2023 14:23:35 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/46536">@gavin67890</a></p>
<p dir="auto">the sample code is incorrect. I've created a PR for that issue about a year ago; unfortunately M5Stack engineers haven't yet integrated my fix. See <a href="https://github.com/m5stack/IoT_BASE_SIM7080/pull/2" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/22647</link><guid isPermaLink="true">https://community.m5stack.com/post/22647</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 04 Nov 2023 14:23:35 GMT</pubDate></item></channel></rss>