I am using a CC3000 (firmware 1.24) with an Uno. Everything was working fine until I tried changing from one WiFI access point to another. Since changing AP's, DHCP updates everything except the DNS server address. I've tested the DHCP server thoroughly and it works fine for all other devices I have.
Refer to output shown below - the DNS servers returned by the DHCP server are 10.0.1.21 and 10.0.1.22, but as you'll notice it is incorrectly set to the old DNS address of 192.168.1.2
Is there any way to completely wipe the IP address configuration from the CC3000 or force it to update the DNS server address?
Initialising the CC3000 ...
Firmware V. : 1.24
MAC Address : 0x08 0x00 0x28 0x57 0x9B 0x0F
Started AP/SSID scan
Networks found: 1
================================================
SSID Name : robosoft-wifi
RSSI : 63
Security Mode: 3
================================================
Deleting old connection profiles
Attempting to connect to robosoft-wifi
Started AP/SSID scan
Connecting to robosoft-wifi...Waiting to connect...Connected!
Request DHCP
IP Addr: 10.0.1.69
Netmask: 255.255.255.0
Gateway: 10.0.1.1
DHCPsrv: 10.0.1.21
DNSserv: 192.168.1.1
CC3000 DHCP Failing after changing AP
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23911
- Joined: Mon Apr 21, 2008 2:33 pm
Re: CC3000 DHCP Failing after changing AP
Have you tried going back to the original AP? Are the two APs set up identically (except the IPs)? Are you sure there is nothing in your code that is setting this incorrectly or at all?
- rpwyatt
- Posts: 8
- Joined: Mon Dec 02, 2013 7:49 am
Re: CC3000 DHCP Failing after changing AP
Yeah, going back to the original AP works fine as it keeps the correct DNS server address for that network. No, they are completely independent AP's - nothing is common between them.
I'm sure there is nothing in the code that is incorrectly setting this - if there was I'd know how to manually change the DNS server address to correct this problem. Unfortunately I haven't been able to find a way to do that.
I'm sure there is nothing in the code that is incorrectly setting this - if there was I'd know how to manually change the DNS server address to correct this problem. Unfortunately I haven't been able to find a way to do that.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: CC3000 DHCP Failing after changing AP
Hmm.. previous versions of the CC3000 firmware had problems with the 1.0.0.0 block, so I wonder if this might be a lingering aspect of that.
Are you able to change the address on the second DHCP server? If so, could you try giving it a few class-B and class-C addresses to see if those work as expected?
If we can document the same hardware updating properly for class-B and class-C networks, but failing to update for the 10.0.0.0 block, we'll be able to show that to TI and ask them to take a look at the relevant parts of the firmware.
Are you able to change the address on the second DHCP server? If so, could you try giving it a few class-B and class-C addresses to see if those work as expected?
If we can document the same hardware updating properly for class-B and class-C networks, but failing to update for the 10.0.0.0 block, we'll be able to show that to TI and ask them to take a look at the relevant parts of the firmware.
- rpwyatt
- Posts: 8
- Joined: Mon Dec 02, 2013 7:49 am
Re: CC3000 DHCP Failing after changing AP
I tried changing the DNS server address on my DHCP server - I confirmed that this worked using a PC - however it had no impact on the CC3000. No matter what IP address I assign to DNS on the DHCP server, the address used by the Arduino is always 192.168.1.1.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: CC3000 DHCP Failing after changing AP
I wasn't thinking of the address the DHCP server emits, but rather the DHCP server's address itself.
Right now you have the DHCP server as a member of the 10.0.0.0 network, and the addresses it allocates are also in the 10.0.0.0 block. What happens if you change the DHCP server's address to 192.168.123.21 and have it allocate addresses in the 192.168.123.x block?
Right now you have the DHCP server as a member of the 10.0.0.0 network, and the addresses it allocates are also in the 10.0.0.0 block. What happens if you change the DHCP server's address to 192.168.123.21 and have it allocate addresses in the 192.168.123.x block?
- rpwyatt
- Posts: 8
- Joined: Mon Dec 02, 2013 7:49 am
Re: CC3000 DHCP Failing after changing AP
Sorry for the confusion. I've updated the DHCP server as you suggested and unfortunately have the same result. See the serial output below:
IP Addr: 192.168.123.40
Netmask: 255.255.255.0
Gateway: 192.168.123.21
DHCPsrv: 192.168.123.21
DNSserv: 192.168.1.1
I also tried using a different DHCP server type to rule that out and got the same result.
IP Addr: 192.168.123.40
Netmask: 255.255.255.0
Gateway: 192.168.123.21
DHCPsrv: 192.168.123.21
DNSserv: 192.168.1.1
I also tried using a different DHCP server type to rule that out and got the same result.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: CC3000 DHCP Failing after changing AP
No worries.. there are so many numbers in networking it's easy to get confused.rpwyatt wrote:Sorry for the confusion.
That rules out my 10.0.0.0 hypothesis, so we don't have to invest any more effort there.rpwyatt wrote:I've updated the DHCP server as you suggested and unfortunately have the same result.
Good idea. That's more evidence that the problem lies in the CC3000 or the library.rpwyatt wrote:I also tried using a different DHCP server type to rule that out and got the same result.
Do you happen to have another wireless device that can go into promiscuous mode and monitor the wifi traffic through `tcpdump`?
I'll admit that's pretty obscure, but it would tell us exactly what information is being passed back and forth when the CC3000 emits its DHCP request.
In the meantime, I'll talk to the folks who do the heavy lifting for the CC3000 library and see if they have any ideas.
- rpwyatt
- Posts: 8
- Joined: Mon Dec 02, 2013 7:49 am
Re: CC3000 DHCP Failing after changing AP
I've attached a wireshark capture from the DHCP server showing the DHCP negotiation with the CC3000. Let me know if that isn't good enough.
Did you have any luck finding a solution? Is there a way to wipe the NVMEM on the CC3000 to get rid of the rogue setting?
I also have another problem I'm trying to diagnose - I had 2 other CC3000's that were running flawlessly until I powered them up tonight. One of the Arduino's now seems to get stuck on the cc3000.begin(). I've tried the shield on multiple Arduino's and it looks like it's dead. Have you found these shields to be reliable?
Thanks,
Rob.
Did you have any luck finding a solution? Is there a way to wipe the NVMEM on the CC3000 to get rid of the rogue setting?
I also have another problem I'm trying to diagnose - I had 2 other CC3000's that were running flawlessly until I powered them up tonight. One of the Arduino's now seems to get stuck on the cc3000.begin(). I've tried the shield on multiple Arduino's and it looks like it's dead. Have you found these shields to be reliable?
Thanks,
Rob.
- rpwyatt
- Posts: 8
- Joined: Mon Dec 02, 2013 7:49 am
Re: CC3000 DHCP Failing after changing AP
Forgot the attachment.
- Attachments
-
- cc3000_dhcp.pcapng.zip
- (894 Bytes) Downloaded 57 times
- rpwyatt
- Posts: 8
- Joined: Mon Dec 02, 2013 7:49 am
Re: CC3000 DHCP Failing after changing AP
Hi Guys,
I took a gamble and flashed the CC3000 board with a fresh copy of the 1.24 firmware and it has resolved the issue. Thanks for your help in trying to resolve this.
Regards,
Rob.
I took a gamble and flashed the CC3000 board with a fresh copy of the 1.24 firmware and it has resolved the issue. Thanks for your help in trying to resolve this.
Regards,
Rob.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: CC3000 DHCP Failing after changing AP
Glad to hear that worked for you.. I didn't particularly look forward to snooping TCP/ICMP traffic by mail.
Happy hacking!
Happy hacking!
- dbm
- Posts: 17
- Joined: Sun Jan 19, 2014 12:22 am
Re: CC3000 DHCP Failing after changing AP
I've got the identical issue just now ... the CC3000 remembers the old DNSserv: 192.168.2.1 address when I switch APs ... I would like to be able to fix this in the sketch rather than reflashing since reflashing won't be an option for end users. Any thoughts on how to clear the CC3000 NVRAM?
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: CC3000 DHCP Failing after changing AP
Are you using SmartConfig or just making a general connection?
- dbm
- Posts: 17
- Joined: Sun Jan 19, 2014 12:22 am
Re: CC3000 DHCP Failing after changing AP
Neither works for this particular CC3000. Identical code works with another CC3000 (but for all I know, the other CC3000 is stuck with the "correct" DNSserv")
from Ardunio --
Request DHCP
IP Addr: 192.168.1.134
Netmask: 255.255.255.0
Gateway: 192.168.1.1
DHCPsrv: 192.168.1.1
DNSserv: 192.168.2.1 ---> on this network this should be 192.168.1.1
from ipconfig/all --
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DHCPv6 IAID . . . . . . . . . . . : 218108904
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1A-9B-1D-A8-00-1A-6B-D0-A3-11
DNS Servers . . . . . . . . . . . : 192.168.1.1
64.59.144.18
64.59.150.134
So here's a question or two --
o does the CC3000 store the 2nd or 3rd DNS server address.. and fail over (apparently not)?
o how can I tell the CC3000 which DNS to use?
from Ardunio --
Request DHCP
IP Addr: 192.168.1.134
Netmask: 255.255.255.0
Gateway: 192.168.1.1
DHCPsrv: 192.168.1.1
DNSserv: 192.168.2.1 ---> on this network this should be 192.168.1.1
from ipconfig/all --
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DHCPv6 IAID . . . . . . . . . . . : 218108904
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1A-9B-1D-A8-00-1A-6B-D0-A3-11
DNS Servers . . . . . . . . . . . : 192.168.1.1
64.59.144.18
64.59.150.134
So here's a question or two --
o does the CC3000 store the 2nd or 3rd DNS server address.. and fail over (apparently not)?
o how can I tell the CC3000 which DNS to use?
Please be positive and constructive with your questions and comments.