discussion on supporting the TI CC3000 WiFi module

Just writing our posts at the same time! :)

I have the Type-VK module from Murata, seems to be very similar to yours from TI:

http://www.murata-ws.com/type-vk.htm

I think that is ease to do a breakout module for this chip with an easy interface. I though that I read that is necessary a four layer PCB with a whole GND layer. There are some layouts already from the internet that can be a good starting point:

http://hackaday.com/2013/01/27/a-breakout-board-for-a-tiny-wifi-chip/

Something I have seen with my first IRQ tests, is that when powering the CC3000 from the Arduino 3v3 ( board is at 3v3 ), all stop working and cannot receive any IRQ or communicate with serial port with PC, when driving WIFI_ENABLED on. However, powering the CC3000 module from an external power supply, all work as expected, and IRQs are received normally. Not sure if it is the same problem with your Arduino. But is a little issue i found when using the Arduino. Powering from other 3v3 boards does not seem to be a problem.

What is your compiled sketch size in the Arduino environment?

37K Flash, 4.3K RAM (on a Teensy 3.0).

Are you compiling with CC3000_TINY_DRIVER definition enabled?.

When I set the target to Uno and set CC3000_TINY_DRIVER it uses 11.4K Flash and ~ 250 bytes RAM (but doesn't actually work yet).

How many pins are you using to communicate with the chip?

Yep, 6 pins:

The normal SPI pins: MOSI, MISO, SCK, CS The notification pin (TI calls this WLAN_SPI_IRQ) The 'enable module' pin (TI calls this VBAT_SW_EN in some places and WLAN_EN in others).

Hope to see some library or reference software to test with the Arduino

Licensing for my implementation will start at $25 per CPU. Just kidding. I'll post it as soon as I'm not embarrassed by it.

alvarolb: Something I have seen with my first IRQ tests, is that when powering the CC3000 from the Arduino 3v3 ( board is at 3v3 ), all stop working and cannot receive any IRQ or communicate with serial port with PC, when driving WIFI_ENABLED on. However, powering the CC3000 module from an external power supply, all work as expected, and IRQs are received normally. Not sure if it is the same problem with your Arduino. But is a little issue i found when using the Arduino. Powering from other 3v3 boards does not seem to be a problem.

I did have this problem at the very beginning...the CC3000 wants up to 250mA @ 3.3V and neither my Teensy or Nano can drive that much current. Right now I'm taking the 5V from USB and running it through a LD1117V33 for the CC3000, and connecting the grounds together.

I hope someone's working on a hardware implementation.

There are RF compliance issues, if you don't exactly follow the TI reference design rules and antenna selection. And the design rules are tough to follow (weird board thickness, etc.) There is useful discussion under the hackaday link alvarolb posted...

You get a bit disillusioned when all those lovely $12 modules become $40 boards, and your homemade "simple" replacement isn't legal :-( It'd be more productive to write TPLINK router code to turn it into a slave device, and then you wonder what your arduino is there for at all.

powering the CC3000 from the Arduino 3v3

The CC3000 is a power-hungry beast, well above the 50mA "spec" of the Arduino board, and probably beyond what the separate regulator chip on the Uno can provide...

There are RF compliance issues, if you don't exactly follow the TI reference design rules and antenna selection. And the design rules are tough to follow (weird board thickness, etc.) There is useful discussion under the hackaday link alvarolb posted...

You get a bit disillusioned when all those lovely $12 modules become $40 boards, and your homemade "simple" replacement isn't legal :-( It'd be more productive to write TPLINK router code to turn it into a slave device, and then you wonder what your arduino is there for at all

I agree...that's why I'm hoping someone else does that part...

I actually wouldn't mind a CC3000 daughterboard at $40 if it had more of a normal footprint (not necessarily a real shield, but something more like the hackaday board).

It seems like the WiFi for Arduino right now is either

  • Expensive and weird (the official Arduino WiFi board or the Yún)
  • Cheaper but limited API (the RN-XV)
  • Cheaper but requires "cloud" services (the Electric Imp and the Spark Core)
  • Cheaper but in a form factor not great for small embedded systems (connecting an Arduino to a router per your example)

My hope is the CC3000 will let us get past all of that.

There is a guy that published eagle design files for a CC3000 breakout

http://centerblack.com/

Hi in your quote you said ..... $40 boards, and your homemade "simple" replacement isn't legal :-(, are you referring to compliance and FCC certifications? So you are saying if somebody sells it as a board it is illegal? TI selling it for their MSP did they get FCC?

Thanks for educating us on this.

Yes, and yes...

Hi all,

The basic library is done and working for the Teensy 3.0. I'm currently removing all my debugging code and writing up some documentation and will hopefully have that done tomorrow or soon next week.

I've created a github account and published my code you can use to test basic connectivity between an Arduino and a CC3000:

https://github.com/cmagagna/ArduinoCC3000Test

More soon.

Really great work! You are the first to port the firmware over to Arduino 8)

