DSM Telemetry support

More
22 Dec 2012 07:40 #4163 by PhracturedBlue
DSM Telemetry support was created by PhracturedBlue
I've checked in telemetry support for DSM2/DSMX. I don't have any sensors other than the ones that came with my TM1100, so I have only verified 2 voltage and one temperature reading.
Currently telemetry will only work with <= 7 channels. This is a known issue, though I am not yet sure I can actually fix it.
I had to tweak the DSM timing a little to make this work, and DSM receivers are extremely sensitive to timing, so if you see any binding/reception issues with or without telemetry, let me know.

If you have access to additional sensors for the DSM telemetry module, let me know and I can put together a test build to try to capture additional data.

Please Log in or Create an account to join the conversation.

More
22 Dec 2012 09:13 - 22 Dec 2012 09:14 #4165 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
Telemetry disabled. With telemetry enabled all is the same.

AR6010, AR8000, JR RD921(DSM2 only):
1) 6/7 channel mode, DSM2 or DSMX = OK, all work fine.

AR8000, JR RD921(DSM2 only):
1) 8/9 channel mode, DSM2 or DSMX = None, do not bind, do not work.

I had reboot once, when I changed Telemetry = On/Off.
Last edit: 22 Dec 2012 09:14 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
22 Dec 2012 09:48 - 22 Dec 2012 10:05 #4167 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
AR8000 + TM1000, DSM2, 6/7 channel mode, telemetry enabled (On).
1) Temp1 = 123C ??? (temperature sensor not connected),
Temp1 = 25C (temperature sensor connected),
Temp2, Temp3 and Temp4 = "---".
2) Volt1 = 3.8V (external voltage 3.8V),
Volt2 = 0.0V,
Volt3 = 7.6V (receiver battery voltage).
3) RPM1, RPM2 = 0 (I haven't PRM sensor).

AR8000 + TM1000, DSMX, 6/7 channel mode, telemetry enabled (On).
1) TM1000 doesn't bind.
2) AR8000 works fine.

I had reboots when after binding with telemetry="On" I tried change DSMX to DSM2.
Last edit: 22 Dec 2012 10:05 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
22 Dec 2012 14:44 #4181 by PhracturedBlue
Replied by PhracturedBlue on topic DSM Telemetry support
the reboot is likely due to a race condition in changing the telemetry bit.I committed a fix for that. I also committed a fix to re-enable 8/9 ch mode (still no telemetry though). I haven't been able to test my latest changes yet, but will do so sometime today.

Please Log in or Create an account to join the conversation.

More
22 Dec 2012 15:03 #4184 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
It didn't help with binding at 8/9 channel mode:

AR8000, JR RD921(DSM2 only):
1) 8/9 channel mode, DSM2 or DSMX = None, do not bind, do not work.

Please Log in or Create an account to join the conversation.

More
22 Dec 2012 15:54 - 22 Dec 2012 16:02 #4187 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
If I right understand info from RW9UAO, telemetry packet transmitted every 11ms, after channels packet on second DSM channel, even in case 7 channels at DSM2 protocol. I don't see that at code.

For example:
DSM2_CH1_WRITE_A,
DSM2_CH1_CHECK_A,
DSM2_CH2_WRITE_A,
DSM2_CH2_CHECK_A,
DSM2_CH1_READ_A,
DSM2_CH1_WRITE_B,
DSM2_CH1_CHECK_B,
DSM2_CH2_WRITE_B,
DSM2_CH2_CHECK_B,
DSM2_CH1_READ_B.

"TM1000 Telemetry Module
Channels packets are A and B. Telemetry packet transmitted after packet B.
Received packet A, 4ms interval, received packet B, 1.8ms interval, transmission of the first telemetry packet, 4ms interval, received packet A, 4ms interval, received packet B, 1.8ms interval, transmission of the second telemetry packet."
Last edit: 22 Dec 2012 16:02 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
22 Dec 2012 16:11 #4188 by PhracturedBlue
Replied by PhracturedBlue on topic DSM Telemetry support
yes, i specifically didn't implement it that way. I don't seem to have enough time to read to packets per frame with a single transceiver. I wonder if spektrum has a 2nd cyrf-chip for telemetry reception

