xukkkkkk 发表于 2013-8-30 11:56:02

介绍下开源的遥控器

基于DEVO 7E源代码在这里 有兴趣可以直接找其他资料
https://bitbucket.org/PhracturedBlue/deviation

https://bitbucket.org/sunvsuv/deviationfor6810/overview


技术比较复杂
硬件基于STM32F100   12864点阵支持A7015CC250024l01CY6836 等主流无线模块带2Mflash

软件 基于HID大容量存储器 DUP升级GUI



这个是他们猜出来的DSM2无线遥控协议,这个比较牛,得分析好久

DSM2:

DSM2 data packets consist of 7 channels each.the packets are formatted as 16bit MSB-1st values
Data can be either 10 or 11 bits.
6-channel DSM2 = 10bit
8-channel DSM2 = 11bit
All DSMx appears to be 11bit

A packet consists of a Tx ID + upto 7 channels of data
each 16bit data value is defined as:
10bit:
a 0 bbbb cccccccccc
11bit:
a bbbbccccccccccc

a:    0 for 1st data packet, 1 for 1st channel in 2nd data packet
bbbb: the channel number of this packet
cc..: 10 or 11bit channel data (MSB 1st)

The channel data will be 0xffff if the specific channel slot is unused

Channel assignment appears to be:
0: Throttle
1: Aileron
2: Elevator
3: Rudder
4: Gear
5: Aux1
6: Aux2
7: Aux3


Data packets are defined as:
aa bb cccc dddd eeee ffff gggg hhhh iiii
aa: If DSM2: 0xff - mfgid, if DSMX mfgid
bb: If DSM2: 0xff - mfgid + offset, if DSMX mfgid + offset (see binding)
cccc: Channel
dddd: Channel
eeee: Channel
ffff: Channel
gggg: Channel
hhhh: Channel
iiii: Channel


Each packet is sent twice, once on channel 'a' and 4msec later on channel 'b'
If there are more than 7 channels to transmit, the upper channels are transmitted using the same
packet format 11mec after the the low-channel packet.
New channel data is transmitted each 22msec

For example:
0msec: Transmit channels 0-7 on channel 'a'
4msec: Transmit channels 0-7 on channel 'b'
11msec: Transmit channels 8-14 on channel 'a'
15msec: Transmit channels 8-14 on channel 'b'
22msec: Transmit channels 0-7 on channel 'a'

New SOP(8 bytes) and Data (16 bytes) codes are sent before each packet.

Binding:
The bind packet is as follows:
aa bb cc dd aa bb cc dd eeee ff gg hh ii jjjj
aa   : 0xff - mfgid
bb   : 0xff - mfgid
cc   : 0xff - mfgid
dd   : 0xff - mfgid + offset
eeee : 384 + sum of bytes 0 through 7
ff   : Unknown (value = 0x01)
gg   : # of channels being transmitted
hh   : Transmitter capabilities
   : HP6DSM (DSM2): 0x01
   : DX6i   (DSMX): 0xA2
   : DX8    (DSM2): 0x12
   : DX8    (DSMX): 0xB2
   : DM9    (DSM2): 0x02
# of packets (1 if num-channels < 8, 2 if num-channels >= 8) for DSM2
ii   : Unknown (value = 0x00)
jjjj : eeee + sum of bytes 8 through 13
The bind channel can be any odd channel between 0x01 and 0x4f
The SOP and CRC are set as below for the chosen bind channel
the DATA code is 32 bytes.The 1st 16 bytes are as defined below for the bind channel.
The 2nd 16 bytes are always:
D7A154B15E89AE86 C69422FE48E6574E

Once the Rx detectes that the bind packet is no longer being sent, it
will transmit a confirmation on the same channel using the fillowing 16byte DATA code:
98881BE430790384 060C12181E247110
It is not required that the Tx receives or acts upon this packet

The confirmation data is:
aa bb cc dd ee ff gg hh ii jj
aa: byte of bind packet
bb: byte of bind packet
cc: byte of bind packet
dd: byte of bind packet
ee: byte of bind packet (always 0x01)
ff: # of supported channels(?)
    AR7000=0x07, AR6010=0x07, AR6210=0x07
gg: requested packet type
    AR6210 connected to HP6DSM(DSM2): 0x01 (DSM2 requested)
    AR7000 connected to DX6i (DSMX):0x01 (DSM2 requested)
    AR6010 connected to DX6i (DSMX):0xA2 (DSMX requested)
hh: byte of bind packet (always 0x00)

SOP/Data/CRC code selection:
there is one set of SOP, Data, and CRC codes for each transmit channel.
The SOP and DATA codes come from the Cypress recommended SOP table.the codes are documented here:
http://www.cypress.com/?docID=15229

They are organized in 5 rows of 9 columns with the contenst of each 'cell' being an 8-byte PN code
The row is determined by the transmit channel as:
row = channel modulo 5
The columns are determined from the mfgid as follows:
sop-col = (mfgid + mfgid + mfgid + 2) & 0x07
data-col0 = 7 - sop-col
data-col1 = data-col0 + 1
The crc for channel 'a' is NOT(mfgid << 8 + mfgid)
The crc for channel 'b' is (mfgid << 8 + mfgid)