I'm pleased to report the library is ready and I've just uploaded it to github:

https://github.com/cmagagna/ArduinoCC3000

This version now compiles and runs on a Uno etc. without having to use the CC3000_TINY_DRIVER flag. By default the library will take about 12K of Flash and 350 bytes of RAM.

The included file ArduinoCC3000.ino doesn't do much more than initialize the library and reports its firmware version, but will hopefully be enough to get you started. In the next few days I'll be fleshing this code out to do more demos, e.g. run Smart Config, show WiFi & IP info, etc.

Please feel free to let me know if you have any questions etc. Thanks to everybody here for help on getting the hardware working.

Hi --

I have just started to port this to the TI Stellapad using Energia (Arduino IDE derivative). I have a couple CC3000 'shields' for my StellaPads. The compile fails on finding MOSI and MISO definitions ... ? they should be in SPI.h.

However, I converted your 'if(USE_HARDWARE_SPI) { ... } else { ... }" statements into compiler directives like "#if(USE_HARDWARE_SPI) ... #else ... #endif" so that the compiler never sees the software SPI bits.

I am not really close, but will keep working on it.

David

Hi again --

I am getting this error: "wlan.cpp: In function 'void wlan_start(short unsigned int)': wlan.cpp:321: error: 'wlan_tx_buffer' was not declared in this scope"

here: "tSLInformation.pucTxCommandBuffer = (unsigned char *)wlan_tx_buffer;"

... whether in Arduino 1.01 or in Energia.

Where is that supposed to be defined?

David

Good idea on the compiler directive. I'll make that change too.

On the buffer, uncomment

extern unsigned char wlan_tx_buffer[]

in ArduinoCC3000SPI.h.

The actual definition is in ArduinoCC3000SPI.cpp

I will make this change as well.

Thanks!

[edit - code patched at github and formatting fixed here to make the required change more obvious]

Thanks, that worked a treat.

Now to attach the hardware an make sure the pins are correct.

David

BTW, here is the TI booster pack for the MP430 and Tiva series of dev boards: https://estore.ti.com/CC3000BOOST-CC3000-BoosterPack-P4258.aspx

David

Just tested the Android Test library, and all the connections seems to be working well! It sends and receive the packet also:

Waiting for you before starting...
Confirming WLAN_IRQ is high...
Turning CC3000 on...
Waiting for the CC3000 to boot...

Testing first packet:
Expected: 2 0 FF 0 0 0 0 0 0 0 
Received: 2 0 FF 0 0 0 0 0 0 0 

Testing second packet:
Expected: 2 0 0 0 5 4 0 40 1 0 
Received: 2 0 0 0 5 4 0 40 1 0 

ALL TESTS PASSED!!!

However when using the full library, it holds on Initializing CC3000:

Waiting on you before starting...

Transmit buffer is 119 bytes
Receive buffer is 119 bytes

Initializing CC3000...

Is this the same behaviour when your aret not using Teensy?

Sorry to hear that.

I've only been using the Teensy for the last few days and no problems with it, but it's using bit-banged SPI instead of the hardware so there may very well be differences. I will re wire things to use a Nano tonight and look into it.

What Arduino are you using? If you're using a 5V board how are you level shifting the control signals?