"Bodeting" - The Activity of going insane reverse engineering a PSA System
|
|
5 сар өмнө | |
|---|---|---|
| executables | 6 сар өмнө | |
| firmware | 6 сар өмнө | |
| research | 5 сар өмнө | |
| snmp-mibs | 6 сар өмнө | |
| 30_tagesschau-gong.mp3 | 5 сар өмнө | |
| MP3 | 5 сар өмнө | |
| README.md | 6 сар өмнө | |
| bodet_psa_cli.py | 5 сар өмнө |
If you want to help out with figuring things out this is where to look I'd say
Server: MQX HTTP - Freescale Embedded Web Server)RTCS FTP Server Readyd:\JenkinsJobs\workspace\Indus\Harmonys\Harmonys_trio\Metis_appli\Middlewares\Third_Party\LwIP\Based on repeated appearances in both firmware strings :
| Username | Password |
|---|---|
public |
jkl1vi5erjnfh |
public |
aSe2=9Z8gOi37* |
PS: Not tested extensively
Each IP Button Bodet Sound Protocol Payload follows a consistent format:
[MEL HEADER]-[LENGTH]-[START]-[SEQUENCE]-[COMMAND]-[ZONE INFO]-[METADATA]-[CHECKSUM]
Seems to send two of the packets each time a button is pressed
4D 45 4C0021 = 33 bytes0100FF, suggesting padding or reserved spaceExamples:
3001 = Melody5001 = Alarm5002 = StopEach zone bit is encoded as:
byte_index = (zone - 1) // 8
bit_index = (zone - 1) % 8
set bit (7 - bit_index) in byte[byte_index]
You can enable multiple zones in a single packet by OR-ing the relevant bits
Examples:
8000 0000 0000 0000 0000 0000 = Zone 8 only0000 8000 0000 0000 0000 0000 = Zone 16 only0000 0000 0000 0000 0020 0000 = Zone 86Note : this is just an assumption not enough testing has been done
After Zone Info:
0001 - Probably Fixed field (sometimes 0002 with certain multizone commands)03 - Volume (1-8)02 - Repeat count (or 00 for infinite)09 - Melody ID (9 in this case)0100 - end-of-command marker, appears to terminate command blocks (expept for stop commands)014a)4d454c 0021 0100 28ff 3001 8000 0000 0000 0000 0000 0000 0001 03 00 01 09 0100 01d5
8000 ...03, Repeats = 00 (infinite)0901D54d454c 001a 0100 24ff 5002 ffff ffff ffff ffff ffff ffff 0f 0107
FF FF ... (you actually cant choose which zone to turn of system refuses zonemaps here)5002)0F 01 instead of 0100 → supports theory that 0100 indicates only the end of melody/alarm command block0107The checksum algorithm used by Bodet PSA protocol has been successfully reverse engineered thanks to severe insanity (I didn't realize it as 2 bytes until I already wasted 5 days reverse engineering it). It works as follows btw:
def compute_psa_checksum(data: bytes) -> bytes:
var_e = 0x0000 # Starting seed value
for i in range(len(data)):
var_e ^= (data[i] + i) & 0xFFFF
return var_e.to_bytes(2, 'big') # 2-byte checksum, big-endian
PS: I extracted this info by decompiling the SIGMA Software Package by Bodet
Key characteristics:
This algorithm allows for generating valid packets for the Bodet PSA system. It was verified against known working packets and matches the behavior observed in the system.
To use this algorithm:
For a ready-to-use implementation, see the hex_checksum.py script in this repository.
##
The executables/hexen.py script is not recommended, I used it to make some sample data by listening if the Harmony Speaker would produce noises. It is filled with cursewords