Here is the table (note that I've transposed rows and columns to make it easier to read)
Note: Values are LSB 1st
             0               1               2               3               4
0    03BC6E8AEFBDFEF883F7A82D7A4464D3405632D90FD95D97C0908FBB7C8E2B8EE1D631265FBD4093
1    8817133B2DBF06D63F2C4EAA71487AC98E4AD0A9A7FF20CA8069268008F849E7DC68089997AEAF8C
2    F1943021A11C88A917FF9E213690C7824C979DBFB83DB5BE7D2D4954D08040C1C30E01160E3206BA
3    D0D28EBC822FE3B4BC5D9A5BEE7F42EB0C5D24309FCA6DBDB6F2E61B805A36B4E08301FAAB3E8FAC
4    8CFA479B83A566D024F5DDF87A7774E7501433DEF17895AD42AE9C1CDA6705F65CD59CB8469C7D84
5    07BD9F26C8310FB83D707C94DC84AD950C3CFAF9F0F210C99B75F7E0148DB580F1C6FE5C9DA54FB7
6    EF039589B471619D1E6AF037527B11D4F4DA06DBBF4E6FB3BF5498B9B7305A8858B5B3DD0E28F1B0
7    40BA97D5864FCCD162F52BAAFC33BFAF9E08D1AE595EE8F035D1FC9723D4C9885F303B569645F4A1
8    D7A154B15E89AE86405632D90FD95D97C0908FBB7C8E2B8E88E1D631265FBD4003BC6E8AEFBDFEF8


The DSM-X channel hopping algorithm was found by Alexandr Alexandrov and Sergey Gimaev.

Channel hopping
DSM-X uses a 23-channel hopping sequence.The sequence is based upon a unique Tx ID.

The channel hopping algorithm uses an LSR and is computed as follows.
id_tmp = ID = negate(CYRF MFGID + model #)
foreach idx in (0 .. 22):
ok = 0
while(ok is 0):
   id_tmp = id_tmp * 0x0019660D + 0x3C6EF35F   ## Randomization
   next_ch = ((id_tmp >> 8) MODULO 0x49) + 3      ## Use least-significant byte and must be larger than 3
   if (next_ch is odd and ID is odd OR next_ch is even and ID is even)
       AND none of the values in the 'ch' array are equal to next_ch:
         if 3 <= tmp < 28 and the number of channels in ch that are between 3 and 28 is < 8
         OR 28 <= tmp < 52 and the number of channels in ch that are between 28 and 52 is < 7
         OR 53 <= tmp and the number of channels in ch that are greater than 53 is < 8:
               ok = 1
ch = next_ch

xukkkkkk 发表于 2013-8-30 11:56:49

可以开发很多的东西来着 硬件也就260块钱

Hisen-lv 发表于 2013-8-30 11:58:48

表示看不懂啊

WUST_LJS 发表于 2013-9-27 20:32:42

我最近刚把个 新的DEVO7拆了, 换了自己的主控板STM32F103+24L01(PA)+2.8寸TFT,都调通了界面还没写。
DEVO7的主控全新的,有感兴趣的可以联系我。

ANDR0ID 发表于 2013-9-27 20:34:29

这个遥控器有什么优点么?和其他同类型的相比。

xukkkkkk 发表于 2013-10-3 09:46:02

ANDR0ID 发表于 2013-9-27 20:34 static/image/common/back.gif
这个遥控器有什么优点么?和其他同类型的相比。

便宜 开源 功能强大, 破解的几乎全部主流协议参数配置U盘 文件形式

define_avr 发表于 2013-10-9 14:35:16

WUST_LJS 发表于 2013-9-27 20:32 static/image/common/back.gif
我最近刚把个 新的DEVO7拆了, 换了自己的主控板STM32F103+24L01(PA)+2.8寸TFT,都调通了界面还没写。
DEVO ...

我正打算这么干,刚买了个7E和RX601。

WUST_LJS 发表于 2013-10-10 19:25:54

define_avr 发表于 2013-10-9 14:35 static/image/common/back.gif
我正打算这么干,刚买了个7E和RX601。

我是用来控制自己的四轴,所以用24L01 ,可以拿数据和调试。
DEVO7操作起来太舒服了。 哈哈。 等最近忙结束了 晒晒控~   
问题是我 DEVO7 原装的主板 闲置了, 想找个有需要的 主儿 ~ 呵呵。

adszmc 发表于 2014-2-8 11:25:29

求原理图啊
当个伸手党

mazhenyu 发表于 2014-2-8 12:54:00

一般支持dsm2的高频头用的是什么芯片

godfooker_back 发表于 2014-2-8 13:28:04

比较好奇,等等更多资料

yat 发表于 2014-12-2 14:25:03

MARK开源的遥控器

默默七 发表于 2014-12-6 16:24:02

mark下,基于dev7的开源遥控器

YangFangLR2 发表于 2014-12-6 17:47:18

从哪能找到遥控器的外壳?不想买一个来拆,太浪费了。

xukkkkkk 发表于 2014-12-16 19:39:59

YangFangLR2 发表于 2014-12-6 17:47
从哪能找到遥控器的外壳?不想买一个来拆,太浪费了。

200块STM3212864的屏 带赛普拉斯的无线芯片,不算贵吧

sctwp 发表于 2014-12-16 21:04:14

现在那个网站的资料找不到

feikong 发表于 2015-1-21 11:37:54

赞,顶楼主         
页: [1]
查看完整版本: 介绍下开源的遥控器