CC3000 shield connection speed

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
wabbitguy
 
Posts: 12
Joined: Wed Dec 03, 2014 11:24 pm

CC3000 shield connection speed

Post by wabbitguy »

My router has b/g/n and I know the CC3000 doesn't do 'n'.

However is there a particular reason why it always connects in '802.11b'? Is there some method by which one can force it into 'g' mode?

Using my Adafruit shield on a MEGA2560, which is the preferred option, SPI_CLOCK_DIVIDER, or SPI_CLOCK_DIV2?

BTW: I updated the firmware to 1.1.3, MUCH more reliable now! Nice work! And the fact that I can use TextFinder a bit (doesn't seem to be able to handle multiple FindUntil for linear searching through a stream) makes it great for my requirements.

Mel

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: CC3000 shield connection speed

Post by adafruit2 »

1) 802.11b/g - Thats all internal to the cc3100 so you can ask TI but we have no idea, we just tell the module to connect to the SSID :)
2) try SPI_CLOCK_DIVIDER, its faster!

User avatar
wabbitguy
 
Posts: 12
Joined: Wed Dec 03, 2014 11:24 pm

Re: CC3000 shield connection speed

Post by wabbitguy »

Thanks for the speedy reply! I changed to SPI_CLOCK_DIVIDER and yep, seems to be more responsive.

As for asking TI, well, I haven't asked TI anything since the TI99/4 even then I preferred programming the Trash80. There, that dated me somewhat...;-) TI probably bases it on signal strength, lowest connection speed available or, phase of the moon.

It'd be nice if one could define their own rx/tx buffer size or use the defaults without modifying the library. The MEGA has substantially more memory than an UNO.

Mel

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: CC3000 shield connection speed

Post by tdicola »

Good question about how to force a specific connection type. Looking at TI's docs unfortunately I don't see any option, at least in the wifi connect API. You might ask in the CC3000 forum on TI's site but I have a feeling it's probably something they don't expose on the chip. Like you mentioned it probably tries to connect to any available AP that it can and doesn't have a lot of logic for controlling the specific connection type.

Good feedback on the buffer sizes too--yeah it's a great point, especially as bigger Arduinos, etc. become more common. In the future we'll look at updating the library to let you see things like buffer sizes a little more easily, thanks!

User avatar
wabbitguy
 
Posts: 12
Joined: Wed Dec 03, 2014 11:24 pm

Re: CC3000 shield connection speed

Post by wabbitguy »

I read through the API's for the CC3000 in comparison to the CC3100. Nowhere did I see anything that jumped out and said connect with 802.11g. Or b for that matter. Thus, I'm guessing even with the CC3100 they're going to connect with the lowest speed possible because it's more "reliable"? Which even saying makes no sense. The range of b vs g is so close that one would have to give their head a good shake to wonder why 'b' is still around (like from 1999).

I'm going to get another CC3000 at some point and try to find a G router to connect to. If for nothing else to make sure that it can connect...

Reading the TI site (and thanks for the link!) I got the feeling that the CC3000 is going the way of the DODO and the 3100/3200 will be the new kids on the block. With all new problems. Of course...LOL

Mel

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: CC3000 shield connection speed

Post by tdicola »

Yeah the CC3000 has had some annoying firmware issues, but the most recent firmware versions seem to have gotten it into a good state. You're right though new products always bring new issues to discover! :)

User avatar
wabbitguy
 
Posts: 12
Joined: Wed Dec 03, 2014 11:24 pm

Re: CC3000 shield connection speed

Post by wabbitguy »

So far the longest time I've gotten the CC3000 to run (checking my email once a minute) is 50 hours. At which point, it said it was still connected to my AP but apparently pretty much deaf beyond that. So today I coded in a lot of trace routines into my loop to see where things go astray.

I also toyed around with the RX and TX buffer sizes in the CC3000.h file. Since I'm using a MEGA I made them 256 and 512 respectively. Which worked perfect until the server sent the CC3000 about 1440 characters. Then the whole thing disappeared into the digital abyss. So I then experimented with lower buffer sizes. Ah nope. Same digital abyss syndrome. Methinks that someplace else in all those libraries there's a reference for those buffer sizes that "adjusts" something else in turn.

