I compiled and uploaded the Device OS to the device https://github.com/particle-iot/device-os/tree/release/stable using the command
make clean all PLATFORM=argon -s program-dfu
branch = release/stable
And now my user code is not working.
I get message
all works!!
after setCredentials!!
after connect!!
ip resolve!!
try connecting...
connected
hello.
but I don’t get html code like before
If I return an old firmware everything works fine.
#include "Particle.h"
TCPClient client;
byte mac[6];
SerialLogHandler logHandler;
void setup()
{
WiFi.on();
Serial.begin(9600);
waitFor(Serial.isConnected, 30000);
WiFi.macAddress(mac);
Serial.printlnf("mac: %02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
WiFi.setCredentials("****", "*********");
Serial.println("after setCredentials!!");
WiFi.connect();
Serial.println("after connect!!");
IPAddress ip;
ip = WiFi.resolve("www.google.com");
if(ip) {
Serial.println("ip resolve!!");
} else {
Serial.println("ip resolution failed!!");
}
Serial.println("try connecting...");
if (client.connect(ip, 80))
{
Serial.println("connected");
client.println("GET /search?q=unicorn HTTP/1.0");
client.println("Host: www.google.com");
client.println("Content-Length: 0");
client.println();
}
else
{
Serial.println("connection failed");
}
}
void loop()
{
if (client.available())
{
char c = client.read();
Serial.print(c);
}
}