esptracker
esptracker copied to clipboard
Lighthouse 2.0 Command Dump
Plug it in while it's on.
Just FYI, I said "mode 16" "mode 0"
id View device identification.
reboot Reboot board.
shutdown Shutdown; Shuts down the console, too.
isp Invoke bootloader for ISP.
stats Toggle statistics dumping.
clear Clear statistics.
param Configure parameters.
genealogy Manage genealogy information.
perf Simple math performance measurement.
uptime System uptime.
dump Toggle rotor data dumping.
step Test rotor step response.
ram RAM inspect.
eeprom EEPROM inspect and modify.
pwmscan Scan coarse PWM speed control.
pwmcal Perform coarse PWM calibration.
pwmopt Perform coarse PWM optimisation search.
pwmgain Perform coarse/fine PWM gain measurement.
crash Crash system.
isl58303 Access laser driver registers.
lis2dh Access accelerometer registers.
auto Toggle automatic PWM tuning.
autodebug Toggle automatic PWM tuning debug.
pll Toggle PLL control.
plldebug Toggle PLL debug.
freq Set rotor spin frequency.
factory Factory test and calibration command.
fpga FPGA register access.
mode Set operating configuration number.
motor Manual motor driver control.
log Adjust logging settings.
dtm Send decimal encoded DTM command params (cmd# <RST, Rx, Tx, End>, ch# <0-39>, pkt len <0-255>, pkt type <PRBS9 0>) to Radio for Testing.
dtm_pwr Adjust DTM power when radio is in idle (reset) mode. Current options are 4, 3, & 0.
serial_dfu Request Bootloader for Radio and Open UART channel for DFU.
nonce Request a new pairing code for the radio.
radio Radio sub-command tree.
lhtx> mode 0mode 0
Current mode: 0
usage: mode <0-16>
lhtx> mode 0
timebase.period = 887000
rotor.pwm = 1727
rotor.pll.offset = 221750
lhtx> mode 1
timebase.period = 959000
rotor.pwm = 1909
rotor.pll.offset = 239750
lhtx> mode 2
timebase.period = 957000
rotor.pwm = 1909
rotor.pll.offset = 239250
lhtx> mode 3
timebase.period = 953000
rotor.pwm = 1909
rotor.pll.offset = 238250
lhtx> mode 4
timebase.period = 949000
rotor.pwm = 1909
rotor.pll.offset = 237250
lhtx> mode 5
timebase.period = 947000
rotor.pwm = 1909
rotor.pll.offset = 236750
lhtx> mode 6
timebase.period = 943000
rotor.pwm = 1909
rotor.pll.offset = 235750
lhtx> mode 7
timebase.period = 941000
rotor.pwm = 1863
rotor.pll.offset = 235250
lhtx> mode 8
timebase.period = 939000
rotor.pwm = 1863
rotor.pll.offset = 234750
lhtx> mode 9
timebase.period = 937000
rotor.pwm = 1863
rotor.pll.offset = 234250
lhtx> mode 10
timebase.period = 929000
rotor.pwm = 1863
rotor.pll.offset = 232250
lhtx> mode 11
timebase.period = 919000
rotor.pwm = 1818
rotor.pll.offset = 229750
lhtx> mode 12
timebase.period = 911000
rotor.pwm = 1818
rotor.pll.offset = 227750
lhtx> mode 13
timebase.period = 907000
rotor.pwm = 1818
rotor.pll.offset = 226750
lhtx> mode 14
timebase.period = 901000
rotor.pwm = 1772
rotor.pll.offset = 225250
lhtx> mode 15
timebase.period = 893000
rotor.pwm = 1772
rotor.pll.offset = 223250
lhtx> mode 16
timebase.period = 887000
rotor.pwm = 1727
rotor.pll.offset = 221750
lhtx> mode 0
timebase.period = 887000
rotor.pwm = 1727
rotor.pll.offset = 221750
lhtx> id
Device Name: DEFAULT
Serial Number: 92D18FD0
Firmware Build: 0.1.8138615 2018-01-18 04:07:10 <buildsystem@fw-keil5-win32>
Radio Build: FW 1.1.6277248 HW 0.0, 3277mV <buildsystem>
FPGA Code Version: 6
OOTX Model: 14
lhtx> param
usage:
param list [pattern]
param info <name>
param get <name>
param set <name> <value>
param default <name>
param default-all
param part
param erase <partition>
param raw <r|w> <addr>
param load [partition]
param save [[partition] [version]]
lhtx> param list
sys.param_magic 1634492787
sys.name DEFAULT
sys.warnings false
sys.emission_enable true *
sys.uptime 571
sys.standby false
sys.identify false
sys.faults 0
sys.config 0
timebase.debug false
timebase.mode master-async
timebase.period 887000
timebase.offset 0
timebase.p 0.050000
timebase.i 0.000000
timebase.d 1.000000
timebase.k 0.999000
timebase.locked true *
timebase.source internal
timebase.current 887000
timebase.tolerance 400 *
timebase.tdm false
timebase.output true
carrier.enable true
carrier.debug false
carrier.cw false
carrier.divider 2
carrier.poly.0 79696
carrier.poly.1 117645
carrier.poly.f 102375
laser.enable true
laser.debug false
laser.interlock true *
laser.fullspin false
laser.phase.on 10.000000
laser.phase.off 350.000000
laser.bias 0
laser.current 123
laser.pwr 70.000000
laser.pwr.debug false
laser.pwr.b1 1.825058
laser.pwr.b2 -8.311882
laser.pwr.m 0.212129
laser.pwr.gain 3
laser.pwr.k1 0.950000
laser.pwr.detected 371.262238
laser.pwr.average 70.056595
laser.apc true
laser.apc.debug false
laser.apc.i 0.010000
rotor.enable true
rotor.debug false
rotor.status fine
rotor.pwm 1661
rotor.pwm.m -0.022000
rotor.pwm.b 92.000000
rotor.pwm.rt 0.000000
rotor.pwm.auto true
rotor.pwm.i 0.001000
rotor.pwm.int 1660.958252 *
rotor.pwm.fine 1918 *
rotor.pll.enable true
rotor.pll.debug false
rotor.pll.p 0.100000
rotor.pll.i 0.010000
rotor.pll.d 0.400000
rotor.pll.s 0.901917 *
rotor.pll.offset 221750
rotor.pll.jitter 300.000000
rotor.pll.phase 1000
rotor.pll.settle 30
rotor.autoclear true
stats.enable false
stats.interval 1
ootx.enable false
ootx.debug false
ootx.lock_required true
ootx.model_override 0
ootx.nonce 62877
accel.enable true
accel.debug false
accel.b1 0.970000
accel.x 0.280412
accel.y 9.340630
accel.z 0.500193
accel.magnitude 9.358238
accel.is_gravity true
accel.dir_x 3
accel.dir_y 127
accel.dir_z 6
accel.temp 40.000000
led.enable true *
led.r 255
led.g 255
led.b 255
led.w 255
fcal.0.tilt -0.045986
fcal.0.phase 0.000000
fcal.0.curve 0.011129
fcal.0.gibphase 2.807692
fcal.0.gibmag -0.004365
fcal.0.ogeephase 0.712315
fcal.0.ogeemag -0.292590
fcal.1.tilt 0.047451
fcal.1.phase -0.002430
fcal.1.curve 0.501718
fcal.1.gibphase 0.182767
fcal.1.gibmag 0.002670
fcal.1.ogeephase 1.181657
fcal.1.ogeemag -0.308045
log.srcs_en 0
log.level Debug
lhtx> genealogy
The command 'genealogy' takes at least 1 argument.
lhtx> perf
overhead: 1.167 us
integer addition: 0.125 us (8000000.0 Hz)
integer multiplication: 0.125 us (8000000.0 Hz)
integer division: 12.630 us (79177.0 Hz)
integer modulo: 12.646 us (79074.1 Hz)
float addition: 2.745 us (364350.6 Hz)
float multiplication: 2.167 us (461538.5 Hz)
float multiply-accumulate: 4.255 us (235022.5 Hz)
float division: 9.212 us (108555.1 Hz)
float fmodf(): 6.868 us (145613.3 Hz)
float sqrtf(): 11.459 us (87271.4 Hz)
float sinf(): 40.041 us (24974.1 Hz)
float asinf(): 35.214 us (28397.9 Hz)
float cosf(): 38.172 us (26197.0 Hz)
float acosf(): 36.292 us (27554.2 Hz)
float tanf(): 50.228 us (19909.3 Hz)
float atan2f(): 51.522 us (19409.2 Hz)
double addition: 8.421 us (118749.9 Hz)
double multiplication: 23.328 us (42867.8 Hz)
double multiply-accumulate: 28.196 us (35465.4 Hz)
double division: 35.861 us (27885.7 Hz)
double fmod(): 13.020 us (76803.7 Hz)
double sqrt(): 84.350 us (11855.4 Hz)
double sin(): 334.632 us (2988.4 Hz)
double asin(): 526.499 us (1899.3 Hz)
double cos(): 332.948 us (3003.5 Hz)
double acos(): 390.290 us (2562.2 Hz)
double tan(): 655.938 us (1524.5 Hz)
double atan2(): 498.148 us (2007.4 Hz)
lhtx> geneaology 1
No such command 'geneaology'.
lhtx> geneology 1
No such command 'geneology'.
lhtx> freq
Rotor Frequency: 54.1150 Hz
lhtx>
isl58303
ISL58303() {
CHIP_ID: 0xE3 ( CHIP_ID:0x38 )
SERIAL_CTRL: 0x00 ( PAGE_SELECT:0x0 )
STATUS: 0x09 ( POWER_GOOD:1 )
SDIO: 0x00 ( SDIO_VOLTAGE:0 )
ENABLE: 0x81 ( CHIP_EN:1 ADC_EN:0 IOUT2_PMOS_EN:0 REGULATOR_EN:1 )
IOUT1_THRESHOLD_SCALE: 0x30
IOUT1_COLOR_SCALE: 0x90
IOUT1_THRESHOLD_DAC: 0x00
IOUT1_COLOR_DAC: 0x7C
IOUT2_THRESHOLD_SCALE: 0x00
IOUT2_COLOR_SCALE: 0xFF
IOUT2_THRESHOLD_DAC: 0x00
IOUT2_COLOR_DAC: 0x00
IOUT3_THRESHOLD_SCALE: 0x00
IOUT3_COLOR_SCALE: 0xFF
IOUT3_THRESHOLD_DAC: 0x00
IOUT3_COLOR_DAC: 0x00
ADC_SELECT: 0x00 ( IOUT_SELECT:0x0 CODE_SELECT:0 )
ADC_RESULT: 0x00
ADC_CTRL_1: 0x00 ( INPUT_SELECT:0x0 CLOCK_SELECT:0x0 ADC_EN:0 START:0 )
ADC_CTRL_2: 0x00 ( PEAK_EN:0 PEAK_POLARITY:0 SAMPLE_VSO:0 ATTN_BYPASS:0 ATE_TEST:0 )
}
lhtx> fpga
ID: 0xCAFEABBA
VERSION: 6
CARRIER_CTRL: 0x1 ( ENABLE )
CARRIER_DIV: 2 (24.000 MHz)
CARRIER_POLYNOMIALS[0]: 0x00013750
CARRIER_POLYNOMIALS[1]: 0x0001CB8D
OOTX_CTRL: 0x0 ( )
OOTX_COUNT: 443
OOTX_CURSOR: 0x0807D32D
OOTX_IPI_LENGTH: 0
OOTX_LENGTHS[0]: 0
OOTX_LENGTHS[1]: 0
OOTX_LENGTHS[2]: 0
OOTX_LENGTHS[3]: 0
OOTX_LENGTHS[4]: 0
OOTX_LENGTHS[5]: 0
OOTX_LENGTHS[6]: 0
OOTX_LENGTHS[7]: 0
OOTX_BUFFER:
00000000: 00 00 4A C0 29 00 1D 08 FE 8C 94 00 03 F5 31 E3 ..J.).........1.
00000010: A9 89 95 45 83 B6 64 30 43 88 23 FC 1A 7A 83 B3 ...E..d0C.#..z..
00000020: 31 78 CE 3C 46 7F E0 16 73 9B A9 E5 76 D3 BB 69 1x.<F...s...v..i
00000030: 3B F5 00 A4 8D DC 2C 60 00 00 00 00 00 00 00 00 ;.....,`........
00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
LASER_STATUS: 0x3 ( MCU_EN ENABLE )
LASER_CTRL: 0x1 ( ENABLE )
LASER_APC_GAIN: 6
LASER_ON_DELAY: 24638
LASER_OFF_DELAY: 862361
MOTOR_STATUS: 0x3 ( FG SPINNING )
MOTOR_CTRL: 0x1 ( ENABLE )
MOTOR_PWM: 0x09860800 ( 2438 2048 )
MOTOR_FG_TIME_OUT: 221750
MOTOR_FG_PERIOD: 147724
TIMEBASE_STATUS: 0xB ( EXT_DIR EXT_OUT ACTIVE )
TIMEBASE_CTRL: 0x11 ( OUTPUT ENABLE )
TIMEBASE_PERIOD: 887000
TIMEBASE_TDM_WIGGLE: 110875
TIMEBASE_COUNTER: 384434157
TIMEBASE_NEXT: 384607304
TIMEBASE_UNTIL: 269309
TIMEBASE_TICK_TIME: 384607305
TIMEBASE_SYNC_TIME: 384385581
TIMEBASE_EXT_RE_TIME: 4
TIMEBASE_EXT_FE_TIME: 5743159
TIMEBASE_OPTORX_RE_TIME: 385393538
TIMEBASE_OPTORX_FE_TIME: 385587504
IRQ: 0x30 ( OPTO_FE OPTO_RE )
IRQ_EN: 0x3 ( SYNC TICK )
IRQ_OVERRUN: 0x33 ( OPTO_FE OPTO_RE SYNC TICK )
lhtx>
Worth nothing on the mode thing here, 0 uses the values of the last mode it was set to for some reason - hence the values are the same.
I know, I know. It starts at 1 not 0. It bothers me too.
CARRIER_POLYNOMIALS[0]: 0x00013750 CARRIER_POLYNOMIALS[1]: 0x0001CB8D
It looks like these are the LFSR polynomials. The hint was here all along. :)
OOTX_BUFFER:
00000000: 00 00 4A C0 29 00 1D 08 FE 8C 94 00 03 F5 31 E3 ..J.).........1.
00000010: A9 89 95 45 83 B6 64 30 43 88 23 FC 1A 7A 83 B3 ...E..d0C.#..z..
00000020: 31 78 CE 3C 46 7F E0 16 73 9B A9 E5 76 D3 BB 69 1x.<F...s...v..i
00000030: 3B F5 00 A4 8D DC 2C 60 00 00 00 00 00 00 00 00 ;.....,`........
00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
This buffer is matching slow data decoded off signal:
000000000000000001
00101011000000001
01001000000000001
etc..
So this confirms my LFSR detection program decodes it correctly.
The polynomials in configuration aren't the same, this might be because of different design of LFSR generator (there are multiple ways how to do generate it).
OOTX slow data, bytes (stripped 17th bit from each word):
2B 00 48 00 D0 8F D1 92 00 00 FA 98 E3 A9 13 2A 16 0E B3 21 04 38 04 7F 06
^^^^^^^^^^^ ~~ ~~
Device SN ?? ??
0x92D18FD0
9E 41 D9 31 78 9C 78 19 FF 00 B3 39 BA 3C AE B4 EE B4 9D F5 00 49 1B 70 B1
~~ ^^^^^ ~~~~~~~~~~~
?? ootx.nonce CRC32?
62877
Only few bytes are changing (marked "??" above), most is static across even different lighhouses. But found the ootx.nonce and device SN values. I tried interpreting these bytes as float values (and doubles), but no good matches with any of the parameters listed.
Just making sure this is with the newest data set? @r2x0t should I record a few more for you? How long in seconds would we need? I won't be able to record any more for about a week after today.
carrier.poly.0 79696
carrier.poly.1 117645
carrier.poly.f 102375
maybe you can change them to something boring and expose the real data?
@Spongman we're kind of to the point where the polynomial isn't stopping us thanks to root's sleuthing. But, these do serve to validate the final polynomial decoding. It's actually not that bad to determine the OOTX 1's and 0's now.
@cnlohr Because the OOTX_BUFFER can be dumped using console, there is really no need to make a new recordings - we already know how to decode the signal down to same buffer bytes. Just make various configuration changes or hardware changes that might be sent over the air and dump the buffer bytes every time.
Worth noting that setting mode changes the carrier polynomial, and I get the same polynomials as charles when I set the same mode he had set -- which means we effectively know all currently used polynomials; plus or minus figuring out the exact representation used for them here.