Please Log in or Create an account to join the conversation.

More
22 Dec 2012 16:29 #4189 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
I see only one.

Attachments:

Please Log in or Create an account to join the conversation.

More
22 Dec 2012 16:56 #4191 by PhracturedBlue
Replied by PhracturedBlue on topic DSM Telemetry support
well, that is good to know. hopefully I can figure out the proper timing then

Please Log in or Create an account to join the conversation.

More
22 Dec 2012 17:30 - 22 Dec 2012 17:31 #4194 by PhracturedBlue
Replied by PhracturedBlue on topic DSM Telemetry support
and now 8/9 ch mode (without telemetry) should work. Verified on my Orange 9Ch
Last edit: 22 Dec 2012 17:31 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
22 Dec 2012 18:05 - 22 Dec 2012 19:29 #4198 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
crcidx = !crcidx;
if (state == DSM2_CH2_CHECK_A) {
//Keep transmit power in sync
CYRF_WriteRegister(CYRF_03_TX_CFG, 0x28 | Model.tx_power);
if (num_channels < 8 ) {
if (Model.proto_opts[PROTOOPTS_TELEMETRY] == TELEM_ON) {
CYRF_ConfigRxTx(0); //Receive mode
CYRF_WriteRegister(0x07, 0x80); //Prepare to receive
CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x87); //Prepare to receive
state = DSM2_CH1_READ_A;
return 9390;
} else {
set_sop_data_crc();
state = DSM2_CH1_WRITE_A;
return 9390 + 6800;
}
}
set_sop_data_crc();
state = DSM2_CH1_WRITE_B;
return 5190;
}
set_sop_data_crc();
state = DSM2_CH1_WRITE_A;
return 5190;
Last edit: 22 Dec 2012 19:29 by FDR.

Please Log in or Create an account to join the conversation.

More
22 Dec 2012 22:02 - 22 Dec 2012 22:12 #4205 by PhracturedBlue
Replied by PhracturedBlue on topic DSM Telemetry support
I reworked the state-machine again. Now it does read both frames of telemetry and it does work with >= 8 channels. However, for unknown reasons only every other telemetry packet is received correctly. I have no idea why that is, but I never get the expected 'end of packet' bit on every other read.

of course, it needs testing to see what else I broke.
Last edit: 22 Dec 2012 22:12 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
22 Dec 2012 22:19 #4206 by RugWarrior
Replied by RugWarrior on topic DSM Telemetry support
I can not test it at the moment but I thank you for your effort!

Please Log in or Create an account to join the conversation.

More
23 Dec 2012 06:55 - 23 Dec 2012 11:05 #4212 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
Maybe telemetry alternate the channels CH1 and CH2?

or

If we will transmit data at one channel only, what will be to change with every next packet?
Last edit: 23 Dec 2012 11:05 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
23 Dec 2012 09:12 - 23 Dec 2012 10:18 #4213 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
AR8000 and JR RD921 (DSM2 only) with telemetry "Off":
1) 6/7 channel mode, DSM2 = OK,
2) 8/9 channel mode, DSM2 = OK,
3) 6/7 channel mode, DSMX = OK,
4) 8/9 channel mode, DSMX = OK.

AR8000 and TM1000 with telemetry "On":
1) 6/7 channel mode, DSM2 = OK, telemetry = OK,
2) 8/9 channel mode, DSM2 = OK, TM1000 not always bind (50/50),
3) DSMX protocol, TM1000 do not bind.

Something wrong with DSMX protocol and telemetry.
Last edit: 23 Dec 2012 10:18 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
23 Dec 2012 10:35 - 23 Dec 2012 15:07 #4214 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support

PhracturedBlue wrote: If you have access to additional sensors for the DSM telemetry module, let me know and I can put together a test build to try to capture additional data.


PB, I see that Spektrum SD log file format is very close to telemetry packets structure (if cut first 4 bytes = timestamp). Can you check it?

