Skip to content

Commit

Permalink
FrSky Archer Bind
Browse files Browse the repository at this point in the history
  • Loading branch information
pascallanger committed Aug 25, 2023
1 parent fabb65a commit a41123d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Multiprotocol/FrSkyX_cc2500.ino
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ static void __attribute__((unused)) FrSkyX_build_bind_packet()
//packet 1D 03 01 0E 1C 02 00 00 32 0B 00 00 A8 26 28 01 A1 00 00 00 3E F6 87 C7 00 00 00 00 C9 C9
//Unknown bytes
if(state & 0x01)
memcpy(&packet[7],"\x00\x18\x0A\x00\x00\xE0\x02\x0B\x01\xD3\x08\x00\x00\x4C\xFE\x87\xC7",17);
memcpy(&packet[7],"\x00\xCC\x00\x00\x00\x70\x14\x15\x00\xD3\x08\x00\x00\xCE\xE2\x85\xC7\x00\x00\x00\x00",21);
else
memcpy(&packet[7],"\x27\xAD\x02\x00\x00\x64\xC8\x46\x00\x64\x00\x00\x00\xFB\xF6\x87\xC7",17);
memcpy(&packet[7],"\x27\xFB\x00\x00\x00\xBC\xEF\x19\x00\x26\x07\x00\x00\xB7\xED\x85\xC7\xA7\xA7\xA7\xA7",21);
//ID
packet[5] = rx_tx_addr[1]; // ID
packet[6] = RX_num;
Expand All @@ -63,8 +63,9 @@ static void __attribute__((unused)) FrSkyX_build_bind_packet()
if(binding_idx&0x02)
packet[7] |= 0x80; // CH9-16
//Replace the ID
packet[20] ^= 0x0E ^ rx_tx_addr[3]; // Update the ID
packet[21] ^= 0x1C ^ rx_tx_addr[2]; // Update the ID
packet[20] ^= rx_tx_addr[3]; // Update the ID
packet[21] ^= rx_tx_addr[2]; // Update the ID
packet[22] ^= rx_tx_addr[1] & 0x3F; // Update the ID
//Xor
for(uint8_t i=3; i<packet_length-1; i++)
packet[i] ^= 0xA7;
Expand Down
2 changes: 1 addition & 1 deletion Multiprotocol/Multiprotocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_REVISION 3
#define VERSION_PATCH_LEVEL 28
#define VERSION_PATCH_LEVEL 29

#define MODE_SERIAL 0

Expand Down

0 comments on commit a41123d

Please sign in to comment.