Teensy 3 and Adafruit 3.0 server

Status
Not open for further replies.

waterfox

Member
Is there any word on when the Adafruit CC3000 server will be supported / ported to the Teensy 3?

I had the client working first try with the latest Adafruit CC3000 Library and Paul's Library. As soon as I try Server.begin(); my system hangs. Interested to know if anyone else has got the server working on the Teensy.
 
Same here. My CC3000 works fine in server mode on Arduino Uno, but hangs at Server.begin() with Teensy 3.
 
I'm trying the EchoServer example here on a Teensy 3.0. This is what I'm seeing:

cc3000_screenshot.png
(click for full size)

Where is it supposed to hang?
 
Over at the Adafruit forum, "teachop" tracked down the problem. The server code was passing null pointers which were written by accept(). On ARM, this causes a memory fault which stops your program. On AVR, it silently clobbers the register bank, but apparently the code didn't depend on any of those overwritten registers, so this bug has gone unnoticed on AVR.

Here's a fixed copy, which ignore the null pointers.

https://github.com/PaulStoffregen/Adafruit_CC3000_Library

I submitted a pull request to Adafruit.
 
I should mention, the fault handling behavior has changed slightly from version 1.16 to 1.17-rc2.

In 1.16, the USB becomes unresponsive during after fault. Anything you send with Serial.print() before the fault that hasn't already been transmitted is usually lost. Teensy 3.0 also stops listening for reboot requests, so it no longer responds to the Upload button in Arduino. You have to physically press the button on Teensy 3.0.

Version 1.17 changes the fault handler to try to keep the USB alive and functioning. Your program doesn't run anymore, but hopefully anything you sent with Serial.print() before the fault will actually make it through to the serial monitor. That's why my screenshot had "Listening for connections....". Version 1.17 also continues to listen for the reboot request, so Teensy can usually respond to the Upload button, even while in fault mode.

If you're still running with 1.16, please give 1.17-rc2 a try, or 1.17-rc3 if you have Windows.
 
Confirmed again, thanks for the timely fix!
I've used the teensy 3.0 as a drop in replacement for the Arduino Ada-Micro for a CC3000 Wifi project which changes 5 NEO pixel colors. http://162.243.23.121/waterfox/. I was running out of space on the Micro.
No updates required to the code or wiring. Much more powerful chip at a lower cost. Big ups!
 
Last edited:
Status
Not open for further replies.
Back
Top