danielkucera / esp-arduino-ebus

65 stars 11 forks source link

New 6.1 device bought from elecrow has protected wifi #56

Open Spancii opened 9 months ago

Spancii commented 9 months ago

Hi Daniel,

I bought an adapter from elecrow but this device has wifi password. I have been tried reset the device but unfortunately i can't. Do you have any idea what is the password or why i can't reset the device to default.

Many thanks!

danielkucera commented 9 months ago

Hi, can you please provide a screenshot of the problem?

Spancii commented 9 months ago

Hi image

danielkucera commented 9 months ago

Do you have QC sticker on your device? It looks like they forgot to load correct firmware. Do you think you can flash the firmware by yourself?

Spancii commented 9 months ago

379669406_175703752242460_1203277469209931175_n

yes i have.

I'll try tomorrow

Spancii commented 9 months ago

379669406_175703752242460_1203277469209931175_n

danielkucera commented 9 months ago

Ok, I'll update the flashing guide meanwhile.

ActiveByte commented 9 months ago

Same issue, PASS - QC6 sticker on the bottom

danielkucera commented 9 months ago

Can you please try to connect using password "lectronz" and then open the web interface on http://192.168.4.1/ ?

Spancii commented 9 months ago

Hi Daniel,

which port is the TP1? The flasher just connecting....

danielkucera commented 9 months ago

I am sorry, I didn't manage to update the guide. Download Flash download tools from here: https://www.espressif.com/en/support/download/other-tools Connect PROG and GND pin with a wire before powering the adapter. Connect the adapter to a PC using USB cable. Flash the firmware firmware-fullflash-HW_v5.x.bin to address 0x0

etmnidj1 commented 9 months ago

Same problem here, QC3 sticker on the back

danielkucera commented 9 months ago

