Adafruit WINC1500 WiFi module with a Teensy 3.1?

Status
Not open for further replies.

karl101

Member
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
 
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:
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.
 
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.
 
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.
 
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:
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-Ser...677877&hash=item25bcdf7b2c:g:Rw0AAOSwEH9ZZX6k
but from a US supplier.
 
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
 
Status
Not open for further replies.
Back
Top