Thus I returned the buffers back to the default sizes, the CC3000 is happy and I'll keep an eye on it for when it does go south...

As an aside, I wonder how much the new driver that's coming for the CC3000 will help matters. Or create new interesting "features"...:-)

Mel

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: CC3000 shield connection speed

Post by tdicola »

Ah interesting, yeah you do have to be careful about sending too much data to the CC3000. It can only handle a packet of data up to its buffer size, so sending it 1440 bytes in a single packet could be too much and causing issues. Good to hear it's working with the default buffer sizes though.

User avatar
wabbitguy
 
Posts: 12
Joined: Wed Dec 03, 2014 11:24 pm

Re: CC3000 shield connection speed

Post by wabbitguy »

The 1440 was from a server of mine on the internet, I didn't send that from the Arduino...LOL The majority of my commands I send it would be less than 50 bytes. Mostly to log onto my mail server and ask for the email headers if there is email on it and then parse that header data.

What I have found is that when using TextFinder, I have to put in a default "timeout" value. If I don't, in spite of the fact there is supposed to be a 5 second one, it will hang in a loop forever.

I also had to write in a fair bit more logic checks to make sure it will log onto the server, and then work it's way through requesting and parsing the data I want. I also had to add in a check to make sure that the CC3000 was still connected to my router. For what ever reason at one point it would drop off the network. When that happens now I reboot the CC3000 and start fresh with it to get the connections.

Requesting a DHCP seems the slowest part of the whole process. I have my router setup for the CC3000 MAC address to always issue the same IP for it and it still takes 20-40 seconds. And it's always in 802.11b.

Any way with a lot of extra logic checks, it's been running for three days, solid.

None the less, I got a LOT further with the CC3000 than I ever did with the ESP8266.

Mel

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: CC3000 shield connection speed

Post by tdicola »

Very cool, yeah it's actually kind of surprising that devices as small as the CC3000, ESP8266, etc. can implement a whole wifi networking stack and work with 8/16-bit micros. They have some limits and issues compared to writing network code on a real computer, but if you can work around those issues it lets you do some pretty cool stuff.

User avatar
wabbitguy
 
Posts: 12
Joined: Wed Dec 03, 2014 11:24 pm

Re: CC3000 shield connection speed

Post by wabbitguy »

I suspect it's got a lot to do with embedded devices, everything from a home furnace control, to those home automation light switches. That's probably where the devices shine.

It's when we get a hold of them and push them as they were real WIFI like we're used to with computers that the digital glue that holds them together begins show up.

Today my CC3000 finally dropped off the network (4+ days) and the reboot subroutine I wrote caught it. I waited for a couple of hours for the DHCP lease to once again appear and it never did. Power cycling the Arduino a few times and the CC3000 finally managed a DHCP connection. Thus I beginning to wonder about the reliability of the DHCP portion.

Have you tried a static IP on yours (I think I read somewhere they can run a static IP)...?

Mel

User avatar
wabbitguy
 
Posts: 12
Joined: Wed Dec 03, 2014 11:24 pm

Re: CC3000 shield connection speed

Post by wabbitguy »

Well, as much as I hate to admit defeat, there comes a "towel" time...:-)

The CC3000 simply loves wait for DHCP for way too long, falls off the network for whatever reason, and doesn't handle 2K blocks of data sent to it once a minute all that well. And when it does fall off the network, a rather long routine of power cycling is required to get it back on. Regardless of what brand router I try to connect to, whether an IP has been assigned to it's MAC address from the router or not. Apparently I've run out of magic binary pixy dust.

Today I ripped out the CC3000, and sadly replaced it with the lowly Wiznet 5100 ethernet board, plugged into a wireless bridge and presto. Lightning fast DHCP, reliable connection, major data thru-put over anything the CC3000 with its mere 802.11b connection format can muster. To be fair I can't completely blame the CC3000 since I'm relying heavily on TEXTFinder as well. Which may or may not play nicely with the CC3000. Plus the Ethernet library is extremely mature in comparison.

I did have some hopes for the CC3000, but it's not ready for prime time yet IMHO.

Mel

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”