Yes, it seems they have messed up it in the factory and loaded wrong firmware to all adapters sold after 2023/09 :(

etmnidj1 commented 9 months ago

I dont have any experience with flashing but will give it a go...

etmnidj1 commented 9 months ago

Im in the flashtool now everything is green, pressed start but nothing seems to happen?

Any tips?

Schermafbeelding 2023-10-06 094140

danielkucera commented 9 months ago

You need to select COM: And you need to pick a different file: firmware-fullflash-HW_v5.x.bin

etmnidj1 commented 9 months ago

Selected com 4; it says 2-sync fail

Spancii commented 9 months ago

i have a worse situation

image

danielkucera commented 9 months ago

you need to specify @ 0x0 , see the screenshot from @etmnidj1

danielkucera commented 9 months ago

Selected com 4; it says 2-sync fail

Are there any other ports to select? Can you try different ones?

etmnidj1 commented 9 months ago

Some questions:

Connect PROG and GND pin with a wire before powering the adapter. -> I see no pins; just holes. I connected these with a wire Connect the adapter to a PC using USB cable. -> done (do i leave the wires in PROG and GND or must these removed after powering up? Flash the firmware firmware-fullflash-HW_v5.x.bin to address 0x0 -> got error message 2-sync fail

[2023-10-06 10:04:07,278][ESP8266Loader_spi[1]][espDownloader.py][line:561][ERROR]: IOError: the serial port should probably be removed [2023-10-06 10:04:07,278][ESP8266Loader_spi[1]][espDownloader.py][line:745][ERROR]: ESP8266 Chip sync error esp_sync_blocking.

etmnidj1 commented 9 months ago

Selected com 4; it says 2-sync fail

Are there any other ports to select? Can you try different ones?

Tried port 5 but that gave a com fail

danielkucera commented 9 months ago

Yes, there are only holes, just use a piece of copper wire and keep it there during the whole flashing procedure. You can also try this tool: https://adafruit.github.io/Adafruit_WebSerial_ESPTool/ but it works in Chrome only (not Firefox).

etmnidj1 commented 9 months ago

Tried the other tool in chrome but there's nothing on the com ports; just bluetooth devices and spp1 on port 5

Spancii commented 9 months ago

@danielkucera thank you! I can burning with the web tool. My device is already work.

danielkucera commented 9 months ago

Tried the other tool in chrome but there's nothing on the com ports; just bluetooth devices and spp1 on port 5

Which operating system you have? Can you send a screenshot of the selection?

etmnidj1 commented 9 months ago

Seems like i managed to flash te correct firmware tried anotherusb cable and computer. Filled in the wifi credentials but cannot connect; als not to the modules wifi?? Will flash again

etmnidj1 commented 9 months ago

Do I have to reset after flashing or? If yes how is this done??

ActiveByte commented 9 months ago

I was able to login with the password lectronz wich i found in the config file, but http://192.168.4.1/ was not reachable.

I was able to flash the esp with the esptool and the fullflash image yesterday and got it working now.

etmnidj1 commented 9 months ago

I have access to the web interface; I select my wifi network; fill in password en press save.

What must I do after that? I cannot connect to 192.168.4.1 when I connect my computer to my own wifi network?

Rgrds Niels

danielkucera commented 9 months ago

@etmnidj1 please follow https://github.com/danielkucera/esp8266-arduino-ebus#quickstart

etmnidj1 commented 9 months ago

@danielkucera Thanks for your patience Daniel; I;ve got it working now!

Any tips how to integrate in Home Assistant; trying to do that but seems complicated

keithwithnall commented 6 months ago

@danielkucera I have the same issue with a newly purchased v6.1 board from Elecrow with Pass QC3 label, but with no initial wi-fi transmission at all. Have apparently successfully loaded firmware-fullflash-HW_v5.x.bin from the v6.2 Assets folder using the Adafruit web ESP Tool at offset 0x0 (no errors) and then reset the device. However still no wi-fi transmission from the device - tried for hidden networks too but no esp-eBus SSID at all. Any suggestions as to what else I can try? ESP_Prog If I connect via Putty I see what appears to be a boot loop on around a 2 minute cycle: image

danielkucera commented 6 months ago

Hi @keithwithnall , If you are getting restarts after about 2 minutes, you are probably getting caught here: https://github.com/danielkucera/esp8266-arduino-ebus/blob/master/src/main.cpp#L321 meaning this one: https://github.com/danielkucera/esp8266-arduino-ebus/blob/master/src/main.cpp#L316 has to equal to connected.

Can you verify the adapter is really not available in your network?

keithwithnall commented 6 months ago

Hi @danielkucera Thanks for your quick response. I can confirm that the device is not, and has never, connected to the network. I know this as it has never transmitted an open network to allow me to enter the network credentials, and the network is Ubiquiti Unifi based and shows me every device that has been connected. I have also used a wi-fi analyser to check for any hidden transmissions from the device. Is it possible to get any debugging information from the device that would help you? If so please advise how I can do this. Thanks Keith

danielkucera commented 6 months ago

This does not make any sense. Can you please contact me directly so we can arrange sending the device to me for investigation?

keithwithnall commented 6 months ago

Message sent via your blog contact form - thanks

keithwithnall commented 6 months ago

Hi Daniel, It appears that I definitely had a module with a hardware issue. Elecrow have sent a replacement and it connects to the network exactly as expected. I just need to sort out the HA end of things now. Thanks again for all of your help which was much appreciated.

zipkid commented 5 months ago

Hi,

I just received an adapter from Elecrow. Solid led D1 & D7 and no wifi AP.

image image

It seems like they are still sending out the badly provisioned units. 😢

I will try to flash the firmware to it one of the following days.

Kind regards,

Stefan.

danielkucera commented 5 months ago

Hi @zipkid , did you try to connect it to the ebus? When disconnected, D1 is expected to be on constantly.

keithwithnall commented 5 months ago

Also note that it will transmit wi-fi if connected to a simple power adaptor with a USB-C cable, but if connected to a computer with USB-C it may not enter wi-fi AP mode even if it is a good unit.

zipkid commented 5 months ago

Hello,

I cannot connect it to ebus as that only gets installed on Feb 1st :-) I have tried with a simple power adapter to usb-c and that also gives no AP.

I see the boot cycle in minicom as shown by @keithwithnall

The flashing instructions say "using a wire connect pins PROG and TP3" I see the PROG pin (hole) but i don't find one labeled TP3... ? Where do i need to connect PROG to?

zipkid commented 5 months ago

I have connected my usbserial adapter, connected PROG to GND, tried, switched TX & RX. Same result always

╭─zipkid@android18 ~/tmp
╰─➤  esptool.py --port /dev/cu.wchusbserial143240 write_flash 0x0 ~/Downloads/firmware-fullflash-HW_v5.x-be7bb3.bin                                                                                        1 ↵
esptool.py v3.2
Serial port /dev/cu.wchusbserial143240
Connecting......................................

A fatal error occurred: Failed to connect to Espressif device: No serial data received.
For troubleshooting steps visit: https://github.com/espressif/esptool#troubleshooting

╭─zipkid@android18 ~/tmp
╰─➤  esptool.py --port /dev/cu.wchusbserial143240 write_flash 0x0 ~/Downloads/firmware-fullflash-HW_v5.x-be7bb3.bin                                                                                        2 ↵
esptool.py v3.2
Serial port /dev/cu.wchusbserial143240
Connecting......................................

A fatal error occurred: Failed to connect to Espressif device: Invalid head of packet (0xFF): Possible serial noise or corruption.
For troubleshooting steps visit: https://github.com/espressif/esptool#troubleshooting

IMG_4146

zipkid commented 5 months ago

After a few more attempts, now with PROG and GND connected and a USB-C cable to my laptop, the flashing suddenly works. But after disconnecting from the laptop, and connecting to a charger, still no AP.

╰─➤  esptool.py --port /dev/cu.usbmodem14101 --baud 115200 --after no_reset write_flash --flash_size detect --flash_mode dio 0x00000 /Users/zipkid/Downloads/firmware-fullflash-HW_v5.x-be7bb3.bin

esptool.py v4.7.0
Serial port /dev/cu.usbmodem14101
Connecting...
Detecting chip type... ESP32-C3
Chip is ESP32-C3 (QFN32) (revision v0.4)
Features: WiFi, BLE, Embedded Flash 4MB (XMC)
Crystal is 40MHz
MAC: 54:32:04:b7:73:44
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00000000 to 0x000f6fff...
Compressed 1011504 bytes to 564584...
Wrote 1011504 bytes (564584 compressed) at 0x00000000 in 7.3 seconds (effective 1101.8 kbit/s)...
Hash of data verified.

Leaving...
Staying in bootloader.

And again, the boot loop

Screenshot 2024-01-19 at 17 51 07
danielkucera commented 5 months ago

Ok @zipkid , please contact me via info in profile. We will arange a solution for you.

zipkid commented 5 months ago

A problem never comes alone....

Screenshot 2024-01-19 at 18 24 26
keithwithnall commented 5 months ago

I contacted Daniel OK using the contact form on his blog site https://blog.danman.eu/contact/ Keith

zipkid commented 5 months ago

I tried the same message again and this time it went through....

AndrevdG commented 5 months ago

It appears I have been hit with the same issue as two of the other posters (unsure you wanted me to create a new issue). My adapter arrived this week and has a 'PASS QC6' label. However, the wifi access point never becomes available.

If I try to flash it using the flash_download_tool_3.9.5.exe I get the 2-sync issue:

image

I tried this with two different cables and on two different computers. However, the web tool has no problem flashing it: image

Regardless, no new ssid ever appears. If I connect to the adapter using putty, I get the same two minute bootloop as well: image

danielkucera commented 5 months ago

I was hoping to find some bug in the device from @zipkid but it only needed an erase and firmware flash and it started working. I'll prepare a new firmware where we will see some debug messages on the USB serial. @AndrevdG , give me a few days please. Meanwhile, can you please try SPI MODE: DIO?

AndrevdG commented 5 months ago

@danielkucera, I have tried with DIO but it does not make difference, same error.

Just for fun, with the web tool, I erased the adapter before reflashing it. That makes no difference in behavior. The putty serial console displays the same behavior. I also tried resetting (did that before as well), this also does not make a difference. To confirm I am doing this correctly: For a v6.1 board, the reset is a short between ground and to-ebus (all leds are on while doing this): image

Other than that, no worries, I will wait for your response. It would be great if we could figure out why it is not working for me.