This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3200 sl_NetAppDnsGetHostByName return -161 error code

Other Parts Discussed in Thread: CC3200, CC3100, CC3200SDK

Hi,

I am trying out wlan_station code and run into issue where CC3200 launchpad able to connect to AP and ping the AP, but failed to get the IP for www.ti.com using this api: sl_NetAppDnsGetHostByName.

When I override the error code to skip the assert on error code, and later fill in the host IP manually, CC3200 is able to ping the host (www.ti.com) sucessfully. So the issue seems to be DNS host resolving, any clue what error code -161 means?

thanks in advanced! 

  • Hi,

    Try with 'www.google.com' once if same example works or try with other AP if possible.

    Error code -161 means ' No DNS server was specified' (#define SL_NET_APP_DNS_NO_SERVER   -161   @simplelink\include\netapp.h)

    Regards,

    Jitendra

  • Hi Jitendra,

    I tried ww.google.com an it still return the same error code. How's the internal mechanism of simple link to detect and determine DNS server?  

    I don't have any other AP for testing. I am using Cisco wireless router in this case. 

  • Hi chage,

    I am not sure how the internals work in determining the DNS Server address, but I have a few suggestions to assist in  troubleshooting this issue.

    With the Cisco wireless router, do you have anything else connected to it, for example a windows machine?

    If you have a Windows machine connected, open a command prompt and type in "ipconfig /all" and see what you get for the DNS Servers and Default Gateway for the Wireless LAN adapter. Are these IPv4 addresses or IPv6 Addresses? 

    When setting up station mode for the CC3200, are you using DHCP? If so, make sure that the Cisco Router provides DNS address when it provides an IP Address during the DHCP, this may be a settings of some sort.

    Also check any other settings, for example you may have set the DNS manually on your Windows Machine or perhaps you are using a Dynamic DNS or something else that the CC3200 is having issues with. Basically, try and look into what might be different/non-standard within the DNS setup for your router.

    Glenn.

  • Hi Glenn,

    Thanks for your suggestion. Below are some of my observation:

    1) both my router and ipconfig /all shows DNS servers address and default gateway

    2) these are IPv4

    3) I am using the wlan station mode sample code in CC3200 SDK, it is using DHCP. I don't find any option in the router that can turn on/off in providing DNS address during DHCP. 

    4) i do notice that in the event of IPv4 acquired (SL_NETAPP_IPV4_IPACQUIRED_EVENT), the DNS is 0. The thing that I do not understand is the code only keep the gateway ip within this event handler, the DNS is not used at all. So I don't quite get when API "sl_NetAppDnsGetHostByName" is called, which DNS is being used.

    5) I didn't setup the router manually, it should be pretty standard with no manual DNS settings etc. No, there is no Dynamic DNS in use here.

    Are you familiar with transaction down to network packet level? I am not but i tried inspecting the network packer using wireshark and yet to able to comprehend those packets. I was hoping to see some handshake during DHCP where DNS is returned to CC3200, so far no luck.

    I can post the log of wireshark later tonight after I can play around with the launchpad again.

     

  • Hi chage,

    Some great details on DHCP packets at Wikipedia - http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol

    Also you could try using Microsoft Network Monitor, I believe it will parse DHCP packets, so they should be easier to read - check out this link for where to download - http://e2e.ti.com/support/wireless_connectivity/f/968/t/350885.aspx

    You could save a lot of time by finding another AP for testing, that way you should be able to determine if it is AP/Network specific or code specific. You can use a smartphone as a hotspot which should still function with SmartConfig (you cannot however use the same smartphone as the hotspot and also to run SmartConfig app).

    Glenn.

  • Hi Glenn,

    Let me try Microsoft Network Monitor later today, sounds like something better than looking at raw packets.

    On the other hand, i finally see an option to configure static DNS on the router configuration page, I probably will try setting the static DNS to what is shown in ipconfig /all as well. There are currently showing 0.0.0.0. 

    Thanks for the link to useful tools!

  • Hi chage

    Hopefully setting the DNS will work. The addresses you are getting on your computer by doing ipconfig /all were most likely set manually on the computer, which is why the computers works with DNS and the CC3200 does not.

    Let us know if this resolves your problem. We need this to work on all routers!

    Glenn.

  • Yup, i hope so too. Well on my computer, the setting is "obtain dns automatically", so it is not manually set either. if changing the router static DNS works, i will need to studyon how other clients can work without it. :)

  • Unfortunately, changing the DNS doesn't work either. I use wireshark to capture the DHCP traffic and confirmed that the router return all correct DNS records during DHCP offer stage. 

    so pretty much not having any progress on this simplest project setup..

  • Hi Chage,

    We will try pin point the issue and hopefully resolve it.

    Can you help with providing the following:

    1. Which AP module are you using (I know it’s CISCO)? (this can help us recreate the issue)
    2. Can you provide the WireShark sniff file capture from the AP connection until trying to get the DNS?
    3. Can you provide the example code you are using?
    4. Do you have Booster Pack (CC3100) as well?
    5. I saw you have reported that in the IP Acquired event you are seeing DNS equal to 0.0.0.0 is that the case for static DNS as well?

    Best Regards,

    Nir Nitzani

  • Hi Nir,

    Thanks for looking into this. Below are the information you requested:

    1. Cisco Linksys E1550 firmware version 1.0.03 build 2  Feb 1, 2012
    2. Attached is the filtered wireshark export file in text format.
      1004.wireshark.txt
      No.     Time           Source                Destination           Protocol Length Info
          649 51.761685000   0.0.0.0               255.255.255.255       DHCP     342    DHCP Discover - Transaction ID 0x4da6a0ef
      
      Frame 649: 342 bytes on wire (2736 bits), 342 bytes captured (2736 bits) on interface 0
      Ethernet II, Src: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
      Internet Protocol Version 4, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
      User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
      Bootstrap Protocol
          Message type: Boot Request (1)
          Hardware type: Ethernet (0x01)
          Hardware address length: 6
          Hops: 0
          Transaction ID: 0x4da6a0ef
          Seconds elapsed: 0
          Bootp flags: 0x8000 (Broadcast)
          Client IP address: 0.0.0.0 (0.0.0.0)
          Your (client) IP address: 0.0.0.0 (0.0.0.0)
          Next server IP address: 0.0.0.0 (0.0.0.0)
          Relay agent IP address: 0.0.0.0 (0.0.0.0)
          Client MAC address: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3)
          Client hardware address padding: 00000000000000000000
          Server host name not given
          Boot file name not given
          Magic cookie: DHCP
          Option: (53) DHCP Message Type
              Length: 1
              DHCP: Discover (1)
          Option: (51) IP Address Lease Time
              Length: 4
              IP Address Lease Time: (4294967295s) infinity
          Option: (55) Parameter Request List
              Length: 3
              Parameter Request List Item: (1) Subnet Mask
              Parameter Request List Item: (3) Router
              Parameter Request List Item: (6) Domain Name Server
          Option: (255) End
              Option End: 255
          Padding
      
      No.     Time           Source                Destination           Protocol Length Info
          651 52.990704000   192.168.1.1           255.255.255.255       DHCP     342    DHCP Offer    - Transaction ID 0x4da6a0ef
      
      Frame 651: 342 bytes on wire (2736 bits), 342 bytes captured (2736 bits) on interface 0
      Ethernet II, Src: Cisco-Li_09:df:85 (58:6d:8f:09:df:85), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
      Internet Protocol Version 4, Src: 192.168.1.1 (192.168.1.1), Dst: 255.255.255.255 (255.255.255.255)
      User Datagram Protocol, Src Port: bootps (67), Dst Port: bootpc (68)
      Bootstrap Protocol
          Message type: Boot Reply (2)
          Hardware type: Ethernet (0x01)
          Hardware address length: 6
          Hops: 0
          Transaction ID: 0x4da6a0ef
          Seconds elapsed: 0
          Bootp flags: 0x8000 (Broadcast)
          Client IP address: 0.0.0.0 (0.0.0.0)
          Your (client) IP address: 192.168.1.118 (192.168.1.118)
          Next server IP address: 0.0.0.0 (0.0.0.0)
          Relay agent IP address: 0.0.0.0 (0.0.0.0)
          Client MAC address: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3)
          Client hardware address padding: 00000000000000000000
          Server host name not given
          Boot file name not given
          Magic cookie: DHCP
          Option: (53) DHCP Message Type
              Length: 1
              DHCP: Offer (2)
          Option: (54) DHCP Server Identifier
              Length: 4
              DHCP Server Identifier: 192.168.1.1 (192.168.1.1)
          Option: (51) IP Address Lease Time
              Length: 4
              IP Address Lease Time: (86400s) 1 day
          Option: (1) Subnet Mask
              Length: 4
              Subnet Mask: 255.255.255.0 (255.255.255.0)
          Option: (3) Router
              Length: 4
              Router: 192.168.1.1 (192.168.1.1)
          Option: (6) Domain Name Server
              Length: 12
              Domain Name Server: 209.244.0.3 (209.244.0.3)
              Domain Name Server: 74.82.42.42 (74.82.42.42)
              Domain Name Server: 8.8.8.8 (8.8.8.8)
          Option: (255) End
              Option End: 255
          Padding
      
      No.     Time           Source                Destination           Protocol Length Info
          652 53.297132000   0.0.0.0               255.255.255.255       DHCP     342    DHCP Request  - Transaction ID 0x4da6a0ef
      
      Frame 652: 342 bytes on wire (2736 bits), 342 bytes captured (2736 bits) on interface 0
      Ethernet II, Src: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
      Internet Protocol Version 4, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255)
      User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
      Bootstrap Protocol
          Message type: Boot Request (1)
          Hardware type: Ethernet (0x01)
          Hardware address length: 6
          Hops: 0
          Transaction ID: 0x4da6a0ef
          Seconds elapsed: 0
          Bootp flags: 0x8000 (Broadcast)
          Client IP address: 0.0.0.0 (0.0.0.0)
          Your (client) IP address: 0.0.0.0 (0.0.0.0)
          Next server IP address: 0.0.0.0 (0.0.0.0)
          Relay agent IP address: 0.0.0.0 (0.0.0.0)
          Client MAC address: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3)
          Client hardware address padding: 00000000000000000000
          Server host name not given
          Boot file name not given
          Magic cookie: DHCP
          Option: (53) DHCP Message Type
              Length: 1
              DHCP: Request (3)
          Option: (50) Requested IP Address
              Length: 4
              Requested IP Address: 192.168.1.118 (192.168.1.118)
          Option: (54) DHCP Server Identifier
              Length: 4
              DHCP Server Identifier: 192.168.1.1 (192.168.1.1)
          Option: (55) Parameter Request List
              Length: 3
              Parameter Request List Item: (1) Subnet Mask
              Parameter Request List Item: (3) Router
              Parameter Request List Item: (6) Domain Name Server
          Option: (255) End
              Option End: 255
          Padding
      
      No.     Time           Source                Destination           Protocol Length Info
          653 53.300562000   192.168.1.1           255.255.255.255       DHCP     342    DHCP ACK      - Transaction ID 0x4da6a0ef
      
      Frame 653: 342 bytes on wire (2736 bits), 342 bytes captured (2736 bits) on interface 0
      Ethernet II, Src: Cisco-Li_09:df:85 (58:6d:8f:09:df:85), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
      Internet Protocol Version 4, Src: 192.168.1.1 (192.168.1.1), Dst: 255.255.255.255 (255.255.255.255)
      User Datagram Protocol, Src Port: bootps (67), Dst Port: bootpc (68)
      Bootstrap Protocol
          Message type: Boot Reply (2)
          Hardware type: Ethernet (0x01)
          Hardware address length: 6
          Hops: 0
          Transaction ID: 0x4da6a0ef
          Seconds elapsed: 0
          Bootp flags: 0x8000 (Broadcast)
          Client IP address: 0.0.0.0 (0.0.0.0)
          Your (client) IP address: 192.168.1.118 (192.168.1.118)
          Next server IP address: 0.0.0.0 (0.0.0.0)
          Relay agent IP address: 0.0.0.0 (0.0.0.0)
          Client MAC address: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3)
          Client hardware address padding: 00000000000000000000
          Server host name not given
          Boot file name not given
          Magic cookie: DHCP
          Option: (53) DHCP Message Type
              Length: 1
              DHCP: ACK (5)
          Option: (54) DHCP Server Identifier
              Length: 4
              DHCP Server Identifier: 192.168.1.1 (192.168.1.1)
          Option: (51) IP Address Lease Time
              Length: 4
              IP Address Lease Time: (86400s) 1 day
          Option: (1) Subnet Mask
              Length: 4
              Subnet Mask: 255.255.255.0 (255.255.255.0)
          Option: (3) Router
              Length: 4
              Router: 192.168.1.1 (192.168.1.1)
          Option: (6) Domain Name Server
              Length: 12
              Domain Name Server: 209.244.0.3 (209.244.0.3)
              Domain Name Server: 74.82.42.42 (74.82.42.42)
              Domain Name Server: 8.8.8.8 (8.8.8.8)
          Option: (255) End
              Option End: 255
          Padding
      
      No.     Time           Source                Destination           Protocol Length Info
          654 53.602874000   192.168.1.118         224.0.0.251           MDNS     272    Standard query 0x0000  ANY 78A50410ECB3@mysimplelink._http._tcp.local, "QM" question
      
      Frame 654: 272 bytes on wire (2176 bits), 272 bytes captured (2176 bits) on interface 0
      Ethernet II, Src: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3), Dst: IPv4mcast_00:00:fb (01:00:5e:00:00:fb)
      Internet Protocol Version 4, Src: 192.168.1.118 (192.168.1.118), Dst: 224.0.0.251 (224.0.0.251)
      User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353)
      Domain Name System (query)
          [Response In: 682]
          Transaction ID: 0x0000
          Flags: 0x0000 Standard query
          Questions: 1
          Answer RRs: 0
          Authority RRs: 2
          Additional RRs: 0
          Queries
              78A50410ECB3@mysimplelink._http._tcp.local: type ANY, class IN, "QM" question
                  Name: 78A50410ECB3@mysimplelink._http._tcp.local
                  Type: ANY (Request for all records)
                  .000 0000 0000 0001 = Class: IN (0x0001)
                  0... .... .... .... = "QU" question: False
          Authoritative nameservers
              78A50410ECB3@mysimplelink._http._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 80, target 78A50410ECB3-mysimplelink.local
              78A50410ECB3@mysimplelink._http._tcp.local: type TXT, class IN, cache flush
      
      No.     Time           Source                Destination           Protocol Length Info
          655 53.604948000   192.168.1.118         224.0.0.251           MDNS     180    Standard query response 0x0000  A, cache flush 192.168.1.118 NSEC, cache flush 78A50410ECB3-mysimplelink.local
      
      Frame 655: 180 bytes on wire (1440 bits), 180 bytes captured (1440 bits) on interface 0
      Ethernet II, Src: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3), Dst: IPv4mcast_00:00:fb (01:00:5e:00:00:fb)
      Internet Protocol Version 4, Src: 192.168.1.118 (192.168.1.118), Dst: 224.0.0.251 (224.0.0.251)
      User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353)
      Domain Name System (response)
          [Request In: 661]
          [Time: -0.305429000 seconds]
          Transaction ID: 0x0000
          Flags: 0x8400 Standard query response, No error
          Questions: 0
          Answer RRs: 2
          Authority RRs: 0
          Additional RRs: 0
          Answers
              78A50410ECB3-mysimplelink.local: type A, class IN, cache flush, addr 192.168.1.118
              78A50410ECB3-mysimplelink.local: type NSEC, class IN, cache flush, next domain name 78A50410ECB3-mysimplelink.local
      
      No.     Time           Source                Destination           Protocol Length Info
          656 53.607682000   192.168.1.118         224.0.0.251           MDNS     272    Standard query 0x0000  ANY 78A50410ECB3@mysimplelink._http._tcp.local, "QM" question
      
      Frame 656: 272 bytes on wire (2176 bits), 272 bytes captured (2176 bits) on interface 0
      Ethernet II, Src: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3), Dst: IPv4mcast_00:00:fb (01:00:5e:00:00:fb)
      Internet Protocol Version 4, Src: 192.168.1.118 (192.168.1.118), Dst: 224.0.0.251 (224.0.0.251)
      User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353)
      Domain Name System (query)
          [Response In: 682]
          Transaction ID: 0x0000
          Flags: 0x0000 Standard query
          Questions: 1
          Answer RRs: 0
          Authority RRs: 2
          Additional RRs: 0
          Queries
              78A50410ECB3@mysimplelink._http._tcp.local: type ANY, class IN, "QM" question
                  Name: 78A50410ECB3@mysimplelink._http._tcp.local
                  Type: ANY (Request for all records)
                  .000 0000 0000 0001 = Class: IN (0x0001)
                  0... .... .... .... = "QU" question: False
          Authoritative nameservers
              78A50410ECB3@mysimplelink._http._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 80, target 78A50410ECB3-mysimplelink.local
              78A50410ECB3@mysimplelink._http._tcp.local: type TXT, class IN, cache flush
      
      No.     Time           Source                Destination           Protocol Length Info
          661 53.910377000   192.168.1.118         224.0.0.251           MDNS     272    Standard query 0x0000  ANY 78A50410ECB3@mysimplelink._http._tcp.local, "QM" question
      
      Frame 661: 272 bytes on wire (2176 bits), 272 bytes captured (2176 bits) on interface 0
      Ethernet II, Src: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3), Dst: IPv4mcast_00:00:fb (01:00:5e:00:00:fb)
      Internet Protocol Version 4, Src: 192.168.1.118 (192.168.1.118), Dst: 224.0.0.251 (224.0.0.251)
      User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353)
      Domain Name System (query)
          [Response In: 682]
          Transaction ID: 0x0000
          Flags: 0x0000 Standard query
          Questions: 1
          Answer RRs: 0
          Authority RRs: 2
          Additional RRs: 0
          Queries
              78A50410ECB3@mysimplelink._http._tcp.local: type ANY, class IN, "QM" question
                  Name: 78A50410ECB3@mysimplelink._http._tcp.local
                  Type: ANY (Request for all records)
                  .000 0000 0000 0001 = Class: IN (0x0001)
                  0... .... .... .... = "QU" question: False
          Authoritative nameservers
              78A50410ECB3@mysimplelink._http._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 80, target 78A50410ECB3-mysimplelink.local
              78A50410ECB3@mysimplelink._http._tcp.local: type TXT, class IN, cache flush
      
      No.     Time           Source                Destination           Protocol Length Info
          662 53.912334000   192.168.1.118         224.0.0.251           MDNS     180    Standard query response 0x0000  A, cache flush 192.168.1.118 NSEC, cache flush 78A50410ECB3-mysimplelink.local
      
      Frame 662: 180 bytes on wire (1440 bits), 180 bytes captured (1440 bits) on interface 0
      Ethernet II, Src: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3), Dst: IPv4mcast_00:00:fb (01:00:5e:00:00:fb)
      Internet Protocol Version 4, Src: 192.168.1.118 (192.168.1.118), Dst: 224.0.0.251 (224.0.0.251)
      User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353)
      Domain Name System (response)
          [Request In: 661]
          [Time: 0.001957000 seconds]
          Transaction ID: 0x0000
          Flags: 0x8400 Standard query response, No error
          Questions: 0
          Answer RRs: 2
          Authority RRs: 0
          Additional RRs: 0
          Answers
              78A50410ECB3-mysimplelink.local: type A, class IN, cache flush, addr 192.168.1.118
              78A50410ECB3-mysimplelink.local: type NSEC, class IN, cache flush, next domain name 78A50410ECB3-mysimplelink.local
      
      No.     Time           Source                Destination           Protocol Length Info
          663 54.221026000   192.168.1.118         224.0.0.251           MDNS     585    Standard query response 0x0000  A, cache flush 192.168.1.118 NSEC, cache flush 78A50410ECB3-mysimplelink.local PTR 78A50410ECB3@mysimplelink._http._tcp.local PTR _http._tcp.local SRV, cache flush 0 0 80 78A50410ECB3-mysimplelink.local TXT, cache flush NSEC, cache flush 78A50410ECB3@mysimplelink._http._tcp.local
      
      Frame 663: 585 bytes on wire (4680 bits), 585 bytes captured (4680 bits) on interface 0
      Ethernet II, Src: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3), Dst: IPv4mcast_00:00:fb (01:00:5e:00:00:fb)
      Internet Protocol Version 4, Src: 192.168.1.118 (192.168.1.118), Dst: 224.0.0.251 (224.0.0.251)
      User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353)
      Domain Name System (response)
          [Request In: 661]
          [Time: 0.310649000 seconds]
          Transaction ID: 0x0000
          Flags: 0x8400 Standard query response, No error
          Questions: 0
          Answer RRs: 7
          Authority RRs: 0
          Additional RRs: 0
          Answers
              78A50410ECB3-mysimplelink.local: type A, class IN, cache flush, addr 192.168.1.118
              78A50410ECB3-mysimplelink.local: type NSEC, class IN, cache flush, next domain name 78A50410ECB3-mysimplelink.local
              _http._tcp.local: type PTR, class IN, 78A50410ECB3@mysimplelink._http._tcp.local
              _services._dns-sd._udp.local: type PTR, class IN, _http._tcp.local
              78A50410ECB3@mysimplelink._http._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 80, target 78A50410ECB3-mysimplelink.local
              78A50410ECB3@mysimplelink._http._tcp.local: type TXT, class IN, cache flush
              78A50410ECB3@mysimplelink._http._tcp.local: type NSEC, class IN, cache flush, next domain name 78A50410ECB3@mysimplelink._http._tcp.local
      
      No.     Time           Source                Destination           Protocol Length Info
          664 55.142734000   192.168.1.118         224.0.0.251           MDNS     585    Standard query response 0x0000  A, cache flush 192.168.1.118 NSEC, cache flush 78A50410ECB3-mysimplelink.local PTR 78A50410ECB3@mysimplelink._http._tcp.local PTR _http._tcp.local SRV, cache flush 0 0 80 78A50410ECB3-mysimplelink.local TXT, cache flush NSEC, cache flush 78A50410ECB3@mysimplelink._http._tcp.local
      
      Frame 664: 585 bytes on wire (4680 bits), 585 bytes captured (4680 bits) on interface 0
      Ethernet II, Src: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3), Dst: IPv4mcast_00:00:fb (01:00:5e:00:00:fb)
      Internet Protocol Version 4, Src: 192.168.1.118 (192.168.1.118), Dst: 224.0.0.251 (224.0.0.251)
      User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353)
      Domain Name System (response)
          [Request In: 661]
          [Time: 1.232357000 seconds]
          Transaction ID: 0x0000
          Flags: 0x8400 Standard query response, No error
          Questions: 0
          Answer RRs: 7
          Authority RRs: 0
          Additional RRs: 0
          Answers
              78A50410ECB3-mysimplelink.local: type A, class IN, cache flush, addr 192.168.1.118
              78A50410ECB3-mysimplelink.local: type NSEC, class IN, cache flush, next domain name 78A50410ECB3-mysimplelink.local
              _http._tcp.local: type PTR, class IN, 78A50410ECB3@mysimplelink._http._tcp.local
              _services._dns-sd._udp.local: type PTR, class IN, _http._tcp.local
              78A50410ECB3@mysimplelink._http._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 80, target 78A50410ECB3-mysimplelink.local
              78A50410ECB3@mysimplelink._http._tcp.local: type TXT, class IN, cache flush
              78A50410ECB3@mysimplelink._http._tcp.local: type NSEC, class IN, cache flush, next domain name 78A50410ECB3@mysimplelink._http._tcp.local
      
      No.     Time           Source                Destination           Protocol Length Info
          682 57.291360000   192.168.1.118         224.0.0.251           MDNS     585    Standard query response 0x0000  A, cache flush 192.168.1.118 NSEC, cache flush 78A50410ECB3-mysimplelink.local PTR 78A50410ECB3@mysimplelink._http._tcp.local PTR _http._tcp.local SRV, cache flush 0 0 80 78A50410ECB3-mysimplelink.local TXT, cache flush NSEC, cache flush 78A50410ECB3@mysimplelink._http._tcp.local
      
      Frame 682: 585 bytes on wire (4680 bits), 585 bytes captured (4680 bits) on interface 0
      Ethernet II, Src: TexasIns_10:ec:b3 (78:a5:04:10:ec:b3), Dst: IPv4mcast_00:00:fb (01:00:5e:00:00:fb)
      Internet Protocol Version 4, Src: 192.168.1.118 (192.168.1.118), Dst: 224.0.0.251 (224.0.0.251)
      User Datagram Protocol, Src Port: mdns (5353), Dst Port: mdns (5353)
      Domain Name System (response)
          [Request In: 661]
          [Time: 3.380983000 seconds]
          Transaction ID: 0x0000
          Flags: 0x8400 Standard query response, No error
          Questions: 0
          Answer RRs: 7
          Authority RRs: 0
          Additional RRs: 0
          Answers
              78A50410ECB3-mysimplelink.local: type A, class IN, cache flush, addr 192.168.1.118
              78A50410ECB3-mysimplelink.local: type NSEC, class IN, cache flush, next domain name 78A50410ECB3-mysimplelink.local
              _http._tcp.local: type PTR, class IN, 78A50410ECB3@mysimplelink._http._tcp.local
              _services._dns-sd._udp.local: type PTR, class IN, _http._tcp.local
              78A50410ECB3@mysimplelink._http._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 80, target 78A50410ECB3-mysimplelink.local
              78A50410ECB3@mysimplelink._http._tcp.local: type TXT, class IN, cache flush
              78A50410ECB3@mysimplelink._http._tcp.local: type NSEC, class IN, cache flush, next domain name 78A50410ECB3@mysimplelink._http._tcp.local
      
    3. The example code is exactly the same as wlan_station in CC3200 SDK
    4. nope, i don't have CC3100
    5. Yes, I get DNS 0.0.0.0 for both cases regardless I specify static DNS in the router setup or not. From wireshark I can conclude that having the static DNS setup or not, the router still offer the same DNS in DHCP stage.

    I have yet to look into the MDNS trafic detail since i am not familiar with it, but i will try to digest it if time allows. Really appreciate if you can help to take a look and let me know what could be wrong. thanks!

  • Hi chage,

    Have you had a chance to test this on another wifi router?

    It would be good to verify whether this is router specific or code specific (your code or CC3200 firmware). 

    Glenn.

  • Hi Glenn,

    Too bad I do not have another router to test it out. I will try to find another source of AP, maybe starbucks when i have a chance. 

    chage

  • Hi chage,

    I believe testing on another wifi router is an essential trouble-shooting task, that will help everyone, including Nir in resolving your issue. 

    Have you made changes to the wlan_station example at all? Even if you have not, there may be specific to your situation that could be causing issues, which is why it is important to narrow down the problem domain by testing on another wifi router or ap.

    You can also use a smartphone as a hotspot to test, so if you have a 2 phones, one with the smartconfig software installed and one acting as a hotspot, you can test also.

    Glenn.

     

  • Hi chage,

    perhaps you can create a firmware (*.bin) and upload it somewhere (or here, perhaps zipped to make it smaller), perhaps with some test SSID and password (if you don't want to publish your current settings, which security settings?), so one can try to retest your firmware in a CC3200, just to see if it is not working against certain routers or never works with this firmware.

    Please also tell us how you configured your serial port (if not default) and how we can see the problem or what shall happen when it worked.

    Best regards,

    Martin

  • Hi Chage,

    In the sniffer capture I can see that you have got DNS address from the AP (as part of the DHCP). I don't see the DNS query for www.google.com or www.ti.com.

     

    Few more steps:

    1. Can you complete the capture of the WireShark with the DNS query?

    2. Can you set static IP and DNS - you can use the below – and repeat the tests?

    IP address: 192.168.1.118

    Default Gateway 192.168.1.1

    Domain Name Server: 209.244.0.3 (209.244.0.3)

    Domain Name Server: 74.82.42.42 (74.82.42.42)

    3. can you use your mobile device as a Hotspot (like a 2nd router)?

     

    Best Regards,

    Nir Nitzani

  • Hi All,

    thanks for all kind suggestion and feedback. Finally i recall I have a freedompop device that i can use as AP (i have no other router, my phone is locked for hotspot support). 

    Good news is using freedompop AP, the wlan_station sample code ran successfully!

    So now, any suggestion as for how we narrow down this as really the router problem or firmware issue that failed on this router?

  • Hi Nir,

    As for the wireshark data, those really everything that I can capture while connect to previous linksys AP. I filtered the data down to CC3200 acquired IP to remove noise. 

    I did notice the capture doesn't show any attempt to resolve www.ti.com or www.google.com (in my case), but it kind of make sense since the failure is -161 error code (no DNS server found), and the firmware might have failed before attempt any host resolve request.

  • Hi Chage,

     

    I assume all other WiFi devices are working with the Linksys AP. We don’t have this AP (already ordered), so we will try solve it remotly.

    I would like to try a few more steps:

     

    If all of the above doesn’t work we can enable some debug capbilities on the CC3200 and try to better understand the issue – This is only if you would agrea to help.

      

    Best Regards,

    Nir Nitzani

  • Hi Nir,

    Yes all other devices are working with this linksys AP ( 2x windows laptop, 1x macbook, 2x iphones, 1x android tablet and 1x smart TV).

    • Yes i tried setting static DNS before and it wasn't working.
    • Did a reset to default and still run into the same issue
    • I will hold on to using DD-WRT, never deal with WRT before :)

    I am wiling to work on the debug enabled capabilities to narrow down the problematic areas.

  • Hi chage,

     

    Please send me your email address – I will contact you in private in order to continue the investigation.

      

    BR,

    Nir Nitzani

  • Hi Nir,

    Sent you an email. Thanks for looking into this.

  • All,

     

    With the help of Chage we were able to identify the issue.

    It seems that if the Access Point DHCP provides 3 DNS address, the device will worngly detect it as no address and return error on the sl_NetAppDnsGetHostByName.

    We have identified the issue and a fix will be provided in the next service pack (few weeks from now).

     

    Currently it’s mainly releated to Linksys e1550 AP but it might be seen on others if configured to 3 DNS address.

     

    How to detect:

    • Sympthom: sl_NetAppDnsGetHostByName returns -161
    • In the IP acquired event the DNS address is euqal to zero – that will mean there is and issue with the DNS address

     

    How to overcome:

    • In most AP it’s enough to set 2 DNS address (not 3)  - that will solve the issue
    • If you still observe issue please send us a message an we will look into it

     

     

     

    Best Regards,

    Nir Nitzani

  • Yup, issue resolved! 

    Thanks Nir for his great support, and his engineer who help the debugging effort. Thumbs up! 

  • Nir,

    Thank you for reporting this bug for all to see. It is open communication like this that helps build confidence with your customers. For such a new product, it is expected that we will see these sorts of issues, so it is not a problem, especially when we know they will be resolved quickly.

    Glenn.

  • Hi, I have a Linksys E2500 and am experiencing the same issue.  I tried manually entering DNS servers into two of the three slots but it didn't seem to help.  I'm not sure if I misunderstood "In most AP it’s enough to set 2 DNS address (not 3)  - that will solve the issue."  Could you please clarify how to get DNS working?

    Whether there is an existing work-around or not, I'm looking forward to the service pack since I would like to use the CC3200 in a consumer product, and broad compatibility is a must.

    Thanks!

  • Hi NatureTM,

    do you have another PC (windows) that connected to the same AP? if yes, can you run ipconfig /all to verify the number of DNS server returned?

    I know some linksys AP will return 3 DNS even though only 2 configured in the setup. 

  • Hi,

    When you configure Linksys E2500 with 2 DNS addresses, he actually  send 3 DNS address,  the 2 you configured and its own IP address.

    Meanwhile, till the SP please configure only single DNS address.

    In the attached jpeg , you can see that single DNS address is configured (8.8.8.8), but ipconfig show 2 addresses 8.8.8.8.+ the AP  IP address

     

    Regards

     

    Nir G

  • Even when entering only one IP in the "Static DNS" settings fields, DHCP still returned 3 IP addresses.  I had to change my internet setup at the top of that page to use a static IP, and only enter one DNS server there.  It looks like the static DNS settings were overridden by the internet configuration.

    Still, you gave me enough direction to get the CC3200 DNS client working.  I appreciate the fast response!

  • This has not been fixed in the latest service pack, and I just wanted to make sure the issue is still on TI's radar.

  • Hi NatureTM,

    Please use the  latest SDK1.0 provided by TI: http://www.ti.com/tool/cc3100sdk

    Regards,

    Nir

  • Hi Nir,

    I downloaded the CC3200 SDK today 2/1/2015 and i still have the same problem Error -161 any thoughts?

    Thanks

    Steve
  • Hi Steve,

    Can you print out the build version from the device?

    Can you share the exact AP module and HW/SW version?

    Can you capture Air sniffer from the WiFi connection until seeing the Error?

  • Hi Nir,

    The CC3200 works fine on my Phone's access point, I have a new Airport Express that hands out 3 DNS entries and then i get the -161 error.

    Here is the build version information:

    Host Driver Version: 1.0.0.1
    Build Version 2.0.7.0.31.0.0.4.2.1.5.3.3

    Here is the download page i used 

    Help!!!!

    thanks

    Steve

  • Hi Steve,

    According to the build version you have provided it seems you are not using the latest one.

    You are probably using the correct SDK but important part of it is the Service Pack / Build version.

    the latest build version for the production device should be: 2.2.0.1.32.1.2.0.2.1.0.3.23



    Please refer to this link:

  • Hi,

    That is for the CC3100 I'm using the CC3200... are they the same?

    Thanks

    steve
  • Nir,


    *************************************************
    CC3200 WLAN STATION Application
    *************************************************



    Host Driver Version: 1.0.0.1
    Build Version 2.2.7.1.31.1.2.4.2.1.5.3.23
    Device is configured in default state
    Device started as STATION
    [WLAN EVENT] STA Connected to the AP: shyster ,BSSID: 80:ea:96:ed:17:d0
    [NETAPP EVENT] IP Acquired: IP=192.168.60.145 , Gateway=192.168.60.1
    Connection established w/ AP and IP is aquired
    Pinging...!
    Device pinged both the gateway and the external host
    WLAN STATION example executed successfully


    I updated the code and now the demo works... thank you

    Steve
  • Hi Steve,


    I am getting the Build Version 2.0.7.0.31.0.0.4.1.1.5.3.3

    How I can change the Build Version, Can you please guide me for this.

    Thanks in advance.

  • I have the same issue

    I am using CC3200SDK_1.2.0
    and CC3200_ServicePack_1.0.1.6-2.6.0.5

    My build version comes up as:
    Build Version 2.0.7.0.31.0.0.4.1.1.5.3.3
    And the demo does not work.
    Help

    Adam