Commit Graph
28 Commits
Author SHA1 Message Date
Raphael Coeffic d3293afdab HoTT, XN297 emu: compute the hop and CRC xorout tables (-1.2 KB) (#1199)
* HoTT: compute the hop table from the hop value (-1 KB)

The 16 hop tables are generated from the 16 bit value sent in packet[0..1]:
the C library rand() LCG (low 16 bits: x = x * 0x4E6D + 0x3039) seeded with
it drives forward Fisher-Yates shuffles, first of the order of the 5 bands of
15 channels, then of the channels of each band, hop i being in the band at
position i%5. This gives back the 16 tables bit for bit, and for any seed a
75 channel permutation with the same band structure.

* XN297 emu: compute the CRC xorout instead of the 4 tables

The XN297 CRC is CRC-16/CCITT with init 0xFFFF and xorout 0xFFFF over the
unscrambled address, pcf and payload, sent scrambled. The emulation computes
it from 0xB5D2 over the bits as sent, so the xorout for a CRC over n bits is
CRC(init 0xFFFF^0xB5D2) of n scramble (or zero) bits, xor 0xFFFF, xor the 16
scramble bits at the CRC. The scramble bits come from the LFSR behind
xn297_scramble[] (1110001, then s[i] = s[i-7] ^ s[i-3]), which also covers
the last enhanced entries, past the end of that table. It is the generator
Goebish gave for the scramble sequence in a comment on
https://mcumix.blogspot.com/2016/07/reverse-engineering-24ghz-rf-chip-xn297.html
(seed 0x71, feedback bit 6 ^ bit 2, MSB first).

All the entries of the 4 tables are given back but two: entry 0 (3 byte
address, no payload) was a 0 placeholder, and scrambled entry 1 (3 byte
address, 1 byte payload) was 0x3448 where the formula gives 0xE348.
2026-10-23 12:02:20 +02:00
Michael 0616cab386 Fixes a problem where setting failsafe values was only possible once after bind and only set values for the first 12 channels. This fix allows setting failsafe values without having to rebind and sets failsafe values correctly for all possible 16 channels. (#695)
Notes for OpenTX/EdgeTX:
This fix doesn't exhibit servo jitter if failsafe mode was left on Custom, however it is still recommended to set failsafe mode back to Receiver after setting failsafe values.
It is still necessary to wait at least 8 seconds switching back from failsafe mode Custom to failsafe mode Receiver as OpenTX/EdgeTX will trigger the data transfer in Custom mode only every 7 seconds.

Bench tested with HoTT receivers GR-16, GR-24pro, GR-32
Flight tested with HoTT receiver GR-24
2022-06-13 14:28:21 +02:00
Michael da33df4346 added packet_in[14] to transfer HoTT device warnings to OpenTx (#627) 2021-11-04 14:57:25 +01:00
Pascal Langer 802e69563e ... 2021-05-04 10:53:38 +02:00
Pascal Langer dbc33951a4 Fix for module boot issue? 2021-03-13 18:18:07 +01:00
Pascal Langer 732e66cab2 HoTT: fix Text config in Sync mode 2021-03-13 11:01:51 +01:00
Pascal Langer 3b8b2ef376 Protocol init function modified 2021-02-09 18:23:33 +01:00
Pascal Langer 7676398aab Fix OMP protocol 2021-01-25 11:33:30 +01:00
Ben Lye 9b2318cc7e Fix EEPROM address variable types (#494) 2020-12-27 09:57:41 +01:00
Pascal Langer 37a06c050d HoTT: added support for 16 channels (previously 12) 2020-12-13 22:56:47 +01:00
Pascal Langer 84132678cc FrSkyR9: TQLY = percentage of telemetry frames per second 2020-07-04 18:40:29 +02:00
Pascal Langer 0316c9eea9 HoTT: telem code cleanup 2020-06-05 22:44:32 +02:00
Pascal Langer 3705415927 HoTT: fix telemetry 2020-06-05 22:20:19 +02:00
Pascal Langer aeb8d67219 HoTT: add subprotocols 2020-06-01 22:55:32 +02:00
Pascal Langer 1f65025036 HoTT: add LBT and telemetry improvment 2020-05-31 23:54:13 +02:00
Pascal Langer c46b49ccf1 HoTT: cleanup 2020-05-23 22:41:07 +02:00
Pascal Langer 4290c75478 HoTT: support for auto sensors discovery and sensors text config 2020-05-17 15:47:56 +02:00
pascallanger db442d81dd Fix all compilation issues (?) 2019-11-11 19:15:39 +01:00
pascallanger 0afed7d3a4 Fix HoTT menu for internal module 2019-11-11 15:36:39 +01:00
pascallanger 0e40f64c6b Enable HoTT RX config menu
Use OpenTX lua script
2019-11-10 18:55:03 +01:00
pascallanger 1621263fb0 HoTT telem doc update 2019-11-09 12:10:56 +01:00
pascallanger b07b081a15 HoTT telemetry size change 2019-11-07 11:13:48 +01:00
pascallanger 928641f535 HoTT: add progmem to tables 2019-11-07 01:56:13 +01:00
pascallanger c4c5ffec4f HoTT: Failsafe
Failsafe MUST be configured once with the desired channel values (hold or position) while the RX is up (wait 10+sec for the RX to learn the config) and then failsafe MUST be set to RX/Receiver otherwise the servos will jitter!!!
2019-11-07 01:03:57 +01:00
pascallanger 00f0719659 HoTT: more hop tables 2019-11-05 19:11:28 +01:00
pascallanger 0482627512 HoTT telem 2019-11-05 00:31:20 +01:00
pascallanger 5856442e0f First HoTT version 2019-11-04 19:16:19 +01:00
pascallanger 7b281e47d6 HoTT work in progress 2019-11-04 09:26:12 +01:00