Using GSM Modem on NuttX with DNS support

I already demonstrated how to use NuttX with GSM modem. But I realized that it wasn’t with DNS support enabled. Then I decided to enable DNS and test it again:

 ATE1
 OK
 chat: OK AT+CGDCONT=1,"IP","tim.br"
 AT+QACCM=0,0
 OK
 chat: OK ATD99**1#
 AT+CGDCONT=1,"IP","tim.br"
 OK
 chat: CONNECT 
 ATD99**1#
 CONNECT
 IP: 192.168.254.254 
 IP: 100.86.71.207 IP: 100.86.71.207 
nsh> mount -t procfs /proc
nsh> ifconfig
ppp0    Link encap:TUN at UP
        inet addr:100.86.71.207 DRaddr:192.168.254.254 Mask:0.0.0.0
nsh> ?
help usage:  help [-v] []
[         cp        exec      hexdump   mh        set       umount    
  ?         cmp       exit      ifconfig  mount     sh        unset     
  addroute  date      false     kill      mw        sleep     usleep    
  break     dd        free      ls        nslookup  test      xd        
  cat       echo      help      mb        ps        true      
Builtin Apps:
  ping        testlogbuf  leds        pppd        
nsh> nslookup google.com
Host: google.com  IPv4 Addr: 172.217.29.110
nsh> ping google.com
PING 172.217.29.110 56 bytes of data
56 bytes from 172.217.29.110: icmp_seq=0 time=420 ms
56 bytes from 172.217.29.110: icmp_seq=1 time=490 ms
56 bytes from 172.217.29.110: icmp_seq=2 time=530 ms
56 bytes from 172.217.29.110: icmp_seq=3 time=840 ms
56 bytes from 172.217.29.110: icmp_seq=4 time=410 ms
56 bytes from 172.217.29.110: icmp_seq=5 time=500 ms
56 bytes from 172.217.29.110: icmp_seq=6 time=540 ms
56 bytes from 172.217.29.110: icmp_seq=7 time=590 ms
56 bytes from 172.217.29.110: icmp_seq=8 time=640 ms
56 bytes from 172.217.29.110: icmp_seq=9 time=680 ms
10 packets transmitted, 10 received, 0% packet loss, time 10100 ms
nsh> 

I just followed the video tutorial #044:

Leave a comment