OpenBekenIOT / hid_download_py

BK7231T/BK7231N python-based flasher (both read and write), used mostly to flash https://github.com/openshwprojects/OpenBK7231T_App
61 stars 17 forks source link

Cannot get bus #5

Open brandondb1 opened 2 years ago

brandondb1 commented 2 years ago

Hello,

I have a light switch with a BK7231N chip. When I run the Python programming tool, I get an error Cannot Get Bus.

The chip is directly soldered onto the board, and the board itself has a 6-slot programming header with 2 pins labelled R, and one labelled T...both of the R pins connect to the chip, and I can't find a chip-level pinout for the 7231N, so either could be Receive.

I've tried switching leads from one R to the other, but get the same error either way.

My question is what the Cannot Get Bus error means - is it an issue with my R and T pins, a hardware issue with my USB adapter, or...? I have programmed literally hundreds of ESPs, so I am very familiar with the concept. I'm just trying to understand the error so I can focus my efforts on the actual problem. Running in a Python VENV, COM port for the USB-UART is correct, and switch has power (LED's light and I am using 3.3v)

Also if anyone has or knows where a chip-level pinout diagram can be found I would be very appreciative.

Also, is there a flash mode you have to put the chip into?

Thanks in advance.

brandondb1 commented 2 years ago

OK. I figured it out:

I found a pin map for the chip, and identified which R on the header was Receive. The other R was Reset.

Executed the uartprogram python command, when it says 'Getting Bus' I shorted the Reset to ground and it programmed immediately.

For some reason the detail of shorting the Reset gets lost in Google translation from the elektroda posts...

Thanks for your work on this!