0

AT+CDNSCFG not working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

AT+CDNSCFG not working

by justpierre on Sun Sep 13, 2020 8:46 am

Hi Guys,

I'm having some issue with my DNS when I want to use the AT+FTPGET=1 command (it returns +FTPGET: 1,62).

I'm trying to update my DNS using the command :
Code: Select all | TOGGLE FULL SIZE
AT+CDNSCFG="8.8.8.8","8.8.4.4"
ERROR
but it doesn't work and I keep received an error message.

At the moment my DNS is
Code: Select all | TOGGLE FULL SIZE
AT+CDNSCFG?
PrimaryDns: 0.0.0.0
SecondaryDns: 0.0.0.0
Anyone can help me with that??

(ps: I'm using a SIM800H)

Thanks,
Pierre.

justpierre
 
Posts: 6
Joined: Sat Sep 05, 2020 8:09 am

Re: AT+CDNSCFG not working

by rskup on Sun Sep 13, 2020 11:11 am

Just a quick (possibly useless) thought...is the APN info set(AT+CGDCONT=...)?

rskup
 
Posts: 60
Joined: Sat Aug 01, 2020 9:04 pm

Re: AT+CDNSCFG not working

by justpierre on Sun Sep 13, 2020 11:46 am

I'm not too sure.. I used the function AT+SAPBR to configure my APN.

The result I had:
Code: Select all | TOGGLE FULL SIZE
AT+SAPBR=2,1
OK
+SAPBR: 1,1,"10.147.43.2"

justpierre
 
Posts: 6
Joined: Sat Sep 05, 2020 8:09 am

Re: AT+CDNSCFG not working

by rskup on Sun Sep 13, 2020 12:47 pm

Hmmm, have not seen that command before.

I don't have an 800, I have the 5320 (FONA 3G), but I do see that the CGDCONT command is in the 800 manual.

So when you type:

AT+CGDCONT?

do you get anything?

rskup
 
Posts: 60
Joined: Sat Aug 01, 2020 9:04 pm

Re: AT+CDNSCFG not working

by justpierre on Sun Sep 13, 2020 1:07 pm

I have this result:

Code: Select all | TOGGLE FULL SIZE
AT+CGDCONT?

+CGDCONT: 1,"IP","giffgaff,.com","0.0.0.0",0,0
+CGDCONT: 2,"IP","","0.0.0.0",0,0
+CGDCONT: 3,"IP","","0.0.0.0",0,0


my APN should be giffgaff.com and not giffgaff, .com it might related to the issue I'm having then.

I tried to update by doing this :
Code: Select all | TOGGLE FULL SIZE
AT+CGDCONT=1,"giffgaff.com"

ERROR


But that's not working...

justpierre
 
Posts: 6
Joined: Sat Sep 05, 2020 8:09 am

Re: AT+CDNSCFG not working

by rskup on Sun Sep 13, 2020 1:27 pm

I think you need to do this:

AT+CGDCONT=1,"IP","giffgaff.com"

rskup
 
Posts: 60
Joined: Sat Aug 01, 2020 9:04 pm

Re: AT+CDNSCFG not working

by justpierre on Sun Sep 13, 2020 1:36 pm

It's the same.. I keep getting an error.

Code: Select all | TOGGLE FULL SIZE
AT+CLTS=1
OK
AT+CIPSHUT
SHUT OK
AT+CGATT=1
OK
AT+SAPBR=3,1,"CONTYPE","GPRS"
OK
AT+SAPBR=3,1,"APN","giffgaff.com"
OK
AT+CSTT="giffgaff.com","giffgaff"
OK
AT+SAPBR=3,1,"USER","giffgaff"
OK
AT+SAPBR=1,1
OK
AT+SAPBR=2,1
+SAPBR: 1,1,"10.148.70.28"
AT+CCLK?
+CCLK: "20/09/13,18:23:33+04"
AT+CGDCONT?
+CGDCONT: 1,"IP","giffgaff,.com","0.0.0.0",0,0
+CGDCONT: 2,"IP","","0.0.0.0",0,0
+CGDCONT: 3,"IP","","0.0.0.0",0,0
AT+CGDCONT=1,"IP","giffgaff.com"
ERROR

justpierre
 
Posts: 6
Joined: Sat Sep 05, 2020 8:09 am

Re: AT+CDNSCFG not working

by rskup on Sun Sep 13, 2020 1:51 pm

Hmmm, ok, thought the shorter version might work (saw in a couple examples), adding the 0.0.0.0 now (which is how I entered it for my 5320).

Try:

AT+CGDCONT=1,"IP","giffgaff.com","0.0.0.0"

edit...just saw something searching online, since you issued the command SAPBR = 1,1 (open bearer) earlier, it may not allow you to edit this.

Try closing it first, SAPBR = 0,1
Last edited by rskup on Sun Sep 13, 2020 2:24 pm, edited 1 time in total.

rskup
 
Posts: 60
Joined: Sat Aug 01, 2020 9:04 pm

Re: AT+CDNSCFG not working

by justpierre on Sun Sep 13, 2020 2:22 pm

I think I found the issue!

I was using the example code on arduino name: FONAtest.

It's possible using the serial monitor of the Arduino software to create a Serial passthru tunnel and send AT commands.

Instead, I tried to communicate directly to the FONA with the UART USB cable and this time I'm able to update the DNS settings !!

I think the issue is coming from the code on the arduino not letting me sending the right AT command.

Thanks for the help!

justpierre
 
Posts: 6
Joined: Sat Sep 05, 2020 8:09 am

Re: AT+CDNSCFG not working

by rskup on Sun Sep 13, 2020 2:27 pm

Ok, cool, hope all goes well!

rskup
 
Posts: 60
Joined: Sat Aug 01, 2020 9:04 pm

Please be positive and constructive with your questions and comments.