developing a IOT device using GSM 7600E - gsm

I am using a SIM7600E module, the module connects to the network and AT+CREG returns 0,5 and when I check the signal quality using AT+CSQ returns 11,99.
I am getting a bit error rate (ber) as 99, idk if this can cause problems during communication. As i am unable to send text messages or connect to the GPRS network as i am not assigned any IP(AT+CGREG returns 0,5)?
Is there anyway to improve the ber 99?

Related

ESP-NOW with HTTPClient Request Returning Status Code -1

I'm building a project where I use 2 ESP8266 and 1 ESP32 devices, where I collect data with sensors on ESP8266's and send those gathered data to ESP32. Then, this ESP32 device sends an HTTP request (w/ HTTPClient) to my NodeJS Web Server, with the data received, which will eventually be processed there and saved to the database.
I'm having a problem though; when I use some mock data, and use only ESP32 without ESP-NOW and any other connection with other devices, I get status code 200, which indicates that my HTTP Request is sent succesfully. And when I use ESP-NOW to establish conenction between ESP devices, and not send any HTTP Request, I can successfully send and receive data.
However, when I use ESP-NOW to send and receive data, and send the data using HTTPClient request to my Web server on ESP32, I get status code -1 (refused connection). I couldn't find any other issues regarding this topic, so I figured I might ask for some help.
I have also used painlessmesh library to send/receive data between ESP devices, but that gave me the same exact issue. I'm using Wifi mode STA on my ESP32 device, which I connect it to my router to connect to the internet.
Thanks in advance for any help and support.
You cannot use ESP-NOW and WiFi in parallel at the same time; it's either-or. Exception: if you use the same channel for both (may not be possible)!
Option 1
You can alternate between the two protocols. So, as soon as the ESP-NOW transmissions from node 1 has completed (data fully received) you turn off ESP-NOW, connect to WiFi, publish via MQTT and then reverse. Needless to say that while your ESP32 is on WiFi you cannot receive data via ESP-NOW from either node 1 or node 2.
Option 2
Use some sort of gateway between ESP-NOW and WiFi. This product for example contains two ESP32 (connected over UART), one for ESP-NOW, one for WiFi: https://thingpulse.com/product/espgateway/. Disclaimer: I am a ThingPulse co-founder.
It is possible to run a web server and esp_now in the same esp32. Check my code here https://github.com/Servayejc/esp_now_web_server for the server
https://github.com/Servayejc/esp_now_web_server for the sender
This code make also automatic pairing of the nodes of esp_now.
This code is based on randomnerdtutorial…

ESP8266 connection to a Arduino Nano

I am trying to connect a WiFi module (ESP8266) to a "funduino" development board (Arduino Nano) but I have no success. Since I tried so much schematics I've found on the internet about the connection between them two, I kindly ask here if is anyone who succeed in "pairing" this two devices.
I am asking for the schematic and a functional source code.
Regards
The ESP-01 by default comes with nonOS SDK bootloader that communicated via AT commands, you can find the complete command set from Expressif here. This is designed for an MCU (like Arduino Nano) to use it purely as an WiFi module rather than using it as a stand-alone MCU (for which it will require NodeMCU SDK).
If you ever upload an Arduino sketch up to the ESP-01, it will erase the AT Command firmware.
Assuming your ESP-01 is still having the AT Command firmware. What #Ben provided is a sketch that allows you to type AT commands via the Serial Monitor to internact with the ESP-01, it is manual, and good for testing if ESP-01 is working (you type AT and press return on Serial Monitor, the ESP-01 will ack with Ok) but not practical as a real application. The minimum commands required to established an WiFi connection with ESP-01 is listed below.
AT+CIPMUX=1 - Enable single (0) or multiple connection (1) to the web server.
Multiple connection is a good option if you are repeatedly sending
out or reading data from the Internet.
AT+CWMODE=3 - Set WiFi mode: 1 is station mode (ESP8266 is client), 2 is AP mode
(ESP8266 acts like a WiFi router where your phone or PC can connect),
3 is AP+station mode (make the ESP8266 do both)
AT+CWJAP=“<your-ssid>”,”<your-pw>” - Connect to your WiFi. Provide your SSID name
and password inside the double qoutes.
AT+CIFSR - This returns the IP address of the module, indicating that it has
successfully connected to your WiFi router.
Once the WiFi connection is established, you can further communicate with the ESP-01 via the connection, like accessing a website for example:
AT+CIPSTART=0,"TCP", "www.example.com","80” - Start TCP or UDP connection. The
0 is the id of the connection.
AT+CIPSEND=0,16 - Command to tell the module data is ready to be sent. 0 is the
connection id, and 16 is the length of the data to be sent.
After this command, the ESP8266 will reply with the “>”
character to tell us that it will be waiting for the data to be
sent. If successful, the module will reply with “SEND OK”
GET / HTTP/1.1 - Send the http header, and other data, etc...
You can write your own sketch to automate those AT commands for interacting with with ESP-01 once you understand the AT commands required for establish a WiFi connection.
Here are two resources that I personally found extremely useful for doing more than connecting to WiFi.
STM32-ESP-01 Web Server - although this is for interfacing with STM32, the main difference is the pin assignment, so you should be able to port to Arduino easily.
MQTT via ESP-01
As for hardware interface, please noted that what #Ben provided is correct in principle, but you need to be aware that the ESP-01(ESP8266 to be precise) is a 3V3 MCU, so the connection is depended on what kind of host board you are using. If you are using Arduino Uno/Nano, both are having a 5V MCU, you will need a voltage divider (two resistors to drop the voltage to 3v3 before connecting to ESP-01) or a level shifter chip at least for the ESP-01 Rx pin to avoid the potential damage to the ESP-01.

SIM800L incoming sms stuck in memory

I hit a deadened trying to receive sms on the SIM800L module with Arduino Uno.
I'm using the Receive sms sketch on the IDE, the module does not receive incoming messages and just keeps displaying one sms over and over, this message is the first one I sent to the module, and somehow it's stuck in memory. the sms.flush() method does't erase the message, how do I go about clearing memory to create space for incoming messages ? Thanks
The SIM800L has a vendor specific command to delete all messages, this may clear up enough space for it to receive additional messages.
Run AT+CMGDA=? to find out which mode you need to use. The modem responds with (1-6) or lists the responses in text mode.
Then run AT+CMGDA=6 if the modem responded with numbers, or AT+CMGDA="DEL ALL".
To avoid overflowing the storage, using AT+CNMI=2,2 you can tell the modem to always forward incoming messages to the terminal and avoid storing them in the SIM card or modem memory.

Arduino & ESP8266 - strange characters in response

I'm working on an Arduino Uno + ESP8266 project.
I try to use them as a web server on Wi-Fi network to control a motor that connects to Arduino - basically a trigger system that receives signals via Wi-Fi. Currently, I've successfully connected ESP8266 to my access point by sending AT commands from Arduino. Another client on the same network can statically access ESP8266's assigned IP address.
However, when I try to catch some HTTP queries (I want to use them as conditions to control the motor) I occasionally encountered the non-ASCII characters in HTTP request. I use serial comm to debug, please look at the screenshot in the link below:
Arduino - Computer serial communication for debugging
The line ",519:POST ..." should contain a complete number following "/?", but there's some strange characters instead. So I cannot determine the input data to control motor. Once in a blue moon, the expected format of request shows up as follows:
The correct data received
There's no issue with the HTTP response part, even though I got the uninterpretable request, I can still send the JSON error message back to client.
Attempt Note:
The Arduino uses different serial ports to talk to computer and ESP8266. Since the connection can be established, and the data being sent, I believe that the baud rate is simply correct on both side. (115200 for ESP8266, 9600 for computer - also tried 115200 for both and got the same result)
I use V3.3 from Arduino as power source for ESP8266. But I also use voltage regulator to smooth out the current as many people suggest that. The problem still remains.
I'm struggled with this issue for a few days, just want to know if anybody had the similar experience, or could give some clue for the next step.
After a considerable effort to stabilize the circuit, I switched to NodeMCU and got the system working perfectly. I assume that ESP8266 alone is somehow not robust enough without other components, which I unfortunately have no knowledge on.
So I'd like to close this thread with a short recommendation for anybody struggling with the same issue to switch to NodeMCU (which would replace both Arduino and ESP8266); if that could support the requirement.

SNMP custom made device ESP8266

my company uses the application PRTG from paessler.com to monitor several SNMP sensors, I need to monitor the voltage of some devices and transmit it to the manager.
I was going to use an ESP8266 programmed via arduino to do it.
So far I've been able to send data to the ESP via UDP, and I configured it in the manager so it can retrieve the information from it and ping it.
The ping tests are successful however the monitoring does not work, by using the serial interface I can see that the ESP is receiving the data from the manager, with the OID that was set up. But the monitor shows it as inactive, I set up the ESP to send a simple string in the response.
When using a program called Packet Sender I am able to send the udp packets and receive the response as well, and everything works fine.
The ports I am using is 161 to receive in the ESP and I made it send to the 161, 123, 1023 as i saw specified in the prtg site
I may be sending the packets trough a port that is not the right one, or maybe I have to put a header before the message so the controller can Interpret it. I am not sure what the error can be. Any help will be apreciated
pretty easy - simply use the http push sensor from PRTG:
https://www.paessler.com/manuals/prtg/http_push_data_sensor
All best
Christian

Resources