-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serial protocol between EFM8 & ESP #3605
Comments
Did you check the latest development version? Pls provide status 0 output as requested when the issues was raised. I know I made some changes regarding this 0x55 so I need to know what version you experience this problem with. |
No, I didn't test your firmware. I just got issues reported by sniffing unknown RF data when the data is including 0x55. In your function:
This will break the receive. You have to check for each command the expected len to be received. If the len got received the next (last) byte have to be the sync end 0x55. Like AAA60602390801015555 will result to: AAA606023908010155 |
So in short:
Is this correct? |
Data from EFM8 -> ESP: Alternative commands: The len is every time data[len position + 1] ... data[n-1] |
Ok. So only A6 and AB contain a len byte I have to check and once received the next byte would be 0x55? |
Fix Sonoff Bridge data reception when using Portisch EFM8 firmware and in data buffer length (#3605)
Fix Sonoff Bridge data reception when using Portisch EFM8 firmware and in data buffer length (arendst#3605)
Describe the bug
The firmware just look for the data 0x55 (sync end) on receiving RF data from the EFM8 chip.
The len have to be also checked when receiving data from the EFM8. Otherwise it is possible to loose data:
#3419 (comment)
or:
Portisch/RF-Bridge-EFM8BB1#26 (comment)
Also, make sure these boxes are checked [x] before submitting your issue - Thank you!
To Reproduce
Just receive RF data from the EFM8 with 0x55 in the data. The data will be truncated.
Expected behavior
The len of the expected data to be received should be checked.
The text was updated successfully, but these errors were encountered: