CC3000 longer strings per TCP not sent

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Eyers
 
Posts: 1
Joined: Tue Jan 21, 2014 2:42 pm

CC3000 longer strings per TCP not sent

Post by Eyers »

Hello,

Short description of the project I'm working on. It's an Adafruit CC3000 breakout board attached to an Arduino Uno. It's purpose is to get acceleration data from an accelerometere and send it to the webserver running on my computer. The code I've written rlies heavily on the code written by Marco Schwartz for openhomeautomation.

For his project, the CC3000 connects to a W-Lan, sends data to a webserver, disconnects and repeats every 10 seconds. For my project, connecting and then reconnecting only to send data takes too much time since it's meant to be realtime later on. Because of that, my board connects to the W-Lan and the webserver in the setup part of the Arduino sketch. In the loop part it just reads out the data from the accelerometer and sends them to the webserver. This has worked rather well as long as the data send is small. It was able to put through around 3 http GET requests per second (Code: http://pastie.org/private/ljnmnktdjhuntcrhubredq) It still reconnects after every request sent anyways even though I don't really know why. If I take out the reconnect I just get an error 408 and nothing more.

Since 3 sets of data are too slow for what I need it for, I've created an array which gathers 10 sets of data (from the 3 axis') and sends them out using the same prodecure. Unfortunately, it seems that this is not possible. Maybe because the string is too long? Whatever the reason, I get 1 set of data every 30 seconds because the connection seems to time-out after the first set. (Code: http://pastie.org/private/jwctft0ejpfdcjav4ta1a)

Am I doing something wrong or is there something obvious that I've overlooked and a way to get it to do what I want it to do?

Ty in advance,

Eyers

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: CC3000 longer strings per TCP not sent

Post by adafruit_support_rick »

There was recently a discussion on large (>100 byte) packets, and I think there is a patch to the library in the works. I will try to track down the status of that for you

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: CC3000 longer strings per TCP not sent

Post by adafruit »

you can check the status of any & all issues on the github repo, live! ;)

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: CC3000 longer strings per TCP not sent

Post by adafruit_support_rick »

Yeah - but I'm not seeing it there, open or closed. Not in pulls, either. I know it was discussed in the forums, but I'm just not finding it.
Something about changing a buffer index to int16_t, I think...

Edit: Here it is:
http://forums.adafruit.com/viewtopic.ph ... er#p244235
Looks like it's part of Pull #38, which has already been incorporated.

Try grabbing a new copy of the library.

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

Re: CC3000 longer strings per TCP not sent

Post by tdicola »

Yep this was the pull request that was just integrated to fix a bug with sending more than about 200 bytes: https://github.com/adafruit/Adafruit_CC ... ry/pull/38 Try with the latest version of the library to see if that helps. Something else you might also consider is breaking up the single request into multiple smaller requests. So instead of sending "GET /url?param1=foo&param2=bar" etc, send "GET", then " /url", then "?param1=foo", "&param2=bar", etc.

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

Return to “Other Arduino products from Adafruit”