3

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

Okay. I am using a sim900 and want to send an HTTP get request to no-ip.com 's update servers. The format of the update URL is given here -> http://www.noip.com/integrate/request

I created a free account and wish to update my domain name (its in the form "xyz.ddns.net") from the sim900 as I am going to attach it to a microcontroller and configure it to act like a server and send data to a pc (the data will be some 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 for sensor data from the MCU whenever a user presses a button in a GUI interface.

The commands I used are these->

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 

The SIMComm docs said that this means a DNS error. What have I missed in the above commands or setup that is causing this error? If you guys require any more information please do tell.

Thanks again in advance.

taz
  • 43
  • 4

1 Answers1

0

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

Dyndns documentation mentions the method you are using as for web browsers and utilities.

Authentication in URL

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

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

Raw HTTP GET Request

Actual HTTP request should look like following fragment. Note that there is the bare minimum set of headers. Request should be followed by sending an empty line.

Fragment base-64-authorization should be represented by 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 permitted and will be processed, we don’t encourage developers to use them. We might stop processing of POST requests at any time, without notice.

dmSherazi
  • 3,743
  • 5
  • 37
  • 62