mmakaay / esphome-xiaomi_bslamp2

ESPHome integration for the Xiaomi Mijia Bedside Lamp v2.
Other
204 stars 49 forks source link

[HELP] Nothing on serial console, whether I boot in flash mode or not #97

Closed coaxial closed 1 year ago

coaxial commented 1 year ago

I have a CP2102 USB-TTL, and I hooked it up to the lamp as shows in the instructions. At first I tried holding the wires but I wasn't getting anything on serial so I soldered GND, TX, RX. And before plugging the lamp, I manually short GPIO0 with GND using a breadboard wire with two male ends. I think this part works because when I short GPIO0 to GND, the front panel buttons don't do anything anymore until I unplug replug the lamp.

My problem is that I can't even get anything on the serial console. I tried with the esphome-flasher tool, with screen, with putty. I am in the right group to open the serial device. Tried at 115200 bauds and 9600. Tried swapping TX and RX on the USB-TTL's end. No dice.

I also get nothing on the console when not shorting GPIO0, but it's my understanding the ESP32 is chatty regardless so I should be seeing things too when the lamp is operating normally, right?

I can see the RX LED blinking on my USB-TTL with the lamp in normal mode when I press buttons or the slider, or when the lamp turns on. But nothing shows in my terminal/putty/esphome-flasher. I also can't dump the actual firmware, unsurprisingly.

What am I missing? Could it be Xiaomi disabled serial in their infinite wisdom in an update? My lamp says firmware 2.0.30.

mmakaay commented 1 year ago

They cannot disable the serial output that the ESP32 dumps out when booting up. There will always be at least some output at that point, before the firmware takes over logging. So if you see no output at all, my guess is that the problem lies further down the chain.

The device behaviour changing when you ground GPIO0 sounds good. Since you have tried multiple serial clients, the serial connection seems the culprit here.

Did you try the CP2102 USB-TTL with another device to see if you can see serial output from it?

mmakaay commented 1 year ago

No further updates received, closing the issue. Feel free to reopen when more support is needed.