arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.28k stars 4.82k forks source link

Porticsh RF-Bridge-EFM8BB1 upload Error #3061

Closed angustyler closed 6 years ago

angustyler commented 6 years ago

Flashing the RF Bridge with Tasmota 6.0.0a worked perfectly and is now accessible from the web page just fine. However, I'm now trying to install the Porticsh RF-Bridge-EFM8BB1 updated firmware by following the instructions: https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-RF-Bridge-433 . But am getting error: "Upload Failed. Magic byte is not 0xE9" I've using the RF_Bridge.hex found at: https://github.com/Portisch/RF-Bridge-EFM8BB1/blob/master/Keil%208051%20v9.53%20-%20Release/RF_Bridge.hex (Note: I guess this is the correct location as the folder "tools/fw_efm8bb1" does not appear to exist - unless of course I am looking in the wrong place!) Any help greatly appreciated!

Jason2866 commented 6 years ago

Try to use the version @arendst includes in folder: https://github.com/arendst/Sonoff-Tasmota/tree/development/tools/fw_efm8bb1 Do you have compiled the V.6.0.0a with switch (in user_config.h) enabled?

define USE_RF_FLASH // Add support for flashing the EFM8BB1 chip on the Sonoff RF Bridge. C2CK must be connected to GPIO4, C2D to GPIO5 on the PCB

Jason2866 commented 6 years ago

Maybe download (via browser) has corrupted your file... Download the whole Tasmota ZIP via "Green Button" -> Clone or Download

angustyler commented 6 years ago

Thank you for your (very quick) response - I think I've moved 2 steps forward and one step back... I downloaded (zip from Gitbub) and compiled the 6.0.0a source, then installed that using Arduino. Then, I uploaded the RF_Bridge_00.hex contained in that zip. This returned the an error stating "Not enough space" (or similar). Since then, when trying to upload, I get "Failed to init RF chip". From the console, when I call RfRaw with a 0 or 1, I get the expected response. None of the other parameters/payload values seem to get a meaningful result, for example: 16:11:43 CMD: rfraw 255 16:11:43 MQT: stat/sonoffbridge/RESULT = {"RfRaw":"ON"} I set

define USE_RF_FLASH 1

before compiling - in case that should be relevant... Am now stuck for ideas and hoping you may have some suggestions!

Jason2866 commented 6 years ago

Which version of RF Bridge do you have? R1 or R2 (R1 is in a snap case, R2 has screws to open) Erase complete Flash before flashing your compiled Tasmota version! Do your settings...
For R1 power it over USB and connect C2CK to GPIO4, C2D to GPIO5 on the PCB Go to Webconsole and upload EFM Firmware. Wait! The Rf Bridge will beep when done. Success

For R2 power with 3.3V over pinheader (urgent!!!) NOT over USB. Flash will FAIL in this case!! You can use for powering your Bridge the USB to serial adapter. Just connect GND and 3.3V. Connect yes it is swapped!! C2CK to GPIO5, C2D to GPIO4 on the PCB Go to Webconsole and upload EFM Firmware. Wait! The Rf Bridge will beep when done. Success Remove the connections in the bridge

See #2886

angustyler commented 6 years ago

Success! :-) Thank you for the help. It is an R1 unit. I think the difference may have been making the two GPIO connections and then powering via USB as you suggested. I had been powering it using the 3.3v and ground pins. Maybe that was not delivering enough current to drive the flashing process properly.

Jason2866 commented 6 years ago

Your welcome! Please close this issue.

haegar33 commented 6 years ago

Hello! Maybe for a short clarification I don't need to open a new issue? I got Tasmota V6.2 and cannot flash the EFM Chip (Error "cannot init RF Chip") I am using a 3.3V power supply directly. However do I still need to connect the pins C2CK to GPIO5 and C2D to GPIO4? So far I only used the "over the air" update function (works great with Tasmota itself). Should it work for the EFM update too?

Jason2866 commented 6 years ago

Yes you need to connect C2CK to GPIO5 and C2D to GPIO4 to update the EFM chip. If you want you can leave it connected but in this case you have to cut Traces for the R2 version.

ghost commented 6 years ago

Hello, i think i followed the instructions correctly. Erased the flash with esptool.py, connected C2CK to GPIO5 and C2D to GPIO4, cut the traces, powered with the USB to serial adapter, flashed tasmota 6.3, when i want to flash the EFM8BB1 with the file from tools/fw_efm8bb1 i am getting the 'Magic byte is not 0xE9' error.

image tasmota arduino

