@codelery It might be because of buffer size of received message. You need to increase the buffer size.
Check the section "Expanding Arduino SoftwareSerial Buffer Size" in this tutorial : https://lastminuteengineers.com/sim800l-gsm-module-arduino-tutorial/
Posts made by rafitc99
-
RE: Help needed: Arduino Wireless Notice Board project
-
RE: Help needed: Arduino Wireless Notice Board project
@codelery You can use any Arduino board. So far as i remember, we used Arduino UNO.
Somehow i found the code in my gist. It was a 3 year old project. So, i don't remember most of the things
Code:
#include <SoftwareSerial.h> #include <SPI.h> #include <DMD.h> #include <TimerOne.h> #include "SystemFont5x7.h" #include "Arial_black_16.h" #define ROW 1 #define COLUMN 1 #define FONT Arial_Black_16 DMD led_module(ROW, COLUMN); String st; const char *msg; unsigned int LengMsg; char finalMsg[100] = ""; SoftwareSerial mySerial(3, 2); void scan_module() { led_module.scanDisplayBySPI(); } void setup() { Timer1.initialize(2000); Timer1.attachInterrupt(scan_module); led_module.clearScreen( true ); Serial.begin(9600); mySerial.begin(9600); Serial.println("Starting..."); delay(1000); mySerial.println("AT"); updateSerial(); mySerial.println("AT+CMGF=1"); updateSerial(); mySerial.println("AT+CNMI=1,2,0,0,0"); updateSerial(); } void loop() { // pollSms(); displayMessage(); delay(500); //Start print in led matrix led_module.selectFont(FONT); led_module.drawMarquee(finalMsg, LengMsg, (32 * ROW), 0); long start = millis(); long timming = start; boolean flag = false; while (!flag) { if ((timming + 20) < millis()) { flag = led_module.stepMarquee(-1, 0); timming = millis(); } } } //------GSM Helper void displayMessage() { delay(500); String msg = ""; int start = 0, endPoint = 0; finalMsg[100] = ""; while (Serial.available()) { mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port // parseData(mySerial.readString());//Calls the parseData function to parse SMS } while (mySerial.available()) { msg = mySerial.readString();//Forward what Software Serial received to Serial Port } if (msg.length() > 1) { start = msg.indexOf('*') + 1; endPoint = msg.indexOf('#') - 1; int count = 0; if (start > 1 && endPoint > 1) { strcpy( finalMsg, ""); for (int i = start; i <= endPoint; i++) { finalMsg[count] = msg[i]; count++; } Serial.println("SMS Received: "); Serial.println(finalMsg); LengMsg = count; } else{ return false; } } } void updateSerial() { delay(500); while (Serial.available()) { mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port } while (mySerial.available()) { Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port } }
NB: The sms body should be between start and hash
Eg: * Hello Makers! # -
NMCLI AP Mode config error | Connection activation failed: No suitable device found for this connection | Raspberry Pi 3 Model B Rev 1.2
I was trying to configure AP mode in Raspberrypi by using Network Manager. I'm using the below script. but it is throwing some errors.
Bash Script to set AP Mode
host="MyRPiAPMode" sudo nmcli con add type wifi ifname wlan0 con-name $host autoconnect yes ssid $host sudo nmcli con modify $host 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared sudo nmcli con modify $host wifi-sec.key-mgmt wpa-psk sudo nmcli con modify $host wifi-sec.psk "SomeRandomPassword" sudo nmcli radio wifi on sudo nmcli con up $host
Error ----
Connection 'MyRPiAPMode' (60965f2a-f510-48ef-afaf-0864242d0c06) successfully added. Error: Connection activation failed: No suitable device found for this connection (device eth0 not available because profile is not compatible with device (mismatching interface name)).
nmcli con (After script execution)
NAME UUID TYPE DEVICE Wired connection 1 9589ff1a-9923-3de3-a8a4-90b319661878 ethernet eth0 MyRPiAPMode 60965f2a-f510-48ef-afaf-0864242d0c06 wifi --
nmcli dev
DEVICE TYPE STATE CONNECTION eth0 ethernet connected Wired connection 1 wlan0 wifi unavailable -- lo loopback unmanaged --
I tried to make it availble via
sudo nmcli radio wifi on
But not working.this is the log
-- Journal begins at Sat 2021-08-07 09:28:21 IST. -- Aug 10 15:06:19 NWPI-b5b072 NetworkManager[16140]: <info> [1660124179.9816] audit: op="connection-update" uuid="60965f2a-f510-48ef-afaf-0864242d0c06" name="MyRPiAPMode" args="802-11-wireless-security.psk" pid=25120 uid=0 result="success" Aug 10 15:06:20 NWPI-b5b072 NetworkManager[16140]: <info> [1660124180.0902] audit: op="radio-control" arg="wireless-enabled" pid=25125 uid=0 result="success" Aug 10 15:06:21 NWPI-b5b072 NetworkManager[16140]: <info> [1660124181.4241] agent-manager: agent[641f99ab55d9691c,:1.692/nmcli-connect/0]: agent registered Aug 10 15:06:21 NWPI-b5b072 NetworkManager[16140]: <info> [1660124181.4281] audit: op="connection-activate" uuid="60965f2a-f510-48ef-afaf-0864242d0c06" name="MyRPiAPMode" result="fail" reason="No suitable device found for this connection (device eth0 not available because profile is not compatible with device (mismatching interface name))." Aug 10 15:06:52 NWPI-b5b072 NetworkManager[16140]: <info> [1660124212.0573] agent-manager: agent[70ee130ba0f26cd7,:1.696/nmcli-connect/1000]: agent registered Aug 10 15:06:52 NWPI-b5b072 NetworkManager[16140]: <info> [1660124212.0614] audit: op="connection-activate" uuid="60965f2a-f510-48ef-afaf-0864242d0c06" name="MyRPiAPMode" result="fail" reason="No suitable device found for this connection (device eth0 not available because profile is not compatible with device (mismatching interface name))." Aug 10 15:07:23 NWPI-b5b072 NetworkManager[16140]: <info> [1660124243.0370] agent-manager: agent[cc77ef461499c164,:1.700/nmcli-connect/0]: agent registered Aug 10 15:07:23 NWPI-b5b072 NetworkManager[16140]: <info> [1660124243.0414] audit: op="connection-activate" uuid="60965f2a-f510-48ef-afaf-0864242d0c06" name="MyRPiAPMode" result="fail" reason="No suitable device found for this connection (device eth0 not available because profile is not compatible with device (mismatching interface name))." Aug 10 15:07:41 NWPI-b5b072 NetworkManager[16140]: <info> [1660124261.8406] agent-manager: agent[79b01af218789b42,:1.702/nmcli-connect/0]: agent registered Aug 10 15:07:41 NWPI-b5b072 NetworkManager[16140]: <info> [1660124261.8446] audit: op="connection-activate" uuid="60965f2a-f510-48ef-afaf-0864242d0c06" name="MyRPiAPMode" result="fail" reason="No suitable device found for this connection (device eth0 not available because profile is not compatible with device (mismatching interface name))."
-
RE: ESP8266 Restart while running ISR. [ESP8266 FreeRTOS SDK]
BaseType_t xQueueSendFromISR ( QueueHandle_t xQueue, const void *pvItemToQueue, BaseType_t *pxHigherPriorityTaskWoken );
I was trying to pass a pointer. That was the issue.
Reference -
RE: ESP8266 Restart while running ISR. [ESP8266 FreeRTOS SDK]
Update!!
I found the issue
I created a Queue inside Rgpio.cpp and called a Funciton from main.cpp to check data in Queue. That worked well!!Reference to the #commit .
-
ESP8266 Restart while running ISR. [ESP8266 FreeRTOS SDK]
I'm trying to pass a value into Queue from Interrupt Service Routine(ISR) using
xQueueSendFromISR()
<-- ReferenceBut I'm getting this error and ESP restart immediately.
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled. Core 0 register dump: PC : 0x4021227c PS : 0x00000033 A0 : 0x4021c72e A1 : 0x3ffe8220
Here is the gpio interrupt example which I'm following.
Here is my code. I did some modification in this.
Check 70th line of this location.
static void main_power_isr_handler(void* arg) { xQueueHandle* main_q = (xQueueHandle*)arg; static main_q_payload_t msg; msg.hdr = E_MAIN_MSG_MAIN_POWER_STATUS; msg.bool_payload = gpio_get_level(GPIO_MAIN_POWER); //ets_printf("Someone Interrupted \n "); xQueueSendFromISR(main_q, &msg, NULL); //!!! THIS LINE }
-
RE: SIM800L is not working after disconnecting with PC
Thank-you @salmanfaris
It's solved.
Actually, It was my mistake. I didn't add a proper reset for MCU. -
RE: SIM800L is not working after disconnecting with PC
@salmanfaris When connecting with PC. It will work well.
-
RE: SIM800L is not working after disconnecting with PC
@salmanfaris At that time not receiving an actual message. Receiving a blank message.