Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 4 1 2 3 ... LastLast
Results 1 to 25 of 96

Thread: WiFi module with an SPI interface- project...

  1. #1
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828

    WiFi module with an SPI interface- project...

    This WiFi module with an SPI interface would be a very interesting project...

    Need to find a supplier for single unit quantities

    http://www.ti.com/lit/ds/symlink/cc3000.pdf

  2. #2
    Senior Member
    Join Date
    Jun 2013
    Location
    Torrance CA
    Posts
    395
    I have a library for that module, https://github.com/cmagagna/ArduinoCC3000. There are prototype boards with the module, like the CC3000EM, but none have standard pinouts. Last weekend I made a breadboard-friendly board, https://github.com/cmagagna/CC3000-Breakout-Board. I've got prototype boards on order from Osh Park so hope to have them running in 3-4 weeks.

    As for the module itself, DigiKey has them for $12.51 in qty 1, http://www.digikey.com/product-detai...2-1-ND/3768439.

  3. #3
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    I'd be interested in such a breakout board.
    Similar to this?
    http://www.mouser.com/ProductDetail/...E4718ZPEjWA%3d

    We tried the Roving Networks product... rather buggy so far.

  4. #4
    Senior Member
    Join Date
    Jun 2013
    Location
    Torrance CA
    Posts
    395
    Yep that's the one I'm using right now for developing the library. I think it's out of stock everywhere right now, but I think the CC3000BOOST is available -- same module and support chips, slightly different form factor.

    Click image for larger version. 

