Can NOT launch a HTTP operation using SIM5320E - arduino

I want to send/receive data to/from website by using SIM5320E.
Connection between my PC and module SIM5320E is look good because the AT command responses OK. But the command to launch a HTTP operation gets ERROR.
It seems that my SIM5320E is NOT connected to 3G network. The GPRS is no longer available in Japan (DOCOMO) now.
How to active SIM4320E connect to 3G ?
This is my current result.
AT
OK
AT+COPS?
+COPS: 0,0,"NTT DOCOMO",2
OK
AT+CGSOCKCONT=1,"IP","line.me"
OK
AT+CSOCKSETPN=1
OK
AT+CSOCKAUTH=1,3,"line","line#line"
OK
AT+CHTTPACT=?
+CHTTPACT: "ADDRESS",(1-65535)
OK
// I got error from here
AT+CPING="google.com",1
OK
+CPING: 3,0,0,0,0,0,0
AT+CHTTPACT="google.com",80
+CHTTPACT: 237
ERROR
AT+CHTTPACT="www.google.com",80
+CHTTPACT: 237
ERROR
AT+CHTTPACT="stackoverflow.com",80
+CHTTPACT: 237
ERROR
Update 1: Also tried this
AT+CMEE=2
OK
AT+CHTTPSSTART
ERROR
AT+CHTTPSSTART\r\nAT+CHTTPSOPSE="pruebas.libelium.com",80,1\r\nAT+CHTTPSSEND=88\r\n"GET / HTTP/1.1"\r\nHost: pruebas.libelium.com\r\nContent-Length: 0"
ERROR
Update 2: Also tried
AT+CNMP?
+CNMP: 2
OK
AT+CNAOP?
+CNAOP: 2
OK
AT+CPSI?
+CPSI: WCDMA,Online,440-10,0x01C6,72728730,WCDMA IMT 2000,331,10736,0,4.5,70,31,45,500
OK
AT+CHTPSERV="ADD","www.google.com",80,1
OK
AT+CHTPUPDATE
OK
+CHTPUPDATE: 4 // Network error
Thanks!

I was able to download web site data using SIM5320E module. Haven't used SIM4320E though but should be quite similar.
Follow the exact steps in SIM5320e HTTPS Stack, can't make successful GET request which worked for me.
From what you have provided:
You have selected the correct module for DOCOMO band (2100Mhz) according to Cellular Bands in Japan. Since AT+CPSI? and AT+COPS? shows it's online with WCDMA so may assume it's connected to network. You can use AT+CREG? and AT+CGREG? to see whether your voice and data connections are registered with the network (It must be registered with the network)
If it's not connected to the network. Try AT+COPS=2 to force it to select a network.
AT+CHTTPSSTART can fail, if the HTTPS service has already been started. So you can use following commands to restart it.
AT+CHTTPSCLSE
AT+CHTTPSSTOP
AT+CHTTPSTART
If you still face problems, try using this Tutorial by SimComm. It doesn't contain the 3G connectivity stuff. But you can make sure your module works fine with your network. Once it's ensured, try following the steps mentioned above.
All the best!

Related

Sim7080G module can't send data over TCP while using GNSS