Thank you for your time.

Jason2866 commented 6 years ago

Firmware Upload is via web frontend

ghost commented 6 years ago

Yes, i am trying to flash the EFM8BB1 firmware at the Firmware Upgrade page Upgrade by file upload section where i get the Magic byte is not 0xE9 error message

Jason2866 commented 6 years ago

And what happens?

ghost commented 6 years ago

I am getting Upload Failed Magic byte is not 0xE9 error message when i try to upgrade the EFM8BB1 firmware.

Jason2866 commented 6 years ago

Open efm hex firmware file. Or better upload it here. Maybe corrupt

ghost commented 6 years ago

RF-Bridge-EFM8BB1-20181102.zip

i copied from /tools/fw_efm8bb1 directory

Jason2866 commented 6 years ago

File is okay. Which bridge do you have with round corners or the one with screws to open

ghost commented 6 years ago

with the screws R2 v1.0 2017.11.23

Jason2866 commented 6 years ago

Do you have selected as Device Rf Bridge?

Jason2866 commented 6 years ago

Which firmware you are using?

ghost commented 6 years ago

On the first page says Sonoff RF Module. I selected on the Configure Module page the 02 Sonoff RF option.
All GPIO's are 00 None. I am using Sonoff-Tasmota 6.3.0

Jason2866 commented 6 years ago

It has to look like this image

Jason2866 commented 6 years ago

You have to select image

ghost commented 6 years ago

Thank you very much for your time, i managed to upgrade the efm8bb1 firmware.

liv-in-sky commented 5 years ago

Hi I'm sorry to open this again - I have the same problem like "cslehel". Same version (6.3) and setting - also same devive R2 v1. I have cut the 2 lines. I got the "Magic byte is not 0xE9" error. I'm not sure how to connect the 2 soldered cables. If I do it like C2CK to GPIO5 and C2D to GPIO4 - the cables should be crossed ?! The picture above is showing no crossed cables - BUT in any case - I got this error wether crossed or not crossed or with 5V usb or 3.3V . does somebody have an idea?

Jason2866 commented 5 years ago

@liv-in-sky You have to select RF Bridge as Modul. Error Magic byte is not 0xE9 is a typical indicator that you havent done that

liv-in-sky commented 5 years ago

I have done all the settings what described above image 1

liv-in-sky commented 5 years ago

I have had the 5.12 version on the bridge - I flashed 6.3 over it - could this be a problem ?

Jason2866 commented 5 years ago

Yes, flash this http://thehackbox.org/tasmota/sonoff.bin And do command: Reset 5 Everything well be reseted and erased. Just Wifi credentials keep intact After that try again

liv-in-sky commented 5 years ago

to be honest - I can only flash with atom - could you please tell me which package I have to download for atom - I don't know how to flash only this sonoff.bin file with atom :-(

liv-in-sky commented 5 years ago

Thanx for your tipp - the Reset seems to be the solutuion

flashed successfully

AndrzejKass commented 5 years ago

I've problem after using ESpurna firmware. After selected right firmware for EFM8BB and I got the "Magic byte is not 0xE9" error. Many trial fails. The solutions is do clear flash configuration (? previosuly firmaware version).

  1. Flash this http://thehackbox.org/tasmota/sonoff.bin
  2. Do command from web connsole : reset 5 Wifi settings where not affected. After that everything is ok.
Jason2866 commented 5 years ago

You have to select Rf Bridge as device!

vigne commented 5 years ago

Hi All,

same here. I tried all your suggestions, but unfortunately nothing worked. I did

(1) erase the flash using esptool, (2) flashed the file you linked to above (version 6.4.1.8(a124529-sonoff)), (3) did a reset 5 in the console (web) (4) selected "Sonos Bridge (25)" and saved (5) tried uploading the File "RF-Bridge-EFM8BB1-20181127.hex" and "RF-Bridge-EFM8BB1.hex" using the upload mask i the web front end.

Unfortunately, neither of the two files worked for me and both aborted with a "Magic byte is not 0xE9" error.

I connected GPIO4 <-> C2D and GPIO5 <-> C2CK, which on my board R2 V1.0 2017.11.23, means the wires are crossed, right? I tried with the switch in "on" position and in "off" position but neither seems to work. The power supply is exclusively via the 3.3V connector - I tried all 3 ones, and none worked for me. Always the same error.

Any help would be very much appreciated!

Jason2866 commented 5 years ago

Have you connected the wire exactly as in the picture? https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-RF-Bridge-433#rf-chip-firmware-upgrade Dont trust the labeling on PCB it is wrong! C2D and C2CK are swapped!!