"the data recorded on the card is a timestamp + the raw data off the air." (Andy Kunz)

www.rcgroups.com/forums/showpost.php?p=23133050&postcount=86


Data type = 7E{TM1000} or FE{TM1100}

0[00] 7E or FE
1[01] 00
2[02] RPM MSB (Hex)
3[03] RPM LSB (Hex) RPM = Value (Decimal) * count of Poles
4[04] Volt MSB (Hex)
5[05] Volt LSB (Hex) V = Value (Decimal) / 100
6[06] Temp MSB (Hex)
7[07] Temp LSB (Hex) Value (Decimal) is in Fahrenheit, for Celsius ((Value (Decimal) - 32)*5) / 9
8[08] Unknown
9[09] Unknown
10[0A] Unknown
11[0B] Unknown
12[0C] Unknown
13[0D] Unknown
14[0E] Unknown
15[0F] Unknown


Data type = 7F{TM1000} or FF{TM1100}

0[00] 7F or FF
1[01] 00 Unknown
2[02] A MSB (Hex)
3[03] A LSB (Hex)
4[04] B MSB (Hex)
5[05] B LSB (Hex)
6[06] L MSB (Hex)
7[07] L LSB (Hex)
8[08] R MSB (Hex)
9[09] R LSB (Hex)
10[0A] Frame loss MSB (Hex)
11[0B] Frame loss LSB (Hex)
12[0C] Holds MSB (Hex)
13[0D] Holds LSB (Hex)
14[0E] Receiver Volts MSB (Hex)
15[0F] Receiver Volts LSB (Hex) V = Value (Decimal) / 100
Last edit: 23 Dec 2012 15:07 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
23 Dec 2012 14:15 #4218 by PhracturedBlue
Replied by PhracturedBlue on topic DSM Telemetry support
Thanks. That does look like the same data, butthe0xff packet doesn't make any sense.
with 3 sticks centered and one all the way down, I get packets like this:

ff 00 e1 ec f8 0f f0 dc f8 c3 a7 cd 00 be 01 e7
ff 00 c9 e1 ec f8 0f f0 dc f8 66 a7 00 ce 01 e7
ff 00 e1 ec f8 8f f0 dc f8 c3 66 a7 00 ce 01 e7
ff 00 cd e1 ec f8 8f f0 dc f8 62 a7 00 ce 01 e7
ff 00 26 e1 ec f8 0f f0 dc f8 a3 c9 00 be 01 e7
ff 00 e1 ec f8 8f f0 dc f8 c3 a3 c9 00 be 01 e7
ff 00 c9 f8 e1 ec f8 8f f0 dc 66 a7 00 ce 01 e7

I don't know how to reconcile that with the format you posted.
I think the frame-loss and hold info would be useful to process, but it makes no sense from the data I captured.

Please Log in or Create an account to join the conversation.

More
23 Dec 2012 15:06 - 23 Dec 2012 15:06 #4219 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
At DX8 "Spektrum.tlm" I have after 5 Tx swith off:
7F 00 00 E1 FF FF 00 E1 FF FF 00 00 00 05 02 EB

and temp = 24C
7E 00 FF FF 00 00 00 4C 00 00 00 00 00 00 00 00
Last edit: 23 Dec 2012 15:06 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
23 Dec 2012 17:23 #4222 by vlad_vy
Replied by vlad_vy on topic DSM Telemetry support
Is TM1100 connected to BIND/DATA port of receiver?

Please Log in or Create an account to join the conversation.

More
23 Dec 2012 18:21 #4227 by PhracturedBlue
Replied by PhracturedBlue on topic DSM Telemetry support

vlad_vy wrote: Is TM1100 connected to BIND/DATA port of receiver?

Yes, but the captures above were done with an Orange RX. When I tried it with he AR6210, I can see the 'hold' count increase when I toggle the Tx, and the 'frame loss' increase if I wrap the Rx in foil.

Please Log in or Create an account to join the conversation.

Time to create page: 0.101 seconds
Powered by Kunena Forum