I cannot connect to no-ip update servers from sim900

First of all, whoever helped me with this, I thank you from the bottom of my heart. This is very frustrating. I am getting 603 error when I make a GET request.

Good. I am using sim900 and want to send an HTTP request to the no-ip.com update servers. The update url format is given here -> http://www.noip.com/integrate/request

I have created a free account and want to update my domain name (its in the form "xyz.ddns.net") with sim900 as I am going to connect it to a microcontroller and set it up as a server and send data to the computer (data will be sensor data .) Using a dynamic dns service like noip will be very helpful for me to connect to my setup from my work PC as the PC will request sensor data from the MCU when the user clicks a button in the GUI interface.

The commands I use ->

AT //Just to check
AT+CSQ // To check the signal quality
AT+CGATT=1 //Attach to a GPRS network
At+CIPSHUT //to close any earlier session 
AT+SAPBR =3,1,"CONTYPE","GPRS" //I am using context ID 1
AT+SAPBR = 3,1,"APN","airtelgprs.com" 
AT+SAPBR=4,1 // This prints out the expected output with the updated APN and CONTYPE
AT+SAPBR =1,1 

//Now I open a HTTP session
AT+HTTPINIT 
AT+HTTPPARA="URL", "http://myusername:mypassword@dynupdate.no-ip.com/nic/update?hostname=xyz.ddns.net" //The my ip part is optional according to the no-ip guys.

AT+HTTPPARA="REDIR","1"
AT+HTTPPARA="CID","1" //Actually CID is 1 by default. Still typed this command. No difference.
AT+HTTPACTION=0 //GET request

Output of this is: 0,603,0 

      

SIMComm docs say it means DNS error. What am I missing in the above commands or settings that are causing this error? If you guys want more information, please let us know.

Thanks in advance.

+3


source to share


1 answer


from my experience sending an update request as always fails, Dyndns documentation explains how to send a RAW HTTP request. I used this and worked well. Check the No-ip documentation for the exact Raw Http request.

The Dyndns documentation mentions the method you use, both for web browsers and utilities.



URL Authentication

For web browsers or utilities (fetch, curl, lwp-request) that can parse the authentication section in the URL.

http: // username: password@members.dyndns.org / nic / update? hostname = yourhostname & myip = ipaddress & wildcard = NOCHG & mx = NOCHG & backmx = NOCHG

Raw HTTP GET Request

The actual HTTP request should look like the following snippet. Note that there is a minimal set of headers. The request must be honored by sending an empty string.

The base-64-authorization snippet must be represented by a base 64 encoded username: password string.

GET /nic/update?hostname=yourhostname&myip=ipaddress&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG HTTP/1.0 Host: members.dyndns.org Authorization: Basic base-64-authorization User-Agent: Company - Device - Version Number

Please note that although POST requests are and will be allowed, we do not recommend developers to use them. We could stop processing POST requests at any time without notice.

0


source







All Articles