Hi,
I'm new to the whole Teensy world but had a few other devices I tried before, but as the Teensy 3.6 provides everything I need I want to get it running.
Currently I'm in the same situation as some of you and want to get the Adafruit ATWINC1500 Breakout Board running.
Reading through the previous posts, I connected it and got it "up and running", but once I try to send data via UDP nothing reaches the server.
So I explain a little bit more in detail.
Why do I assume it's "up and running":
- I can read the firmware version (19.4.4)
- I can connect to my Wifi
- I get an IP address
- My router says it's connected
- WiFi LED is constantly green, Net LED is blinking when sending data (strangly the Teensy LED also blinks with the same frequency)
How is it connected:
Code:
#include <SPI.h>
#include <Adafruit_WINC1500.h>
#include <Adafruit_WINC1500Udp.h>
#define WINC_CS 10
#define WINC_IRQ 9
#define WINC_RST 8
#define WINC_MOSI0 11
#define WINC_MISO0 12
#define WINC_SCK0 13
#define WINC_EN 15
SPI.setSCK(WINC_SCK0);
SPI.setMOSI(WINC_MOSI0);
SPI.setMISO(WINC_MISO0);
SPI.setCS(WINC_CS);
pinMode(WINC_CS, OUTPUT);
digitalWrite(WINC_CS, HIGH);
SPI.begin();
#ifdef WINC_EN
pinMode(WINC_EN, OUTPUT);
digitalWrite(WINC_EN, HIGH);
#endif
How do I try to send data:
Code:
if (Udp.beginPacket(serverIp, port) == 1) {
Udp.write("Foo");
int result = Udp.endPacket();
if(result != -1) {
debugLog("Sent packet"); ///It's reaching this point, but no data are received on server side....
}else {
debugLog(String(result));
}
} else {
debugLog("BeginPacket failed");
}
Why is it not a server-side problem?
- Because I have a Feather M0 ATWINC1500 running the same code without any problems.
- Because I have an iPhone App sending the same data to the same server without any problems.
- Because Wireshark on the server does not log any data when trying to send from the Teensy (iPhone & Feather Wireshark logs data)
What else did I try?
- I tried replacing "SPI.begin()" with "SPI.beginTransaction(SPISettings(12000000, MSBFIRST, SPI_MODE0))" ==> Nothing works at all
- I tried using the Wifi101 samples without any luck
So...anyone any other ideas