- Posts: 3333
18 channels for DSM2 / DSMX ?
- vlad_vy
- Offline
Please Log in or Create an account to join the conversation.
- Cesco
- Topic Author
- Offline
- Posts: 37
We have to find a guy who actually owns a dx18 and receiver to find out. Costs $750 here.
One thing is i could not make deviationtx work in dsm2 2048 mode. Only dsm2 1024 mode. Dsmx does 2048 mode. There should be an option to bind in dsm2 / 2048 too. How does the dx18 handle this?
Actual xchannel data dump:
xchannel value
0 86
7 426
1 256
4 85
2 256
5 256
3 256
7 426
0 86
4 85
1 256
5 256
2 256
7 426
3 256
4 85
0 86
5 256
1 256
7 426
2 256
4 85
3 256
5 256
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- victzh
- Offline
- Posts: 1386
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Packet sent from TX
Bytes 1 - 4 GUID of the radio
Bytes 5 - 8 = copy of bytes 1 - 4
Bytes 9 and 10 = checksum of bytes 1-8 (add bytes 1 thru 8 together and then add 0x170.
Byte 11 always equals 1 in every Spektrum radio I've seen - don't know its function
Byte 12 = number of transmitter channels
Byte 13 = capabilities of the transmitter
DSM2 transmitter = 0x01 or 0x02 (I think it is the number of packet pairs needed for a complete frame 7CH TX = 0x01, 8+ CH = 0x02)
High speed DSM2 = 0x11 or 0x12
DSMX 7 channel TX = 0xA2 (DSMX and 11 bit resolution)
DSMX 8+ channel TX that supports high speed = 0xB2
Byte 14 always 0x00
Bytes 15 & 16 = another checksum created by adding bytes 9 - 14 together with the checksum at bytes 9 & 10
================================================================
The receivers always respond with a 10 byte packet that has the format:
Bytes 1 - 4 = GUID of the TX
Bytes 5 = always 1
Byte 6 number of channels of the receiver (can't always be relied on; my AR8000 always says 7)
Byte 7 = capabilities of the receiver in the same format as Byte 13 above
Byte 8 = always zero
Bytes 9 & 10 = checksum"
Please Log in or Create an account to join the conversation.
- Cesco
- Topic Author
- Offline
- Posts: 37
Test-receiver on multiwii basis is ready.
Unluckily i cant compile anmore myself, something messed up.
Edit:
There is a messup with the D bit. I did think i have seen it, but testing i cant see it, always zero. So the msb of the x-channel number depends if its the first packet or not. If channel 0 is in the same packet add 4, if channel 1 is in the same packet add 0.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
The D bit is always 0. It have sense, since it have to be 0 for 1st data packet, 1 for 1st channel in 2nd data packet.
If it is the first packet of frame, 0-3 xchannel number equal 0-3 xchannel number.
If it is the second packet of frame, 0-3 xchannel number equal 4-7 xchannel number (+4).
Is it right?
Please Log in or Create an account to join the conversation.
- Cesco
- Topic Author
- Offline
- Posts: 37
So i did look at D bit in first channel to determine if 0..3 or 4..7.
I confirm if channel 1 D bit is set its 4..7, else 0..3.
My decoder: bcas.tv/paste/results/1kqYIx42.html
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Cesco wrote: If channel 0 is in the same packet add 4, if channel 1 is in the same packet add 0.
Channel transfer structure:
packet 1 -> 1 5 2 4 6 10 12
packet 2 -> 0 7 3 8 9 11 12
vlad_vy wrote: The D bit is always 0. It have sense, since it have to be 0 for 1st data packet, 1 for 1st channel in 2nd data packet.
If it is the first packet of frame, 0-3 xchannel number equal 0-3 xchannel number.
If it is the second packet of frame, 0-3 xchannel number equal 4-7 xchannel number (+4).
I think it's right.
Order of channels in packets may be variable. I don't check it, but I think it may depends from Tx model type: ACRO, HELI, SAIL. This way Tx group channels for main controls, for HELI ch2, ch3, and ch6 placed in the same packet for minimal delays.
Please Log in or Create an account to join the conversation.
- Cesco
- Topic Author
- Offline
- Posts: 37
i did post actual (baseflight) source here:
www.rcgroups.com/forums/showthread.php?t...page=17#post26478241
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Firmware for Devo12, based on last v3.1.0-beta-03 rbe2012 build.
DELETED
Please Log in or Create an account to join the conversation.
- Cesco
- Topic Author
- Offline
- Posts: 37
lower 4 chan
dbg1 ok
dbg3 ok
upper 4 chan
dbg2 ok
dbg4 ok
numbering xchannels 1 to 8 means
xchan 1,3,6,8 work
xchan 2,4,5,7 dont
GREAT WORK !
No idea whats up with the non working channels.
Be aware my soft could be easily be wrong.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
I will check my code again. Also, we need to know what is transmitted in case unused X-Plus channel. For example, if enabled X-Plus 1 only, what is transmitted with the second packet. Possible it can be 0xFFFF.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Total 20 output channels, 12 normal channels + 8 X-Plus channels. Unused X-Plus channels have 256 value.
Firmware for Devo12, based on last v3.1.0-beta-04 rbe2012 build
DELETED
Please Log in or Create an account to join the conversation.
- Cesco
- Topic Author
- Offline
- Posts: 37
X-channels 1,2,3,4,5,6,7,8
They all work now !
The unused channels data will be difficult since i dont have a DX18. I know an american guy over IRC who did the testing, and i will have to convince him to do it.
From reading the x-channel spec it seems if you only define 2 or 4 or 6 x-channels, only those are sent (x.-channel latency from 22ms to 88ms) but if you define 1,3,5,or 7 channels i dont know.
Well TY, i got a 20channel Devo12S now
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
ch13 = x1 (22ms)
ch14 = x2 (44ms)
ch15 = x3 (66ms)
ch16 = x4 (88ms)
ch17 = x5 (88ms)
ch18 = x6 (88ms)
ch19 = x7 (88ms)
ch20 = x8 (88ms)
I can reorder x-channels for better arrangement in packets:
ch13 = x1 (22ms)
ch14 = x5 (22ms)
ch15 = x2 (44ms)
ch16 = x6 (44ms)
ch17 = x3 (66ms)
ch18 = x7 (66ms)
ch19 = x4 (88ms)
ch20 = x8 (88ms)
Delays listed in order adding number of channels, 13 or 14 or 15 ...
Please Log in or Create an account to join the conversation.
- Cesco
- Topic Author
- Offline
- Posts: 37
if 14 channels defined ( 2 x-chan ) every 22ms
if 16 channels defined ( 4 x-chan ) every 44ms
if 18 channels defined ( 6 x-chan ) every 66ms
if 20 channels defined ( 8 x-chan ) every 88ms
spektrum states those x-channels are for gear / lights / special functions, so latency or the 512 resolution should not matter anyway.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
If you will add number of channels, 13 or 14 or 15 ..., you have to get 1 or 2 or 3 ... x-channels. I hope it will be like this.
DELETED
Please Log in or Create an account to join the conversation.
- Cesco
- Topic Author
- Offline
- Posts: 37
I have to restart the Devo12S for new channel number to become active.
I did not test the latency. Would this be necessary?
Edit:
I would let the user choose between 1024 / 2048 for dsm2.
Or leave it as is with no x-channels for dsm2.
If switch to 2048 is automated for >7 channels people would have to re-bind all their >7 channels models.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Cesco, can you test next firmware version, with disabled unused X-Plus channels and more optimal x-channels arrangement?
Now you have tested:
ch13 = x1 (22ms)
ch14 = x2 (44ms)
ch15 = x3 (66ms)
ch16 = x4 (88ms)
ch17 = x5 (88ms)
ch18 = x6 (88ms)
ch19 = x7 (88ms)
ch20 = x8 (88ms)
Next firmware have x-channels arrangement:
ch13 = x1 (22ms)
ch14 = x5 (22ms)
ch15 = x2 (44ms)
ch16 = x6 (44ms)
ch17 = x3 (66ms)
ch18 = x7 (66ms)
ch19 = x4 (88ms)
ch20 = x8 (88ms)
If you can test/compare delays with both versions, it will be nice.
SORRY, I FOUND ERROR IN CODE. FIRMWARE DELETED.
P.S. I'm not sure, but probably for new channel number to become active will be enough press 'Bind' button.
P.S. Since you got positive result with unused X-Plus channels, I can say that unused X-Plus channel has data format 0xFFFF, the same as unused normal channels.
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Protocol Development
- 18 channels for DSM2 / DSMX ?