I bought a Simcom (Sim7080G) module to use it for geolocation and send data over TCP. These modules are quite new on the market (it was first launched in mid 2019) and there is some weird functionning with it. I would like to know if people that use it struggle with the same problem.
My goal is to take GNSS (latitude/longitude) informations, and to send them over TCP.
Activate and take GNSS informations
AT+CGNSPWR=1
returns OK
AT+CGNSINF returns +CGNSINF: 1,1,20200517191239.000,4x.xxxxxx,6.xxxxxx,473.769,0.00,,0,,1.9,2.1,1.0,,7,,7.9,6.0
Connect to any TCP server
AT+CNACT=0,1 returns OK\r\n\r\n+APP PDP: 0,ACTIVE
AT+CAOPEN=0,0,"TCP",151.101.1.69,80 (151.101.1.69 is stackoverflow.com ip address)
--> Some time waiting (like +40s) and then:
+CAOPEN: 0,23\r\n\r\nOK
The code 23 means: 23 Remote refuse, but in my case the connection never reached the server.
Only GNSS or TCP can be used, but not both
What is weird about all of this, is the fact that I can connect on a TCP server, but this stops to work when I activate GNSS.
I sent an email to Simcom technical support.
After insisting that my problem be addressed by a Simcom engineer, I received an answer. I encouraged them to be more clear on their documentation because this information was nowhere (this module is pretty new so I think they missed it on documentation).
Hope to help somebody in the same way or not to do the same pricey error:
Hi Dardan,
"it is not possible to use GNSS and TCP at the same time"
This is known limitation for this module, as there are limitation for
LTE and GNSS part, they can not run simultaneously because they are
sharing part of RF components(SIM7070G low cost version of SIM7000G)
so it is time MUX for LTE and GNSS which means the GNSS performance
could not be good(if customer needs to send GNSS data to server in
very short interval such as <10 seconds), for SIM7000G LTE and GNSS
can work simultaneously without problem. so SIM7070G could be a good
solution for "parcel tracking" etc, which do not need the continue
navigation. please go for SIM7000G, thanks.
xxxx Sun
I found this issue some hours before read this post. My product publishs in AWS IoT MQTT broker; it works, but I need the GPS coordinates to be sent together in message. I'm a lot frustrated, because such problem should be said in Simcom's documents. My previous version was using sim7600g, more expensive, but works fine. I live in Brazil, everytime I need to test some different module I loose more than 1 month to buy from China or somewhere and arrive a new one to me. I tried to turn ON/OFF GNSS and the TCP conection in alternate way, but is too slow the process to reconnect on gsm network.
Ran into this as well. With MQTT it is possible to power down the GPS unit to be able to send and receive MQTT messages without reconnecting/subscribing to the broker again. I've made a 30 second interval to enable/disable the GPS unit and tested it with HiveMQ public broker. Receiving of position data every 60 seconds is possible with this setup, which might be sufficient for some applications. For the price, it has this is still a good module.
I receive no response for HTTP Get request for the http://httpbin.org/get URL. Following is the output using the AT Command Tester from https://m2msupport.net
Checking registration status...
AT+CREG?
+CREG: 2,1,"912","3D73",0
OK
The device is registered in home network.
AT+CGREG?
+CGREG: 2,1,"912","3D73",0,"1"
OK
The device is registered in home network.
Device is registered..
Check the network APN...
AT+CGNAPN
+CGNAPN: 0,""
OK
Network did not send APN to the device.
Activate the network bearer...
AT+CNACT=0,1
OK
+APP PDP: 0,ACTIVE
Set up the HTTP URL...
AT+SHCONF="URL","httpbin.org"
OK
Set up the HTTP body length...
AT+SHCONF="BODYLEN",1024
OK
Set up the HTTP header length...
AT+SHCONF="HEADERLEN",350
OK
Initiating HTTP connection...
AT+SHCONN
OK
Get the HTTP connection state...
AT+SHSTATE?
+SHSTATE: 1
OK
HTTP connection is successful...
HTTP get request...
AT+SHREQ="http://httpbin.org/get",1
OK
No reponse received..

When connecting via ovpn on mikrotik I always get the error

I have a VPN configured by ovpn in my mikrotik that already works, but whenever I connect both by android and Windows, I get the error:
ovpn,debug,error,,,,,,,,,l2tp,info,,debug,,,critical,,,,,,,,,,,,,warning duplicate packet, droppin
On console and terminal:
I have already looked for the official forum of mikrotik but neither has no clear answer or a definitive solution.
My goal is to remove this error from my terminal and from my console log.
My current setting:
OVPN SERVER:
PPP PROFILE:
#Edit:
After contacting support, I got this error message to have no impact on the VPN. Below is the email from Mikrotik Support:
Email:
"Hello,
This error message does not have any impact on the VPN connection
establishment, it simply warns you that the client sent duplicate
message which some client software (for example Windows) do.
Best regards, Emils Z."
Thank you all for your help.
I would advise that this is probably a bug in the OVPN implementation on Mikrotik's side. Please log a support ticket with them, and provide the supout.inf file as per the usual process.
Please see this link on how to make the support info file:
https://wiki.mikrotik.com/wiki/Manual:Support_Output_File
In short, open winbox, click the make support file on the left, and then go to files and download the file to your pc. Then attach this file to the support ticket.

