Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 10 of 10

Thread: Adafruit WINC1500 WiFi module with a Teensy 3.1?

  1. #1
    Junior Member
    Join Date
    May 2016
    Posts
    5

    Adafruit WINC1500 WiFi module with a Teensy 3.1?

    Hello

    I am trying to use an Adafruit WINC1500 WiFi module http://adafru.it/2999 with a Teensy 3.1 but I get these error when I try to compile the examples from the library: https://github.com/adafruit/Adafruit_WINC1500

    CheckWiFi101firmwareVersion:
    Code:
    /Users/km/Documents/Arduino/libraries/Adafruit_WINC1500/src/Adafruit_WINC1500.cpp: In member function 'int Adafruit_WINC1500::hostByName(const char*, IPAddress&)':
    /Users/km/Documents/Arduino/libraries/Adafruit_WINC1500/src/Adafruit_WINC1500.cpp:656:14: error: 'class IPAddress' has no member named 'fromString'
    if (aResult.fromString(aHostname)) {
    ^
    /Users/km/Documents/Arduino/libraries/Adafruit_WINC1500/src/Adafruit_WINC1500.cpp:691:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    exit status 1
    Error compiling.
    and again when I try to compile ScanNetworks:
    Code:
    Users/km/Documents/Arduino/libraries/Adafruit_WINC1500/src/Adafruit_WINC1500.cpp: In member function 'int Adafruit_WINC1500::hostByName(const char*, IPAddress&)':
    /Users/km/Documents/Arduino/libraries/Adafruit_WINC1500/src/Adafruit_WINC1500.cpp:656:14: error: 'class IPAddress' has no member named 'fromString'
    if (aResult.fromString(aHostname)) {
    ^
    /Users/km/Documents/Arduino/libraries/Adafruit_WINC1500/src/Adafruit_WINC1500.cpp:691:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    exit status 1
    Error compiling.
    Nothing is uploaded to the Teensy. The only change I have made in the source code is to the pin assignments at the top of the code. They compile OK when I use a Uno.

    I'm using Arduinio 1.6.7 and Teensy Loader v1.27 on a Mac

    Thanks
    Karl

  2. #2
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,886
    The errormessage says it. "fromString" is missing in the class "IPAddress"
    You could try to add it.

    Edit: Did you try to update Teensyduino ? I see a "fromString" there.
    Last edited by Frank B; 05-01-2016 at 04:33 PM.

  3. #3
    Junior Member
    Join Date
    May 2016
    Posts
    5
    Updating Teensyduino works. Thanks for that

    Karl.

  4. #4
    Junior Member
    Join Date
    Mar 2017
    Posts
    1
    Hi
    Did you ever get this work. I have a Teensy 3.6 and the same library but able to compile all the examples. Can't seem to do any I/O to the winc1500. Seems to hang up in the lower lever init() routine.

  5. #5
    I have a Teensy 3.2 and the winc1500 module. I'm also hung up in the lower level init() routine.
    Testing indicates the SPI transfer is returning a zero-byte, when the init routine is expecting something else.

    I've connected the winc1500 module to a Nano using the same pins and it works there.
    I'm using teensyduino 1.3.9 and have tried building for 72 MHz, 96 MHz, and 48 MHz, under both "fast" and "faster" compiler options.

  6. #6
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,496
    I have a winc1500 SPI module and it works fine on my T3.2. It's wired as described here
    https://learn.adafruit.com/adafruit-...iring-and-test
    pins: 3v3,grnd,clk,miso,mosi,cs(8) EN-3v3 IRQ-7 RST-4


    maybe post a photo of your boards and wiring

    https://learn.adafruit.com/adafruit-...odule-breakout

  7. #7
    I'm using SCK - 13, MISO - 12, MOSI - 11, CS - 10, EN - Vin, IRQ - 7, RST - 4.
    I've tried Vin at both 3.3v and 5v.
    These pins work on a nano, using the exact same cable (~10" of ribbon cable) and WINC1500 module.
    I'm using the WIFI101 library.
    I've tried changing the SPI speed in bus_wrapper/source/nm_bus_wrapper_samd21.cpp from 12000000 to both 8000000 and 6000000 without luck.
    To get some diagnostics I modified common/include/nm_debug.h, setting CONF_WINC_DEBUG to 1 and defining CONF_WINC_PRINTF so I can get debug output.
    The debug output indicated all reads of the WINC1500 module are returning bytes with the value 0.

  8. #8
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,496
    SPI will return 0 even with no wires connected, so something could be mis-wired. I'm using the same WiFi101 lib, but default CS pin is 10 for examples. Try using pin 8 for CS and running some of the examples, e.g. ScanNetworks. Make sure you have the latest version of WiFi101. I'd recommend 3v3 for power and EN. T3.5 is 5v tolerant, but 3v3 works for me.

    EDIT: just to be sure specify your pins with
    WiFi.setPins(10,7,4); // defaults are 10,7,5 cs,irq,rst
    before WiFi.status()
    Last edited by manitou; 09-25-2017 at 02:27 PM.

  9. #9
    I've always used WiFI.setPins with the appropriate pin definition. Same .ino file with the same pinout works on a Nano, but not on a Teensy 3.1. I've moved the CS connection to pin 7 and changed the WiFi.setPins() call to match. Still doesn't work.
    I tried compiling as "debug" instead of "fast", also changed the SPI setting to 4 MHz, as separate tests. Still no go.

    I might have a dodgy teensy, where MISO is dead, unless you have other ideas.
    At this point I'm giving up on the WINC1500 module and going back to the ESP8266. I have some modules on order like
    http://www.ebay.com/itm/ESP8266-Seri...0AAOSwEH9ZZX6k
    but from a US supplier.

  10. #10
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,496
    I might have a dodgy teensy, where MISO is dead
    you can run a simple SPI loopback test, jumper MISO to MOSI
    x=SPI.transfer(y) and see if x==y
    could observe MOSI with logic analyzer

Posting Permissions

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