Pages: 1 ... 4 5 [6] 7 8 9   Go Down
Author Topic: discussion on supporting the TI CC3000 WiFi module  (Read 57612 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@marcoschwartz and @TheCon, this should be no problem.

I haven't tested this, but here's some demo code from TI that opens a connection and sends some data:

Code:
mySocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

tSocketAddr.sa_family = AF_INET;

tSocketAddr.sa_data[0] = (port & 0xFF00) >> 8;
tSocketAddr.sa_data[1] = (port & 0x00FF);

tSocketAddr.sa_data[2] = 207;  // First octet of destination IP
tSocketAddr.sa_data[3] = 58;   // Second Octet of destination IP
tSocketAddr.sa_data[4] = 147;  // Third Octet of destination IP
tSocketAddr.sa_data[5] = 66;  // Fourth Octet of destination IP

connect(mySocket, &tSocketAddr, sizeof(tSocketAddr));

send(mySocket, cmdBuf, strlen(cmdBuf), 0); // the 4th parameter is 'flags', but not currently supported

closesocket(mySocket);


I will add a working example to the library for the next revision.

Any luck in getting this working? I have been trying to do a ping test, but I cannot figure out how to read back the data holding the ping results...

Specifially, the functions I have been calling are netapp_ping_send() and netapp_ping_report().
« Last Edit: July 16, 2013, 11:35:17 pm by TheCon » Logged

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

Alright, I tried the library with my Arduino UNO board, using level shifters. I can initialize the module successfully, so I guess my wiring is right. However, when playing with the different settings in the serial monitor the sketch randomly freezes and then I have to reset the Arduino board. I guess one problem is in the netapp_ipconfig() function which freezes the whole sketch.

Magagna, do you know something about this issue ? Maybe it is related to some issue that someone posted recently with the Arduino Uno ? I am talking about a recent post from agra_shashank:

set interrupt on LOW rather then falling edge: attachInterrupt(WLAN_IRQ_INTNUM, CC3000InterruptHandler, LOW);

Logged

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

@marco26 I'm also having a similar issue. The library and sample code seem to compile fine, but when I try to initialize it freezes up. I traced the problem, using good old debugging print statements, to the hci_event_handler() function. For some reason it just stays in the while loop. Unfortunately for me, coding isn't really my strong suit, but you could take a look and see if there's anything that needs tweaking in there.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6805
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hardware-wise, it looks like Adafruit has been active; they claim to be making announcements later tonight.

http://www.adafruit.com/blog/2013/07/19/ask-an-engineer-10pm-saturday-night-10pm-et-first-look-at-our-txinstruments-cc3000-breakout-shield-for-arduino-and-arduino-compatible-code-name-wifi-duino-internet-of/
Logged

UK
Offline Offline
Newbie
*
Karma: 0
Posts: 1
There's nothing magical about smoke!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@marco26 I'm also having a similar issue. The library and sample code seem to compile fine, but when I try to initialize it freezes up. I traced the problem, using good old debugging print statements, to the hci_event_handler() function. For some reason it just stays in the while loop. Unfortunately for me, coding isn't really my strong suit, but you could take a look and see if there's anything that needs tweaking in there.
I had this problem using a Arduino Due, I fixed it using the soft SPI option, perhaps you can try this.
Logged

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

Anybody else watched Ask An Engineer last night ? They speak indeed about the release of breakout boards for the CC3000, but even more important they mentioned that they've been working on the software for months ! I am really looking forward for the release of their products & the software. The link:

https://www.youtube.com/watch?v=pzeUvcxrIEw
Logged

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

@GBdavef Thanks for the suggestion. Unfortunately it didn't work. I also just tried Magagna's first Arduino test file for the CC3000 and that sort of worked. There was an error in receiving the second packet, but at least it gives me some comfort knowing that I've wired it up properly and it's capable of some kind of communication with the UNO. I guess I'll just have to wait and see what adafruit comes out with. Hopefully it'll be soon.
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 all,

Apologies for the absence. I'm leaving this Sunday for a 2 week family reunion / vacation and am trying to get ahead at work.

I've received all the parts to build some more CC3000 boards (based on this: https://github.com/cmagagna/CC3000-Breakout-Board) and am waiting for boards from Osh Park. I'm hoping I get them before I leave so I can work on the firmware upgrade code  during my downtime.

My guess is most of the issues everyone is seeing is due to older firmware. The current version is 1.19; the sample Arduino app has code to get yours, or you can do it yourself with nvmem_read_sp_version().

I haven't had a chance to watch the YouTube video but am excited to see it will be professionally supported; I've used many AdaFruit products and have found them to be high quality. I will continue development of my code at least until their products are officially released; after that...we'll see....
« Last Edit: July 23, 2013, 01:18:45 am by magagna » Logged

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

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

@marco26 I'm also having a similar issue. The library and sample code seem to compile fine, but when I try to initialize it freezes up. I traced the problem, using good old debugging print statements, to the hci_event_handler() function. For some reason it just stays in the while loop.

Sorry that i am not very regular here, but it looks great that there are others interested in this CC3000 stuff.
i was facing the same problem initially, if u'll comment out the get_mac function everything works well. I finally changed the interrupt style as i mentioned earlier and everything worked for me. I feel firmware update is not the solution for this b'coz i had the same problem with older version and the latest one too. Hope this works smiley
Logged

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

 
Quote
if u'll comment out the get_mac function everything works well.

Thanks agra_shashank. I don't think that's the problem though. It only prints out "Initializing CC3000..." and then freezes up. So it never even reaches "nvemem_get_mac_address". I'll keep working and see if I can figure this thing out. Hopefully I can make a breakthrough soon enough.
Logged

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

Good news: I finally have my board being able to initialize and run a few of the commands. Bad news: it runs for a while and then just freezes up until I reboot the board. At least it's some progress. I'll update if anything changes.
Logged

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

Good news: I finally have my board being able to initialize and run a few of the commands. Bad news: it runs for a while and then just freezes up until I reboot the board. At least it's some progress. I'll update if anything changes.

How are you powering the CC3000?
Logged

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

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

How are you powering the CC3000?


Initially I was using a voltage regulator which cut down the 5V from the Uno board, but I believe the current  draw was way more than it could handle. So I am currenntly powering it using the VCC pin of the launchpad. I put in an order for some LD1117V33s, so I'll try those with the 5V source as well and give an update.

Eventually I would like to use the CC3000 with an Atmega328 that has been breadboarded. I tried it today, after I figured that the CC3000 was getting enough current, and it worked once and then went back to freezing right after "Initializing CC3000..." Have you tried using the CC3000 with other peripherals on connected to the Uno? Especially one connected via SPI?
Logged

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

How is your MOSI, MISO, and SCK lines routed? I have discovered that the CC3000 is very picky about having a clean clock signal. If you have other devices on the SPI bus that could potentially be adding reflection to the bus, you should try using some termination resistors on the SCK line. You can either do a series termination at the source if you have nice SCK routing with no t's, or do end termination with a voltage divider (I believe 330 ohm pullup to vcc and 220 pulldown to GND).
Logged

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

How is your MOSI, MISO, and SCK lines routed? I have discovered that the CC3000 is very picky about having a clean clock signal. If you have other devices on the SPI bus that could potentially be adding reflection to the bus, you should try using some termination resistors on the SCK line. You can either do a series termination at the source if you have nice SCK routing with no t's, or do end termination with a voltage divider (I believe 330 ohm pullup to vcc and 220 pulldown to GND).

I actually don't have any kind of termination for my lines. I figured that having other peripherals on the SPI might be the issue but I didn't have much of an idea how to solve that problem. I'll have to do a bit more reading up on the terminations, give your suggestions a try and see how they work out. Thanks for pointing this out.
Logged

Pages: 1 ... 4 5 [6] 7 8 9   Go Up
Jump to: