Go Down

Topic: discussion on supporting the TI CC3000 WiFi module (Read 60992 times) previous topic - next topic

magagna

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.
http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

TheCon

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

magagna

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.
http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

dpharris

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
Dr. David Harris
OpenLCB Dev Team

dpharris

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
Dr. David Harris
OpenLCB Dev Team

magagna

#35
Jun 23, 2013, 11:54 pm Last Edit: Jun 24, 2013, 12:05 am by magagna Reason: 1
Good idea on the compiler directive. I'll make that change too.

On the buffer, uncomment

Code: [Select]
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]
http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

dpharris

Thanks, that worked a treat. 

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

David
Dr. David Harris
OpenLCB Dev Team

dpharris

Dr. David Harris
OpenLCB Dev Team

alvarolb

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

Code: [Select]
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: [Select]
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?

magagna

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?
http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

alvarolb

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.

magagna

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.
http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

TheCon

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?

magagna

#43
Jun 28, 2013, 05:55 am Last Edit: Jun 28, 2013, 05:58 am by magagna Reason: 1
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 ?)
http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

alvarolb

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!!

Go Up