asterisk error:chan_sip.c:4274 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data

I got the above error when try to connect two soft phones which is successfully registered. I was trying to make a voice call in local not connecting and instead returns the error:
chan_sip.c:4274 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data
I am using asterisk 13.5.0 and not using freepbx. Simply try to make a call between two peers
Make changes to sip.conf edit the line bind address like bindaddr=0.0.0.0
Likly firewall or permissions(for socket) issues.
Solved
OK I've just solved this issue in my network.
First of all , about the situation : i had an "Issabel VoIP server" based on Asterisk 13 but when i wanted to make calls ,it just failed and i got the same error as yours on Asterisk CLI. I had successful ping requests from the server and extension had been registered without any errors.
Solution: I had doubt about network devices, so i installed 2 soft-phones (like 3cx or Zoiper) on my laptop and connected it straightly to the server using a LAN patch cord ( to see if there's an issue on server side or its related to my network infra.) and registered 2 extensions on my soft-phone and they called each other without problem.so i understood that its one of my network devices that was limiting the transition of VoIP packets between server and extensions . finally i got that it was my TDD-LTE Modem that intercept my connection.
So to make long story short :
1- First create a small network between your server and laptop
2- Register 2 extensions on your soft-phone
3- make call between them and if it goes fine , then look for an obstacle in your main network.
hope it could help you

Wireshark Student - I can't see any http post or get requests

I am a student and today for a lab, we were asked to install and use Wireshark. The installation went well, I installed the correct version, installed WinPcap, and the program started without any issues.
I was connected to the University's Wifi and as part of our lab we had to visit http://www.cas.mcmaster.ca/~rzheng/course/CAS4C03W17/Labs/INTRO-wireshark-file1.html and answer questions about the data captured in Wireshark.
Problem is, I am not getting any get or post requests, filtering by http.request.method == "GET" shows nothing, and http.request.method == "POST" shows nothing as well. Filtering by http shows the 200 OK and 304 Not Modified (if I refresh).
I was the only one in my lab who had this problem, and my instructor wasn't able to figure it out. He saved and sent me his output which has Get and Post requests so I can continue my work.
Did anyone have this problem before or have any idea on how to solve it? I can upload the saved outputs if you think it would help. Thanks!
Capture sample looks like it's filtered, since it contains only packets sent to your PC IP address. What is missing:
There is not a single outgoing packet, despite they are obviously on the net. E.g. there are "TCP acknowledge" packets received by PC in capture file, but packets sent by PC, which are acknowledged by them, aren't shown.
Not a single incoming broadcast/multicast packet. This situation is possible, but not very likely.
So there is some trouble with sniffer setup on your site. Possible explanations:
accidentally configured capture filter (don't mix with display filter)
Some interfering software is installed. Example of the same complaint
Method to determine if issue is gone: apply !(ip.dst == YOUR_IP_ADDR) display filter and check if packets output isn't empty on visiting any web page. Possible plan of troubleshooting:
check capture filter
check different network card (e.g. non-wireless connection)
check wireshark operability in pure environment (e.g. liveUSB)
try removing suspected interfering software

error +HTTPACTION:0,601,0

I m trying to access a website using sim900 GSM module.
This is the list of commands
AT+CSQ
+CSQ: 16,0
OK
AT+HTTPINIT
OK
AT+HTTPPARA="CID",1
OK
AT+HTTPPARA="URL","www.google.com"
OK
AT+HTTPACTION=0
OK
+HTTPACTION:0,601,0
AT+HTTPACTION=0
OK
+HTTPACTION:0,601,0
Unable to access google. 601 code shows Network error.
How to get rid of this error?
You need to setup the connection to the bearer. Here are the minimum setup commands that have worked for me (based on trial/error and searching around on the internet).
AT+SAPBR=3,1,"APN","wap.cingular"
AT+SAPBR=1,1
The correct value for the APN may be different for you, depending on your network and service provider. I'm using AT&T prepaid SIM cards. Once that's working, then you can do the HTTP setup commands as you already have...
AT+HTTPINIT
AT+HTTPPARA="URL","http://www.google.com"
AT+HTTPACTION=0
Status codes above 600 (and some in the 500 range) are unassigned in the HTTP standard. In the AT command manual for the SIM908, status meanings are given in the notes on the HTTPACTION command:
600 Not HTTP PDU
601 Network Error
602 No memory
603 DNS Error
604 Stack Busy
You can query the bearer connection status of CID 1 with AT+SAPBR=2,1 and the related parameters with AT+SAPBR=4,1. You can also check that you're attached to the GPRS network with AT+CGATT?. If everything indicates that you are connected and you are still getting a 601 status code, then check that your service plan has data and that it hasn't run out. I have found that even when my account has a few hundred k of data showing on the balance that I start to get a 601 status until I add more data to my prepaid phone plan. If the SIM module has been on the whole time and you add more data, you'll need to close and re-open your connection (AT+SAPBR=0,1 followed by AT+SAPBR=1,1) and then your HTTP* commands will start working again without having to set the HTTPPARA settings again and without having to restart with HTTPINIT.
I have found that when an http call is made to an https only website it will throw a 601 error on the sim. Beware some sim devices have ssl and some don't. Use AT+HTTPSSL=? to interrogate. device with ssl will respond like, 'HTTPSSL 1'. If you get an error your device doesn't have ssl. This took some work with the factory for me to determine this.
You must also use to hit ssl site. I am using the wifi101 ssl client.
fona.setHTTPSRedirect(true);
dy3
I have encoutered this error as well. The cause of the problem may be that there is not enough money in the phone number account. You may check it.
601 is some custom implemented Error code.
Here is the list of standard HTTP Status codes
+HTTPACTION:0,601,0
The above AT response code (601) for HTTP session start indicates that
there is a network error. Then make sure that the PDP context is setup
properly.
source
https://m2msupport.net/m2msupport/at-command-for-http-functions-for-remote-server-data-access/
I have spent many hours with this module right now.
My experience is that when you dont get a 200 reply from remote server, you should check IP address to verify you are still on the network sendng a ping to a working server (AT+CIPPING="XX.XX.XX.XX").
If it succeeds: Try AT+SAPBR=2,1 and AT+CIFSR. You should get same address for both commands.
If you dont get same address, login again to the netword/service with AT+CIPCSGP=1, "yourapn.com", "user", "password".
If nothing works, power down the module. Wait a couple of minutes, and restart again.
Just in case someone is affected by this problem and stumbles on this post 4 years later: in my case the module had a small "sticker" type antenna and it got somehow damaged.
I could connect to the network but when I tried to use HTTP over the GPRS networks I only got return code 601 (network error) or 603 (failed to resolve DNS).
Once I replaced the antenna with a new one, everything worked perfectly.
Again, in case somebody has the same problem. In my case it was a typo in url:
AT+HTTPPARA="URL"," http://www.google.com"
Did you notice the space before http? For several hours, I didn't notice it too.
Usually after this command AT+SAPBR=3,1,"CONTYPE","GPRS" you enter your "APN", "USR" & "PWD" details also using SAPBR=3,1 etc. These details must match the SIM card / mobile phone provider.
Then it is recommended to check that your device has now received an IP address. Sometimes this is not straight away. Use AT+SAPBR=2,1 to query and this will return your IP address which you should check for confirmation.
Once you have IP address you can enter AT+HTTPINIT, AT+HTTPPARA="CID",1 etc.
Now to use GET you have to include a "?" after the URL to provide your php script with a key=value pairing.
Thus in your case it is something like, AT+HTTPPARA="URL","http://<Public_Ip_Address>:8080/folder/savedata.php?A=1001" where A is the key and 1001 is the value.
Now send the AT+HTTPACTION=0 and you should get a +HTTPACTION: 0,200,1000 response where 200 is the OK and 1000 is the payload size. AT+HTTPREAD will allow you to read the response if it is required.
Change URL. 601 is a URL has been moved. Is a redirect.

Resources