vigne commented 5 years ago

Thanks for coming back to me.

I just tried it exactly as shown in the picture (using 5V USB), but no success. But looking on my PCB from the back made me wonder if I might have not "scratched" the PCB deep enough to actually cut the wires. Could you maybe recommend how to do this the safest way so not to damage the rest of the PCB?

And as for the wiring: I also tried powering it with 3.3v from the connector on top (used to flash tasmota), both in the middle (below the switch) and bottom one (next to the speaker). No success really. Also, does the switch have any impact on this? I tried it with both on-off but it failed either way.

Jason2866 commented 5 years ago

Seems everything correct. If you power 3.3v via pinheader cutting traces is not neccessary You have in main screen the 16 buttons displayed? Could you post Status 0

vigne commented 5 years ago

Yes. It also receives and learns RF signals, but I'm not sure if it sends them. Using ESPurna I managed to ring e.g. the doorbell, but with tasmota I didn't had any success so far. Not exactly sure why

On Fri, 11 Jan 2019 at 21:20, Jason2866 notifications@github.com wrote:

Seems everything correct. If you power 3.3v via pinheader cutting traces is not neccessary You have in main screen the 16 buttons displayed?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/arendst/Sonoff-Tasmota/issues/3061#issuecomment-453645374, or mute the thread https://github.com/notifications/unsubscribe-auth/ADmZvKkNAEkUK2i-3TdYdgNF-8dpC83Qks5vCPIIgaJpZM4U16cy .

h-tro commented 5 years ago

Hi,

last week I bought a Sonoff RF Bridge (version 433RFBRIDGE R2 V1.0 2017.11.23). Today I flashed TASMOTA version 6.4 (sonoff DE.bin) successfully.

(1) erase the flash using esptool, (2) flashed the file sonoff DE.bin version 6.4 (3) selected "Sonos Bridge (25)" and saved (4) tried uploading the file "RF-Bridge-EFM8BB1-20181127.hex" using the upload mask i the web frontend.

I connected GPIO4 <-> C2CK and GPIO5 <-> C2D On board R2 V1.0 2017.11.23 the wires are crossed. The power supply is exclusively via the 3.3V connector.

The same error occurs as described by Vigne: "Magic byte is not 0xE9"

A new bug?

Jason2866 commented 5 years ago

If you have bridge version 2 you have to be carefull Dont power over usb. Wont work Labeling C2CK and C2D is swapped

h-tro commented 5 years ago

Your answer is a repetition. I don't use power over usb. and the labeling C2CK and C2D is checked several times. The wires are correct. It seems to be a bug

Jason2866 commented 5 years ago

No, many positive feedbacks. Have you selected Rf Bridge as module?

h-tro commented 5 years ago

Vigne has already described the same problem.

Yes, Rf Bridge module is selected. That was already written in my first comment.

h-tro commented 5 years ago

Web-Log 22:39:13 HTP: Hauptmenü 22:39:19 WIF: Prüfe Verbindung... 22:39:19 WIF: verbunden 22:39:20 HTP: Firmware Update 22:39:39 WIF: Prüfe Verbindung... 22:39:39 WIF: verbunden 22:39:45 CFG: in Flash gespeichert am FB, zählen 20, Bytes 3584 22:39:45 UPL: Datei RF-Bridge-EFM8BB1-20181127.hex ... 22:39:46 HTP: Upload abgeschlossen 22:39:46 Upload: magic byte ist nicht 0xE9 22:40:00 WIF: Prüfe Verbindung... 22:40:00 WIF: verbunden 22:40:20 WIF: Prüfe Verbindung... 22:40:20 WIF: verbunden

Jason2866 commented 5 years ago

Can you upload your efm hex file?

h-tro commented 5 years ago

No, see Sreenshot! rf

Jason2866 commented 5 years ago

Sorry i was unclear in what i mean. Could you upload the hex file here in github?

h-tro commented 5 years ago

Here the hex file. RF-Bridge-EFM8BB1-20181127.zip

Jason2866 commented 5 years ago

Took a look in your hex file. It is garbage! So error E9 is 100% correct Download the whole content via provided download button (green) from github

h-tro commented 5 years ago

Thanks, now the upload works. I downloaded the file directly from the website, see screenshot. DL.zip You should add the hint "Download the whole content via the download button (green) from github" in the wiki.

Jason2866 commented 5 years ago

Great. Glad it works now You are welcome to change the wiki 😀