Name:	photo.JPG 
Views:	348 
Size:	360.1 KB 
ID:	689

  5. #5
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    I have two of TI's BoosterPack boards - these stack. Using them with the TI 802.15.4 radio Eval Module that plugs in.
    Testing '15.4 minus ZigBee, via UART and SPI - to the Teensy3 eventually. Starting now with UART to PC, developing in C++, then move to T3. Using TI's firmware on the radios that provides UART/SPI, so no altering of radio's firmware is needed.
    Last edited by stevech; 07-17-2013 at 04:31 PM.

  6. #6
    Senior Member
    Join Date
    Mar 2013
    Posts
    123
    adafruit's new CC3300 board has level shifters and the usual TLC (mounting holes, curved edges, good PCB layout).

    http://www.adafruit.com/products/1469

  7. #7
    Senior Member jimmayhugh's Avatar
    Join Date
    Nov 2012
    Posts
    168
    Quote Originally Posted by adrianfreed View Post
    adafruit's new CC3300 board has level shifters and the usual TLC (mounting holes, curved edges, good PCB layout).

    http://www.adafruit.com/products/1469
    The Adadfruit library and examples do not compile for the Teensy 3.0

  8. #8
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    Without the console output its a bit hard to troubleshoot ;-)

  9. #9
    Senior Member jimmayhugh's Avatar
    Join Date
    Nov 2012
    Posts
    168
    Quote Originally Posted by Headroom View Post
    Without the console output its a bit hard to troubleshoot ;-)
    Code:
    In file included from /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/sntp.h:275:0,
                     from ntpTest.ino:32:
    /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/socket.h:113:0: warning: "ENOBUFS" redefined [enabled by default]
    In file included from /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/errno.h:14:0,
                     from /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/cc3000_common.h:50,
                     from /home/jimm/sketchbook/libraries/Adafruit_CC3000/Adafruit_CC3000.h:25,
                     from ntpTest.ino:26:
    /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/sys/errno.h:153:0: note: this is the location of the previous definition
    In file included from /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/sntp.h:275:0,
                     from ntpTest.ino:32:
    /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/socket.h:172:0: warning: "FD_SET" redefined [enabled by default]
    In file included from /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/stdio.h:46:0,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Print.h:5,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Stream.h:24,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/HardwareSerial.h:54,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/WProgram.h:16,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Arduino.h:1,
                     from /home/jimm/sketchbook/libraries/Adafruit_CC3000/Adafruit_CC3000.h:21,
                     from ntpTest.ino:26:
    /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/sys/types.h:232:0: note: this is the location of the previous definition
    In file included from /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/sntp.h:275:0,
                     from ntpTest.ino:32:
    /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/socket.h:173:0: warning: "FD_CLR" redefined [enabled by default]
    In file included from /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/stdio.h:46:0,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Print.h:5,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Stream.h:24,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/HardwareSerial.h:54,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/WProgram.h:16,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Arduino.h:1,
                     from /home/jimm/sketchbook/libraries/Adafruit_CC3000/Adafruit_CC3000.h:21,
                     from ntpTest.ino:26:
    /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/sys/types.h:233:0: note: this is the location of the previous definition
    In file included from /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/sntp.h:275:0,
                     from ntpTest.ino:32:
    /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/socket.h:174:0: warning: "FD_ISSET" redefined [enabled by default]
    In file included from /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/stdio.h:46:0,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Print.h:5,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Stream.h:24,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/HardwareSerial.h:54,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/WProgram.h:16,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Arduino.h:1,
                     from /home/jimm/sketchbook/libraries/Adafruit_CC3000/Adafruit_CC3000.h:21,
                     from ntpTest.ino:26:
    /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/sys/types.h:234:0: note: this is the location of the previous definition
    In file included from /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/sntp.h:275:0,
                     from ntpTest.ino:32:
    /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/socket.h:175:0: warning: "FD_ZERO" redefined [enabled by default]
    In file included from /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/stdio.h:46:0,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Print.h:5,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Stream.h:24,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/HardwareSerial.h:54,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/WProgram.h:16,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Arduino.h:1,
                     from /home/jimm/sketchbook/libraries/Adafruit_CC3000/Adafruit_CC3000.h:21,
                     from ntpTest.ino:26:
    /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/sys/types.h:235:0: note: this is the location of the previous definition
    In file included from /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/sntp.h:275:0,
                     from ntpTest.ino:32:
    /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/socket.h:156:3: error: conflicting declaration 'typedef struct _types_fd_set _types_fd_set'
    In file included from /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/stdio.h:46:0,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Print.h:5,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Stream.h:24,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/HardwareSerial.h:54,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/WProgram.h:16,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Arduino.h:1,
                     from /home/jimm/sketchbook/libraries/Adafruit_CC3000/Adafruit_CC3000.h:21,
                     from ntpTest.ino:26:
    /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/sys/types.h:228:3: error: '_types_fd_set' has a previous declaration as 'typedef struct _types_fd_set _types_fd_set'
    In file included from ntpTest.ino:32:0:
    /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/sntp.h:357:1: warning: 'typedef' was ignored in this declaration [enabled by default]
    ntpTest.ino:56:83: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
    ntpTest.ino: In function 'void setup()':
    ntpTest.ino:150:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
    ntpTest.ino:154:57: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
    ntpTest.ino:154:57: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
    ntpTest.ino:172:16: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
    ntpTest.ino:172:85: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,171
    I'll take a look shortly.

    My initial impression is this library tries to implement the BSD standard sockets API. If it's only ever been tested on AVR, where avr-libc has no sockets stuff, it probably conflicts when used with newlib which has sockets stuff.

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,171
    Ok, here's my first attempt....

    https://github.com/PaulStoffregen/Ad...CC3000_Library

    This compiled, but there are still numerous warnings in verbose mode. I'll look into those soon. Will keep updating this repository as I find things.

    I don't have the hardware connected yet. Please let me know if this code works?

  12. #12
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,171
    I pushed a couple more commits, to fix more C library conflicts and add const to the pointers to constant strings.

    Please give this code a try and let me know if it works with Teensy3 and Adafruit's module?

    Also, if anyone has one of these modules connected to a normal Arduino Uno, please run this modified code. It will almost certainly work... but Adafruit will ask if anyone has verified this before they accept the changes to the official version of the library.

  13. #13
    Senior Member
    Join Date
    Jun 2013
    Location
    Torrance CA
    Posts
    395
    Quote Originally Posted by PaulStoffregen View Post
    Also, if anyone has one of these modules connected to a normal Arduino Uno, please run this modified code. It will almost certainly work... but Adafruit will ask if anyone has verified this before they accept the changes to the official version of the library.
    Just tested with a Uno, it compiled with no errors and the example 'buildtest' ran with no issues.

    I will test with a Teensy 3 later tonight.

  14. #14
    Senior Member jimmayhugh's Avatar
    Join Date
    Nov 2012
    Posts
    168
    Tested with a Teensy 3.0 and Adafruit's "buildtest" example. Seems to connect to my Netgear router, but fails when pining to outside world:

    Code:
    Networks found: 3
    ================================================
    SSID Name    : Ed
    RSSI         : 32
    Security Mode: 1
    
    SSID Name    : 
    RSSI         : 83
    Security Mode: 3
    
    SSID Name    : LinkME
    RSSI         : 40
    Security Mode: 1
    
    ================================================
    
    Deleting old connection profiles
    
    Attempting to connect to XXXXXXXXX
    Started AP/SSID scan
    
    
    
    
    Connecting to XXXXXXXXX...Waiting to connect...Connected!
    Request DHCP
    
    IP Addr: 10.0.0.5
    Netmask: 255.255.255.0
    Gateway: 10.0.0.1
    DHCPsrv: 10.0.0.1
    DNSserv: 10.0.0.1
    www.adafruit.com -> 207.58.139.247
    
    Pinging 207.58.139.247...0 replies
    
    
    Closing the connection

  15. #15
    Senior Member jimmayhugh's Avatar
    Join Date
    Nov 2012
    Posts
    168
    Next tried my Linksys router using the Adafruit "InternetTime" sketch and it worked...

    Code:
    Firmware V. : 1.19
    MAC Address : 0x08 0x00 0x28 0x01 0xA8 0x28
    
    Deleting old connection profiles
    
    Attempting to connect to Linksys
    Started AP/SSID scan
    
    
    
    
    Connecting to Linksys...Waiting to connect...Connected!
    Request DHCP
    
    IP Addr: 192.168.1.13
    Netmask: 255.255.255.0
    Gateway: 192.168.1.1
    DHCPsrv: 192.168.1.1
    DNSserv: 8.8.8.8
    Locating time server...
    Attempting connection...
    Connect to 198.199.87.75:123
    connected!
    Issuing request...
    Awaiting response...OK
    Current UNIX time: 1377874531 (seconds since 1/1/1970 UTC)
    Current UNIX time: 1377874546 (seconds since 1/1/1970 UTC)
    Current UNIX time: 1377874561 (seconds since 1/1/1970 UTC)
    Current UNIX time: 1377874576 (seconds since 1/1/1970 UTC)
    Adafruit "buildtest" also worked:
    Code:
    Firmware V. : 1.19
    MAC Address : 0x08 0x00 0x28 0x01 0xA8 0x28
    Started AP/SSID scan
    
    
    Networks found: 1
    ================================================
    SSID Name    : 
    RSSI         : 83
    Security Mode: 3
    
    ================================================
    
    Deleting old connection profiles
    
    Attempting to connect to Linksys
    Started AP/SSID scan
    
    
    
    
    Connecting to Linksys...Waiting to connect...Connected!
    Request DHCP
    
    IP Addr: 192.168.1.13
    Netmask: 255.255.255.0
    Gateway: 192.168.1.1
    DHCPsrv: 192.168.1.1
    DNSserv: 8.8.8.8
    www.adafruit.com -> 207.58.139.247
    
    Pinging 207.58.139.247...5 replies
    Ping successful!
    www.adafruit.com -> 207.58.139.247
    
    Pinging 207.58.139.247...5 replies
    Ping successful!
    www.adafruit.com -> 207.58.139.247
    
    Pinging 207.58.139.247...5 replies
    Ping successful!
    www.adafruit.com -> 207.58.139.247
    
    Pinging 207.58.139.247...5 replies
    Ping successful!
    Last edited by jimmayhugh; 08-30-2013 at 03:19 PM.

  16. #16
    Senior Member
    Join Date
    Jun 2013
    Location
    Torrance CA
    Posts
    395
    Quote Originally Posted by jimmayhugh View Post
    Tested with a Teensy 3.0 and Adafruit's "buildtest" example. Seems to connect to my Netgear router, but fails when pining to outside world:

    Code:
    ...
    IP Addr: 10.0.0.5
    ...
    This is a known issue with the board and the 10.x.x.x network. It's unclear if it's an Adafruit library bug or a TI firmware issue; they're looking into it:

    http://forums.adafruit.com/viewtopic...cc3000#p214530

  17. #17
    Senior Member jimmayhugh's Avatar
    Join Date
    Nov 2012
    Posts
    168
    Thanks for that info, using a local address works fine...

    Code:
    Firmware V. : 1.19
    MAC Address : 0x08 0x00 0x28 0x01 0xA8 0x28
    Started AP/SSID scan
    
    
    Networks found: 2
    ================================================
    SSID Name    : 
    RSSI         : 83
    Security Mode: 3
    
    SSID Name    : westell7517
    RSSI         : 36
    Security Mode: 2
    
    ================================================
    
    Deleting old connection profiles
    
    Attempting to connect to Netgear
    Started AP/SSID scan
    
    
    
    
    Connecting to Netgear...Waiting to connect...Connected!
    Request DHCP
    
    IP Addr: 10.0.0.5
    Netmask: 255.255.255.0
    Gateway: 10.0.0.1
    DHCPsrv: 10.0.0.1
    DNSserv: 10.0.0.1
    www.adafruit.com -> 207.58.139.247
    
    Pinging 207.58.139.247...0 replies
    
    
    eMachines.local -> 10.0.0.11
    
    Pinging 10.0.0.11...3 replies
    Ping successful!
    eMachines.local -> 10.0.0.11
    
    Pinging 10.0.0.11...5 replies
    Ping successful!
    eMachines.local -> 10.0.0.11
    
    Pinging 10.0.0.11...5 replies
    Ping successful!
    eMachines.local -> 10.0.0.11
    
    Pinging 10.0.0.11...5 replies
    Ping successful!

  18. #18
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    Sounds like the router firmware doesn't have the correct list of which address ranges/classes are public/private.
    That's pretty gross.

  19. #19
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,171
    It's 10.x.x.x supposed to be only for private networks that can't route to the internet?

    http://en.wikipedia.org/wiki/Private_network

    I know they've very commonly used with NAT routing. But if the access point tried to pass a 10.x.x.x without translating the address, it's not supposed to work, is it?

  20. #20
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    Right. 10.x.x.x is a non-routable address. If it's use as the destination of IP traffic, say ICMP/ping, it would not be NATed out to the WAN. It would be used with the switch's ARP tables to decide where in the LAN to send the packet.

    THere should be no difference between 10.x.x.x and 192.168.x.x so long as the subnet masks are correct.

  21. #21
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,171
    Good news: the Teensy3 changes have been merged into Adafruit's official version of the library.

  22. #22
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    Quote Originally Posted by stevech View Post
    I'd be interested in such a breakout board.
    Similar to this?
    http://www.mouser.com/ProductDetail/...E4718ZPEjWA%3d

    We tried the Roving Networks product... rather buggy so far.
    I have read of this buggy issue for months, on other forums.

  23. #23
    Senior Member
    Join Date
    Jun 2013
    Location
    Torrance CA
    Posts
    395
    Hello all,

    I've got an alpha version of my Arduino-fied CC3000 firmware upgrader. The repository is here:

    https://github.com/cmagagna/CC3000Patch

    The code currently works on a Uno, or any ATMega328 board with OptiBoot (it's too big for the other bootloaders). I'll be working on Teensy 3 support this weekend.

    This will upgrade a CC3000 to service pack 1.11.1 / firmware version 1.24 (T.I. has an interesting way of naming). They've fixed the weird 10.x.x.x bug as well as several other issues:

    http://processors.wiki.ti.com/index...._Release_Notes

  24. #24
    Senior Member jimmayhugh's Avatar
    Join Date
    Nov 2012
    Posts
    168
    If anybody is using the AdaFruit Library for the CC3000 and Teensy 3.0, be aware that the latest commits no longer work for the Teensy 3.0:

    Code:
    Arduino: 1.0.5 (Linux), Board: "Teensy 3.0"
    In file included from /home/jimm/sketchbook/libraries/Adafruit_CC3000/Adafruit_CC3000.h:25:0,
                     from InternetTime.ino:26:
    /home/jimm/sketchbook/libraries/Adafruit_CC3000/utility/cc3000_common.h:171:23: error: conflicting declaration 'typedef long unsigned int time_t'
    In file included from /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/stdio.h:46:0,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Print.h:35,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Stream.h:24,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/HardwareSerial.h:87,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/WProgram.h:16,
                     from /home/jimm/arduino/hardware/teensy/cores/teensy3/Arduino.h:1,
                     from /home/jimm/sketchbook/libraries/Adafruit_CC3000/Adafruit_CC3000.h:21,
                     from InternetTime.ino:26:
    /home/jimm/arduino/hardware/tools/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/sys/types.h:109:18: error: 'time_t' has a previous declaration as 'typedef long int time_t'
    Paul's version still works.

  25. #25
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,171
    Looks like I need to work on another pull request. Will probably work on it early next week. Remind me if I don't post a followup here by the middle of the week.

    I'll definitely need help with testing, since I don't have a CC3000 set up right now. Adafruit wants at least a check the patch works on Teensy and Arduino Uno before accepting the code.

    I have a couple ideas for reworking this so it'll survive future code updates from TI. I want to give that a try, rather than just redoing this the same way as last time.

    Edit: this is also being discussed on Adafruit's forum.
    Last edited by PaulStoffregen; 09-21-2013 at 12:40 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •