That looks better but you are missing the first 2 digits from the front of the token.
Does the sketch have the correct token or is it just SM / Blynk that is losing the first 2 digits?
That looks better but you are missing the first 2 digits from the front of the token.
Does the sketch have the correct token or is it just SM / Blynk that is losing the first 2 digits?
OK I will see if I can spot anything in the WiFiLink.h library.
You are sooooooooooooo close.
Can’t see anything and thinking about it your WiFi looks fine. Will see if there is anything in BlynkSimpleStream.h that is causing the anomaly.
@vshymanskyy ignore my last PM, @Emmanuel_Leroy has hacked the libraries and it’s now connecting.
@Emmanuel_Leroy please post the library hack and a final sketch here and perhaps edit the first sketch in this thread to include the final sketch.
Be sure to remove any tokens etc but it would be nice to see your final Serial Monitor (less tokens).
Did you have to flash firmware 1.0.0 before you started working with Blynk? I downloaded the firmware last night but if it’s required please post a link.
Finally It’s a great news !
I just adapt the BlynkSimpleWifi.h sketch in a BlynkSimpleWifiLink.h and put in the src folder of Blynk library
the Code
/**
* @file BlynkSimpleWifiLynk.h
* @
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Jan 2017
* @brief
*
*/
#ifndef BlynkSimpleWifiLink_h
#define BlynkSimpleWifiLink_h
#ifndef BLYNK_INFO_CONNECTION
#define BLYNK_INFO_CONNECTION "HDG204"
#endif
// Fix for WiFi shield (it has a crazy ping duration)
// #define BLYNK_TIMEOUT_MS 6000UL
#define BLYNK_SEND_ATOMIC
#define BLYNK_SEND_CHUNK 64
#include <WiFiLink.h>
#include <Adapters/BlynkWiFiCommon.h>
static WiFiClient _blynkWifiClient;
static BlynkArduinoClient _blynkTransport(_blynkWifiClient);
BlynkWifiCommon Blynk(_blynkTransport);
#include <BlynkWidgets.h>
#endif
And to use the example of Blynk using a LED widget on your phone!
/*************************************************************
Download latest Blynk library here:
https://github.com/blynkkk/blynk-library/releases/latest
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: http://www.blynk.cc
Sketch generator: http://examples.blynk.cc
Blynk community: http://community.blynk.cc
Follow us: http://www.fb.com/blynkapp
http://twitter.com/blynk_app
Blynk library is licensed under MIT license
This example code is in public domain.
*************************************************************
Blynk using a LED widget on your phone!
App project setup:
LED widget on V1
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#define BLYNK_DEBUG
#include <SPI.h>
#include <WiFiLink.h>
#include <BlynkSimpleWifiLink.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "You Token";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Your SSID"; // your network SSID (name)
char pass[] = "Your Pass"; // your network password
int status = WL_IDLE_STATUS; // the Wifi rad
WidgetLED led1(V3);
BlynkTimer timer;
bool ledStatus = false;
#define BLYNK_GREEN "#23C48E"
#define BLYNK_BLUE "#04C0F8"
#define BLYNK_YELLOW "#ED9D00"
#define BLYNK_RED "#D3435C"
#define BLYNK_DARK_BLUE "#5F7CD8"
// V1 LED Widget is blinking
void blinkLedWidget()
{
if (ledStatus) {
led1.setColor(BLYNK_RED);
Serial.println("LED on V1: red");
ledStatus = false;
} else {
led1.setColor(BLYNK_GREEN);
Serial.println("LED on V1: green");
ledStatus = true;
}
}
void setup()
{
// Debug console
Serial.begin(9600);
//Blynk.begin(auth, ssid, pass);
// You can also specify server:
Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
// Turn LED on, so colors are visible
led1.on();
// Setup periodic color change
timer.setInterval(1000L, blinkLedWidget);
}
void loop()
{
Blynk.run();
timer.run();
}
Enjoy your Blynk App with an Arduino.org UNO WiFi in Firmware 1.0.0
Hi dear,
i have tried to follow your procedure,
but what is the correct espRecovery sketch?
is this:
/*
* EspRecovery.ino
*
* This example works as a serial bridge between microntroller and wifi module
* (esp8266). It's very useful when upload firmware updates to the wifi module.
* It must be used only on boards where the connection between micontroller and
* wifi module is over serial, not spi.
*
* Note: this is a port of EspRecovery of the Arduino Uno WiFi Dev Ed Library.
*
* Circuit:
* - Arduino STAR OTTO or Uno WiFi Developer Edition
*
* Modified 15 March 2017 by Andrea Cannistrá and Sergio Tomasello
*
*/
/*
Define Baud Rate between esp8266 and the microntroller
*/
#if defined(ARDUINO_STM32_STAR_OTTO) // Arduino STAR OTTO
#define BR 230400
#define Serial SerialUSB
#elif defined(ARDUINO_AVR_UNO_WIFI_DEV_ED) // Arduino UNO WiFi Developer Edition
#define BR 9600
#endif
#include <WiFiLink.h>
void setup()
{
#if defined(ARDUINO_STM32_STAR_OTTO)
pinMode(WIFI_PWR, OUTPUT);
digitalWrite(WIFI_PWR, LOW); //turn OFF ESP
delay(100);
digitalWrite(WIFI_PWR, HIGH); //turn ON ESP
#endif
Serial.begin(BR);
SerialWiFi.begin(BR);
}
void loop()
{
while (Serial.available()) {
char inChar = Serial.read();
SerialWiFi.write(inChar);
}
while (SerialWiFi.available()) {
char inChar = SerialWiFi.read();
Serial.write(inChar);
}
}
How can install your firmware 1.0.0? by the normal procedure i have not your version choice, and i can not upload it.
kind regards
Niki
hey, sorry for the delay, i’m in vacation.
Be sure you’re doing all command line with Administrator rigth.
Step 1 install Python
Step 2 install the Wifilink Library in arduino
Step 3 only this way
Burn the firmware using EspRecovery
This procedure is reccomended for all Operating System and it is usable only via Serial.
- First you must upload the EspRecovery sketch on your Arduino UNO WiFi:
- Plug in the Arduino UNO WiFi to PC.
- Open the Arduino.org IDE, you can download it here.
- Select the correspondent port and board.
- Upload the ESPRecovery sketch from File>Examples>Arduino UNO WiFI> Tools menu of Arduino IDE:
- Enter the board in bootloader mode:
- Unplug the Arduino UNO WiFi.
- Plug again the board to PC pressing the ESP B/L button.
- Open your terminal as Administrator.
- Download the ESPtool, you can download from here or you can use the command:
sudo pip install esptool
or
pip install esptoolin windows
- Test the esptool, for example, inserting the below command to read the MAC address:
- python esptool.py -p your port -b baudrate read_mac
- Set the baudrate at 9600.
For linux user, for example, the port will be /dev/ttyACM0:
sudo python esptool.py -p /dev/ttyACM0 -b 9600 read_mac_
> For Mac user, for example, the port will be /dev/tty.usbmodem1411:
sudo python esptool.py -p /dev/tty.usbmodem1411 -b 9600 read_mac
For Windows user:
esptool.py -p COM30 -b 9600 read_mac
- If it will appear on terminal your MAC, then continue the procedure:
Connecting…
MAC: 18:fe:34:10:e2:85
sudo python esptool.py -p /dev/ttyACM0 -b 9600 write_flash -ff 80m -fm qio -fs 32m 0x00000 20151223/boot_v1.4.bin_rep 0x1000 20151223/user1.bin 0x3FC000 20151223/esp_init_data_default.bin_rep 0x3FE000 20151223/blank.bin
For Windows user:
for example in case that the tools is in \Users\XXXX\Desktop\esptool\esptool\ folder and the COM is 30:
esptool.py -p COM30 -b 9600 write_flash -ff 80m -fm qio -fs 32m 0x00000 Windows example:
C:\Users\XXXX\Documents\Arduino\tools\ArduinoFirmwareWiFiLink\UnoWiFi\tool\bin\esptool-windows -p COM4: -b 9600 write_flash -ff 80m -fm qio -fs 32m 0x000000 C:\Users\XXXX\Documents\Arduino\tools\ArduinoFirmwareWiFiLink\ArduinoFirmwareWiFiLink-UNO_WIFI_DEV_ED-1.0.0.bin 0x300000 C:\Users\XXXX\Documents\Arduino\tools\ArduinoFirmwareWiFiLink\ArduinoFirmwareWiFiLink-WEB_PANEL-1.0.0.bin
8) Wait some minutes that the process ends.
Thank you for your explanation. I have no experience with MacOSX but its the only computer I have for now, so I have this problem:
I installed Python, I open terminal, I download EspTool over PIP but when I try to run its, it doesn’t find it. I get this error:
Gonzalos-MacBook-Pro:~ espagnol01$ sudo python esptool.py -p /dev/cu.usbmodem1441 -b 9600 read_mac
python: can't open file 'esptool.py': [Errno 2] No such file or directory
But if I do sudo esptool.py -h I get this:
Gonzalos-MacBook-Pro:~ espagnol01$ sudo esptool.py -h
usage: esptool [-h] [--chip {auto,esp8266,esp32}] [--port PORT] [--baud BAUD]
[--before {default_reset,no_reset}]
[--after {hard_reset,soft_reset,no_reset}] [--no-stub]
{load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,version}
...
esptool.py v2.0.1 - ESP8266 ROM Bootloader Utility
positional arguments:
{load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,version}
Run esptool {command} -h for additional help
load_ram Download an image to RAM and execute
dump_mem Dump arbitrary memory to disk
read_mem Read arbitrary memory location
write_mem Read-modify-write to arbitrary memory location
write_flash Write a binary blob to flash
run Run application code in flash
image_info Dump headers from an application image
make_image Create an application image from binary files
elf2image Create an application image from ELF file
read_mac Read MAC address from OTP ROM
chip_id Read Chip ID from OTP ROM
flash_id Read SPI flash manufacturer and device ID
read_flash_status Read SPI flash status register
write_flash_status Write SPI flash status register
read_flash Read SPI flash content
verify_flash Verify a binary blob against flash
erase_flash Perform Chip Erase on SPI flash
erase_region Erase a region of the flash
version Print esptool version
optional arguments:
-h, --help show this help message and exit
--chip {auto,esp8266,esp32}, -c {auto,esp8266,esp32}
Target chip type
--port PORT, -p PORT Serial port device
--baud BAUD, -b BAUD Serial port baud rate used when flashing/reading
--before {default_reset,no_reset}
What to do before connecting to the chip
--after {hard_reset,soft_reset,no_reset}, -a {hard_reset,soft_reset,no_reset}
What to do after esptool.py is finished
--no-stub Disable launching the flasher stub, only talk to ROM
bootloader. Some features will not be available.
So I know its a silly/noob problem like im in the wrong directory or something but I would really appreciate your help. Thank you very much for your time.
I fix it. I had to use for example:
sudo esptool.py -p /dev/cu.usbmodem1441 -b 9600 read_mac
instead of:
sudo python esptool.py -p /dev/cu.usbmodem1441 -b 9600 read_mac
I don´t know if its a version syntax related issue or what. Im a noob but it worked. Thanks!
I manage to to all this and to update the firmware to the latest one (20161121). But now im having problems to set up the Blynk app. With hardware should I use? Thanks.
@espagnol01 I don’t have this hardware but as it’s an Uno (with an ESP shield) then you should select Uno in Blynk.
I have one quick question. When I run this command; “sudo esptool.py -p /dev/tty.usbmodem1441 -b 9600 read_mac”
I got this output:
esptool.py v2.0.1
Connecting.......
Detecting chip type... ESP8266
Chip is ESP8266
Uploading stub...
Running stub...
Stub running...
MAC: 5c:cf:7f:82:39:aa
Hard resetting...
Is this correct? Im I doing something wrong? If it hard reset itself, it means I have to disconnect and connect again in b/l pressing the button to run the next command? Thanks for your time.
This is the output after all:
sudo esptool.py -p /dev/tty.usbmodem1461 -b 9600 write_flash -ff 80m -fm qio -fs 32m 0x00000 20151223/boot_v1.4.bin_rep 0x1000 20151223/user1.bin 0x3FC000 20161121/esp_init_data_default.bin_rep 0x3FE000 20161121/blank.bin
WARNING: Flash size arguments in megabits like '32m' are deprecated.
Please use the equivalent size '4MB'.
Megabit arguments may be removed in a future release.
esptool.py v2.0.1
Connecting.......
Detecting chip type... ESP8266
Chip is ESP8266
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Compressed 2752 bytes to 2006...
Wrote 2752 bytes (2006 compressed) at 0x00000000 in 2.2 seconds (effective 10.2 kbit/s)...
Hash of data verified.
Compressed 305060 bytes to 231736...
Wrote 305060 bytes (231736 compressed) at 0x00001000 in 244.1 seconds (effective 10.0 kbit/s)...
Hash of data verified.
Compressed 128 bytes to 71...
Wrote 128 bytes (71 compressed) at 0x003fc000 in 0.1 seconds (effective 8.1 kbit/s)...
Hash of data verified.
Compressed 4096 bytes to 26...
Wrote 4096 bytes (26 compressed) at 0x003fe000 in 0.1 seconds (effective 428.9 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting...
This it look ok? Thank you for your time.’
Edit: After the flashing I can’t upload any sketch to the board. I only get:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
Any solution?
Looks ok, you asked to see the MAC and it gave you the MAC.
What does b/l mean?