arduino uno wifi

Hello there,

Here I am again, almost two years later ....

I think there is a problem with arduino uno WiFi as a TcpClient. You find attached my code.

Hardware

Arduino Uno WiFi (Firmware Version 1.1.0) & LCD Shield for Arduino 16x2

The problem is that after about 600 times the "WriteTOport" procedure is called both the client (arduino uno WiFi) and the server -whatever it is- freeze.

I tried with several servers,

  1. Ubuntu C program as TCPserver.
  2. RLY-8-DFrobot // for which the attached code is specifically written
  3. Arduino Uno with Ethernet Shield

the problem remains the same with any server I use, after about 600 times the "WriteTOport" procedure is called both the client (arduino uno WiFi) and the server freeze.

Sometimes, after freezing on the serial monitor "No socket available" message appears every 30s as the loop.....

Any hints?

(deleted)

Hi. you still have the firmware compiled with esp8266 arduino core 2.4.1?
it has a memory leak. the leak was fixed in 2.4.2, but a new problem was introduced.
but the new problem is easy to fix.
I didn't try the latest esp8266 arduino boards package with WiFiLink

Hi Juraj

Thank you.

Is there a "how to" url

Ι probably did ιτ with 2.4.1.

I recommend the esp8266 boards package 2.4.2
with this fix WiFiClient.connected() should return true if data are available · esp8266/Arduino@e219cb0 · GitHub

so, do you remember how to flash the firmware?
https://forum.arduino.cc/index.php?topic=539319.msg3679109#msg3679109

warning: don't update the ArduinoJson library, use the version you have installed. if you update it, then return to latest 5.x

Hi Juraj,

It's me again.
I'm afraid I forgot the upgrade process and the link to the older communication we had is pretty confusing.
I would greatly appreciate if you briefly sent me the steps to follow.
I use WIN10 with a brand new installation of IDE 1.8.12
Also what .zip files do I need to download?

Thanks in advance

did you install esp8266 arduino 2.4.2?
and apply the fix

?
then

How can I install esp8266 arduino 2.4.2 ?

johnbotsis:
How can I install esp8266 arduino 2.4.2 ?

I am trying to upload SPIFFS but failed!

Arduino: 1.8.12 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, ck, 26 MHz, 40MHz, QIO, 4M (1M SPIFFS), 2, v2 Higher Bandwidth, Disabled, None, Only Sketch, 115200"

SPIFFS Error: esptool not found!

SPIFFS Error: esptool not found!
[SPIFFS] data : C:\Users\Ioannis\Documents\Arduino\ArduinoFirmwareEsp\data
[SPIFFS] size : 1004
[SPIFFS] page : 256
[SPIFFS] block : 8192
/img/favicon.ico

/img/icons.png

/img/logo.ico

/img/logo.png

/img/logoOtto.ico

/img/logoOtto.png

/img/logoPrimo.ico

/img/logoPrimo.png

/img/logoUnoWiFi.ico

/img/logoUnoWiFi.png

/index.html

/pure.css

/style.css

/ui.js

/wifi.html

/wifi.js

[SPIFFS] upload : C:\Users\Ioannis\AppData\Local\Temp\arduino_build_786586/ArduinoFirmwareEsp.spiffs.bin
[SPIFFS] address: 0x300000
[SPIFFS] reset : ck
[SPIFFS] port : COM7
[SPIFFS] speed : 115200

Uploading 1028096 bytes from C:\Users\Ioannis\AppData\Local\Temp\arduino_build_786586/ArduinoFirmwareEsp.spiffs.bin to flash at 0x00300000

warning: espcomm_send_command: didn't receive command response

warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed

error: espcomm_upload_mem failed

SPIFFS Upload failed!

I tried your old suggestion

".......Try againg: upload EspProxy with #define FLASHING into Atmega; erase flash with esptool; upload firmware; upload SPIFFS (try second time if first time fails). After then replace EspProxy in Atmega, because it will always put the esp back into bootloader mode....."

and SPIFFS was uploaded.

but I have no SSID

Any hint

.....esp8266 arduino must be 2.4.2 because 2.6.3 is also available?

I didn't test with newer versions oa esp8266 core. ale after 2.4.1 have this problem: WiFiLink broken since esp8266 Arduino release 2.4.2 · Issue #10 · JAndrassy/arduino-firmware-wifilink · GitHub

Well to summarize,

WIN10, IDE 1.8.12, esp8266 core 2.4.2, ArduinoJson library 5.13.5

set AVR Uno WiFi
upload EspProxy // with #define FLASHING uncomment
set AVR Generic esp8266 Module
upload firmware
upload spiffs
set AVR Uno WiFi

So far all good. But I can not see SSID....in the Network list

Any Hint?

maybe it connected to AP in STA mode with settings remembered on the flash.

I chose

Erase flash --> "All flash contents"

before firmware uploading....

scsh.pdf (304 KB)

you could try the ConnectWithWPA example of the WiFiLink library to setup a connection

Nothing happened, every call to WiFi library "freeze"

I have two questions

Board --> Arduino Uno Wifi

Upload
Setup your esp board/shield/module for flashing. Connect it to USB of the computer and if it doesn't support DTR, put it into programming mode with dedicated button.

How to put into programming mode?

The tool builds the SPIFFS binary and uploads it to selected port. With serial port you must put your board/shield/module into flashing mode in it doesn't support reset on DTR. Then choose "ESP8266 Sketch Data upload" from Tools menu.

How to put into flashing mode?

I'm not sure if I did these steps well. Could you please explain to me?

How to put into programming mode?
the EspProxy does it on Uno WiFi
flashing, programming or bootloader mode are different names for the same thing

so the firmware doesn't run.
did you use this settings for upload of firmware sketch and spiffs

I tried one more time , but without result.

You find attached screenshot with board settings and a text file with the firmware upload log....

scsh.pdf (92.5 KB)

upload log.txt (4.66 KB)

you selected a wrong esp8266 'board'

I write in Programming ESP8266 · JAndrassy/UnoWiFiDevEdSerial1 Wiki · GitHub

Board selection and options

In tools menu select board options. For Uno WiFi choose Arduino from the ESP8266 section of the Boards menu and next choose Model UNO WiFi.

esp8266 on Uno WiFi has a 40 MHz crystal