Arduino Primo: problem with ESP8266

Hello all. I have a problem with the Arduino Primo. After a failed upload of the sketch by OTA I have this situation: - the sketch programming and go (via USB) - The WLAN LED lights up slightly in green (see in picture) - the Primo is not detected on the WiFi network.

I tried everything to upload a new WiFiLink to ESP8266, still the same. What to do?

what I know, Primo can't upload a sketch over WiFi.

the esp flashing with WiFi Link is successful?

you can't see it as AP?

Hi,
I add the library ESP8266 2.4.0-rc1,
WiFiLink compiles without problems, but when uploading I have:

esptool v0.4.9 - (c) 2014 Ch. Klippel ck@atelier-klippel.de
setting board to ck
setting baudrate from 115200 to 115200
setting port from COM1 to COM11
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
espcomm_upload_mem
setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1

flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

how and why did you try to upload a sketch over WiFi?

did you flash the esp on Primo before?

I have an Uno WiFi with WiFi Link. for the Uno WiFi there is a procedure to put the esp into flashing mode.

I can't find a firmware update procedure description for the Primo on archived arduino.org pages.

I was upload a sketch to the network port of the Arduino IDE. I did not flash ESP. On the board is the ESP_BOOT button, but it's rather to upload a bootloader (?)

Biela:
I was upload a sketch to the network port of the Arduino IDE.

was it an avr nrf sketch or esp sketch and the selected board was avr nrf or esp?

I don't remeber... :(

is it possible that you ota uploaded a simple sketch into esp? if yes then your only option is to flash the firmware over serial

OK, I have a AVR programmer, this is ok?

Where do you have an avr programmer?

hmmm, in my hand? :)

Can I use another Arduino as a programmer? For example, UNO or 101?

not for esp. put the esp in flash mode with the ESP BOOT button. push the button while connecting the usb cable (powering up the board). and the upload WiFiLink

EDIT: you may need first to upload to the microcontroller (nRF52) the EspRecovery sketch from WiFi Link examples/tools

Juraj, thanks for your reply.

I try compile (for Arduino Primo board) EspRecovery from WiFiLink and i have error:

‘SerialWiFi’ was not declared in this scope

Now I see that the EspRecovery sketch is only for Uno Wifi and Star Otto.

I downloaded the firmware that was originally in Primo:

https://github.com/arduino-org/arduino-firmware-wifilink/tree/master/ArduinoFirmwareEsp

But, how to compile and upload to Primo?...

EDIT: Compiles this (from ESP8266 boards) as Arduino -> Primo, how to upload?, esptool gives the same errors...

esp must be flashed over serial line. on Primo it is connected to some pins on the nRF25. I think, you need a sketch like the EspRecovery, but which copies data from Serial to SoftwareSerial on those pins.

schema

Thanks Juraj!

My tests with esptool:

$ esptool.py -p /dev/cu.usbmodem1422 -b 9600 write_flash -ff 80m -fs 4MB 0x000000 ArduinoFirmwareEsp.ino.arduino_spi.bin 0x300000 ArduinoFirmwareWiFiLink-WEB_PANEL-1.0.0.bin
esptool.py v2.2-dev
Connecting…

A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header

I looking for like EspRecovery for a Primo board… :slight_smile:

EDIT:

I write simple code:

#include <SoftwareSerial.h>

SoftwareSerial espOnPrimo(XXX, YYY); // RX, TX


void setup()
{
  Serial.begin(9600);
  espOnPrimo.begin(9600);
}

void loop() 
{
  while (Serial.available()) {
    char inChar = (char)Serial.read();
    espOnPrimo.write(inChar);
  }

  while (espOnPrimo.available()) {
    char inChar = (char)espOnPrimo.read();
    Serial.write(inChar);
  }
    
}

XXX is RX pin to ESP
YYY is TX pin to ESP

those pins are marked TX2 and RX2. it's hardware serial on the nRF (1 or 2)

Hi, the diagram shows that it is pins 7 and 8. I upload my sketch, but esptool still show this same error:

trying to connect espcomm_send_command: sending command header espcomm_send_command: sending command payload warning: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed error: espcomm_upload_mem failed