Pages: 1 2 [3] 4 5 ... 9   Go Down
Author Topic: discussion on supporting the TI CC3000 WiFi module  (Read 55206 times)
0 Members and 1 Guest are viewing this topic.
Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Really great work! You are the first to port the firmware over to Arduino  smiley-cool
Logged

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
Arduino rocks / OpenLCB rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Dr. David Harris
OpenLCB Dev Team

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
Arduino rocks / OpenLCB rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Dr. David Harris
OpenLCB Dev Team

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

On the buffer, uncomment

Code:
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]
« Last Edit: June 23, 2013, 05:05:54 pm by magagna » Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
Arduino rocks / OpenLCB rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, that worked a treat. 

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

David
Logged

Dr. David Harris
OpenLCB Dev Team

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
Arduino rocks / OpenLCB rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Dr. David Harris
OpenLCB Dev Team

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
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:

Code:
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?
Logged

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using an Arduino Pro Micro from Sparkfun at 3v3 (8Mhz), so it is not necessary to do level shifting. All connections seems to be ok since I can pass the connection test example. I am using Hardware SPI.
Logged

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OK thanks, that means it's very likely a bug in the library and not anything to do with your hardware. I'll start looking tonight.
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I got it to successfully do some tasks such as writing a MAC address... Any luck on getting it to actually connect to the internet or run the smart config process?
Logged

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys,

Sorry for the delay, I have been busier with work this week than I anticipated. I doubt I'll have time to get to the library before Sunday, but I'm pretty sure I'll have time to work on it then.

I did see SparkFun is having a 20% off sale (https://www.sparkfun.com/pages/news20?utm_source=promo&utm_medium=social&utm_campaign=newsletter) so I think I may buy a Pro Micro and see if I can figure out why it's not working for alvarolb.

[edit - Pro Micro, not Pro Mini. alvarolb - is this the board you have? https://www.sparkfun.com/products/10999 ?)
« Last Edit: June 27, 2013, 10:58:32 pm by magagna » Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi magagna! dont worry about delays, you already did a great job! Today i can take some time and do more test with the library and my Arduino, so I will keep you informed if I get something interesting. Also I have a teensy 3.0, so I can do more tests. My Arduino board is the Arduino Pro Micro, the Pro Mini is the same but without USB, so the URL you have posted is correct =)

Thanks for your time!!
Logged

Pages: 1 2 [3] 4 5 ... 9   Go Up
Jump to: