arduino-libraries / WiFiLink-Firmware

Arduino WiFi Link firmware for ESP8266 based boards
MIT License
11 stars 30 forks source link

How to install this on my UNO wifi DEV? #23

Open delchrys opened 7 years ago

delchrys commented 7 years ago

How can i install this firmware on my UNO wifi dev edition?

JAndrassy commented 7 years ago

Windows example: C:\Users\Duro\Documents\Arduino\tools\ArduinoFirmwareWiFiLink>..\UnoWiFi\tool\bin\esptool-windows -p COM4: -b 9600 write_flash -ff 80m -fm qio -fs 32m 0x000000 ArduinoFirmwareWiFiLink-UNO_WIFI_DEV_ED-1.0.0.bin 0x300000 ArduinoFirmwareWiFiLink-WEB_PANEL-1.0.0.bin

Don't forget to prepare the board with EspRecovery sketch and bootloader mode. http://www.arduino.org/learning/tutorials/advanced-guides/how-to-change-the-firmware-on-an-arduino-uno-wifi#linux

delchrys commented 7 years ago

Thanks I only saw some examples with 3 or 4 different files. Not one with a complete bin file

delchrys commented 7 years ago

what are the differences comparing arduino.org firmware/esp link or wifi link???

JAndrassy commented 7 years ago

I think Wifi-link should replace arduino-org/esp-link and targets more boards. I like Wifi-link because it can connect with any protocol on any port, not just REST on port 80 or MQTT. Wifi-link firmware has microcontroller OTA not implemented yet.

delchrys commented 7 years ago

I had esp-link from jeelabs on my uno. Like the layout and the debugging consoles of it. The rest on the port 80 is just a simple edit of the ciao connector file. You can put everything you want in that port.

jgmdavies commented 7 years ago

@jandrassy Many thanks for your info above. It worked for me in Win10 if I removed the colon after the COM port, and the required COM port wasn't the usual Arduino one, identified as 'Arduino Uno Wifi' in Windows Device Manager, but in my case the one called 'Intel(R) Active Management Technology - SOL'. I now have WiFiLink working on my UNO WiFi with UDP - example below. Jim

`/ Name: WiFiLink1.ino Created: 6/6/2017 12:51:58 PM Author: Jim /

// Modified from: https://www.arduino.cc/en/Tutorial/WiFiSendReceiveUDPString

include

include

int status = WL_IDLE_STATUS; char ssid[] = "YOUR-WIFI-SSID"; char pass[] = "YOUR-WIFI-PASSWORD"; int _UdpPort = 5000; // for example

char packetBuffer[255]; //buffer to hold incoming packet char ReplyBuffer[] = "acknowledged"; // a string to send back

WiFiUDP _Udp;

void setup() { Serial.begin(115200);

// Wait for serial port to connect. Needed for native USB port only.
while (!Serial)
{
    ;
}

Serial.println("setup");

// Hangs here:
if (WiFi.status() == WL_NO_WIFI_MODULE_COMM)
{
    Serial.println("Communication with WiFi module not established.");

    // Don't continue.
    while (true)
        delay(100);
}

Serial.println("Communication with WiFi module established.");
Serial.println("WiFi firmware: " + String(WiFi.firmwareVersion()));

//Serial.println("Scanning...");
//int n = WiFi.scanNetworks();

// Attempt to connect to Wifi network:
while (status != WL_CONNECTED)
{
    Serial.println("Attempting to connect to SSID: " + String(ssid));

    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
    status = WiFi.begin(ssid, pass);

    // wait 10 seconds for connection:
    delay(10000);
}

Serial.println("Connected to WiFi");

_Udp.begin(_UdpPort);

}

// the loop function runs over and over again until power down or reset void loop() { // if there's data available, read a packet int packetSize = _Udp.parsePacket();

if (packetSize) { Serial.print("Received packet of size "); Serial.println(packetSize); Serial.print("From "); IPAddress remoteIp = _Udp.remoteIP(); Serial.print(remoteIp); Serial.print(", port "); Serial.println(_Udp.remotePort());

// read the packet into packetBufffer
int len = _Udp.read(packetBuffer, 255);

if (len > 0)
  packetBuffer[len] = 0;

Serial.println("Contents:");
Serial.println(packetBuffer);

// send a reply, to the IP address and port that sent us the packet we received
_Udp.beginPacket(_Udp.remoteIP(), _Udp.remotePort());
_Udp.write(ReplyBuffer);
_Udp.endPacket();

} } `

julandan commented 7 years ago

Hello i have a doubt. Do i have to create a folder Documents\Arduino\tools\ArduinoFirmwareWiFiLink> in which to include the next files?

ArduinoFirmwareWiFiLink-UNO_WIFI_DEV_ED-1.0.0.bin 1000 KB ArduinoFirmwareWiFiLink-WEB_PANEL-1.0.0.bin Source code (zip)

julandan commented 7 years ago

First of all I want to apologize because I do not know very much about these subjet and I can be asking Trivial things. My problem is the next. I followed the instructions of the link http://www.arduino.org/forums/programming-questions/how-to-build-wifilink-source-1909?start=20 And I generated a file called “ArduinoFirmwareEsp.ino.arduino_uart.bi n ” running the command ”export compiled binary” from Arduino IDE Then, the forum redirect to this page, but I do not understand what I have to do. I suppose that the command: C:\Users\Duro\Documents\Arduino\tools\ArduinoFirmwareWiFiLink>..\UnoWiFi\tool\bin\esptool-windows -p COM4: -b 9600 write_flash -ff 80m -fm qio -fs 32m 0x000000 ArduinoFirmwareWiFiLink-UNO_WIFI_DEV_ED-1.0.0.bin 0x300000 ArduinoFirmwareWiFiLink-WEB_PANEL-1.0.0.bin is a cmd command. Then why have I created the file .bin if it does not used? Have I to create a folder ArduinoFirmwareWiFiLink which all the files from the release? thanks

JAndrassy commented 7 years ago

hi. use your binary instead of ArduinoFirmwareWiFiLink-UNO_WIFI_DEV_ED-1.0.0.bin and if you flashed the release binaries and now you want change the firmware with your build, you can leave out the big SPIFFS binary (0x300000 ArduinoFirmwareWiFiLink-WEB_PANEL-1.0.0.bin) from parameters. and google what is what. I write only hints what to do

JAndrassy commented 7 years ago

Uno WiFi Dev Ed & WiFi Link documentation

geoffreycristallo commented 7 years ago

Hello Jandrassy, I am not sure to fully understand : in your page you list several Firmware options, including ESP Link and Wifi Link. But the page only describes how to install the Wifi Link firmware, not how to install the ESP link firmware. Does it mean that one should NOT install the ESP link firmware ? Thanks

JAndrassy commented 7 years ago

Hi. esp-link has it's own documentation. WiFi Link has no other documentation. I use WiFi Link and the doc is in my WiFi Link fork.

geoffreycristallo commented 7 years ago

Hello, Based on your experience, which one would you recommend ? What are the benefits of Wifi Link Vs. ESP Link ? I'm trying to connect to a server with MQTT, but the current firmware version on my Arduino only accepts MQTT usernames of max 31 characters, while the server gave me a 36 characters username : I have been advised to upgrade the firmware, but I'm unclear on which firmware to use. Thanks a lot !

JAndrassy commented 7 years ago

it is not so hard to try both. try esp-link, it has similar MQTT support as the factory firmware. WiFi Link is general networking and I think it can be used with some library for MQTT