DSMX channels list for Frequency Shift Hopping

More
14 Dec 2012 04:36 #3991 by vlad_vy
From RW9UAO (Sergey Gimaev)
#include <stdio.h>
/*
  DSMX channels list for Frequency Shift Hopping
  math by Alexandr Alexandrov
  code by Sergey Gimaev
  some function (like RadioSetFrequency) from Cypress old assember lib for CYRF transivers
  they used in OrangeRX DSM2 6 channel and AR6110 clone receiver
*/

int main(void){
unsigned int manufacturerID = 0x92C65809;//inverted 0x6D39A7F6;
// manufacturerID - this is that we see in the first 4 bytes of BIND packet
unsigned int calc;
unsigned int channel;
int c = 0, k, part1 = 8, part2 = 7, part3 = 8, flag = 0;
unsigned char channel_list[23];

    for(k = 0; k < 23; k++){
        channel_list[k] = 0xFF; //init channel list
    }

    calc = manufacturerID; //init randomize function
    do{
        calc *= 0x0019660D; //randomize function
        calc += 0x3C6EF35F; //from wiki, liniux, gcc, etc

        channel = calc >> 8;
        channel = channel % 0x49;

/* 1. If the 4-th byte of ManufacturerID - is even ("0" in the low-bit), then the channel
should be even (or odd channel for odd 4-th byte of ManufacturerID).
If it's not - continue (generate at calc the next number.) */
//i need to compare last bit in manufacturerID and last bit in channel for both even/odd

        if((unsigned char)(channel & 1) == (unsigned char)(manufacturerID & 1)){

/* 2. If the channel matches with any of the already obtained channel numbers
in the array, then continue */

            for(k = 0; k < 23; k++){
                if(channel_list[k] == (channel + 3)){flag = 1; k = 0xFF;}
                else    flag = 0;
            }
            if(flag == 0){
                flag = 1;

/* 3. Check to which subband the channel is related (0 .. 24, 25 .. 48 or 49 .. 72).
At the beginning of the work - set 3 counters (for each sub-band) and set them to 8, 7 and 8
(7 - at the counter for subband 25 .. 48). In which sub-band is channel - check to see 
if counter is not equal 0. If it's equal 0 - continue */
                if(channel < 25){
                    if(part1){
                        part1--;
                        flag = 0;
                    }
                }else{
                    if(channel < 49){
                        if(part2){
                            part2--;
                            flag = 0;
                        }
                    }else {
                        if(part3){
                            part3--;
                            flag = 0;
                        }
                    }
                }
                if(flag == 0){
/* Procedure returns, then add to that the 4 (as opposed to 2 for DSM2),
and with it will call RadioSetFrequency, which will subtract another 1, and will write it to the transceiver. */
//i don`t use Cypress lib, write my self to CYRF. therefore i need +3
                    channel_list[c] = channel + 3; //therefore +3
                    printf ("0x%.2x ", channel + 3);
                    c++;
                }
            }
        }

    }while(c < 23);
    return 7;
}

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

More
18 Dec 2012 05:14 - 18 Dec 2012 05:15 #4072 by vlad_vy
FDR,
it's all that related DSMX from RW9UAO and russian forum. All other messages related to telemetry.

"There is a point at dsmx unlike dsm2.
Packet is transmitted, after 4ms the second packet, the third packet after 7ms. I.e. at any case, within 11ms transmitted 8 channels. For another 11ms transmitted duplicate (dsmx 22ms), or new value. With 11-bit resolution."

"If the connection is lost, timing is similar, for except that there is no reception, and after timeout the channel is changing. But if in the receive mode the channel is taken from the list (in order), when the connection is lost: starts some cross-sampling. For simplicity I see two options - to stand on the same channel and wait, it will take roughly 23 * 7 = 160ms. Or to move in the opposite direction through the channel list. According to estimations, in the worst cases we get lost connection (with failsafe) on a half a second. This is too much."
Last edit: 18 Dec 2012 05:15 by vlad_vy.

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

More
18 Dec 2012 05:15 #4073 by PhracturedBlue
Replied by PhracturedBlue on topic DSMX channels list for Frequency Shift Hopping
I've implemented DSMX now.
I've tested with my AR6210 on 7ch and 6ch modes. 8ch modes don't work with this Rx though, so I can't verify those.

I'd certainly appreciate additional input on how it works for others though.

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

More
18 Dec 2012 13:52 - 18 Dec 2012 14:16 #4079 by vlad_vy
With AR6210 (DSMX), 6 and 7 channel mode, DSMX working fine. If I shutdown Tx and power on - quick rebind and working (solid amber LEDs, red LED periodically flashing). If I shutdown Rx and power on - quick rebind and working (solid amber LEDs).

One funny thing - if I change mode to 4 channel and rebind (and reboot), as before work all 6 channel, 5 and 6 channels work with earlier programmed mixes.

With RD921 (DSM2), as expected, DSMX doesn't bind, doesn't work.
Last edit: 18 Dec 2012 14:16 by vlad_vy.

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

More
18 Dec 2012 13:58 #4080 by PhracturedBlue
Replied by PhracturedBlue on topic DSMX channels list for Frequency Shift Hopping
I don't recall the discussion on the RD921. Have you tried different channel orderings? Also, can we take dsm2 discussion back to the dsm2 thread?

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

More
18 Dec 2012 14:00 - 18 Dec 2012 14:05 #4081 by vlad_vy
I'm tried bind RD921 at DSMX mode. All working as expected. Nice work!
Last edit: 18 Dec 2012 14:05 by vlad_vy.

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

More
18 Dec 2012 14:57 #4089 by vlad_vy
With Blade mQX, 6 channel mode, DSMX works fine. Successful flight without any problems.

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

More
18 Dec 2012 17:11 #4092 by Hexperience
Replied by Hexperience on topic DSMX channels list for Frequency Shift Hopping
Do we know for sure that it's using dsmx and not dsm2? If we select dmsx as the protocol, would it fall back to dsm2 if dsmx doesn't bind?

Cheers, and congrats! 2.1 is fantastic!

There are 10 types of people in this world. Those that understand binary and those that don't.

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

More
18 Dec 2012 17:27 - 18 Dec 2012 17:29 #4093 by vlad_vy
In my case DSM2 receiver doesn't bind at DSMX mode. At any case, you can find out DSM2/DSMX mode of receiver by power off and power on the receiver, if LEDs flashing (brownout detection) = DSM2, if LEDs solid = DSMX.
Last edit: 18 Dec 2012 17:29 by vlad_vy.

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

More
18 Dec 2012 17:46 #4094 by Hexperience
Replied by Hexperience on topic DSMX channels list for Frequency Shift Hopping
Perfect, thanks!

There are 10 types of people in this world. Those that understand binary and those that don't.

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

More
18 Dec 2012 18:56 #4096 by coaster
can someone provide a bulid with DSMX, so i can test
and compare with DSX8.

thanks in advance !


cheers
Graziano

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

More
18 Dec 2012 19:05 #4098 by FDR

coaster wrote: can someone provide a bulid with DSMX, so i can test
and compare with DSX8.

thanks in advance !


cheers
Graziano


Here you are:
www.deviationtx.com/forum/builds/1178-po...th-dsmx-support#4097

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

More
18 Dec 2012 19:30 #4099 by coaster
thanks a lot!, will test asap

cheers
Graziano

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

More
19 Dec 2012 04:19 #4110 by coaster
DSMX tested with Blade 130x and Blade mCPx (only indoor)
had no issues, the flight feeling is like with the DX8 (with the same settings on both TX).

i guess the binding is faster then with the DSM2 protocol.

Great work !

cheers
Graziano

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

More
19 Dec 2012 05:09 #4113 by Hexperience
Replied by Hexperience on topic DSMX channels list for Frequency Shift Hopping
Is that an mcpx v2? I thought the mcpx was dsm2 only.

There are 10 types of people in this world. Those that understand binary and those that don't.

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

More
19 Dec 2012 05:18 #4114 by coaster
yes that is the mcpx v2, the DX8 shows me DSMX after binding.

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

More
19 Dec 2012 13:33 #4120 by vlad_vy
Spektrum AR8000, 8 and 9 channels, DSMX works fine. As a swiss clock.

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

More
19 Dec 2012 20:47 #4130 by Joshua
Today i tested my Blades with the following results:
(devo8_21cd8c1)

1: mcx DSM2 ok, DSMX no, normal because only DSM2 is supported
2: msr DSM2 ok, DSMX no, normal because only DSM2 is supported
3: 120SR DSM2 ok, DSMX no, normal because only DSM2 is supported
4: msrx DSM2 ok, DSMX no, ?
5: MQX DSM2 ok, DSMX ok
6: mcpx1 DSM2 ok, DSMX no ?
7: mcpx2 DSM2 ok, DSMX no, ?
8: Nano CP X DSM2 ok, DSMX ok
9: Blade 130 X DSM2 ok, DSMX ok

ciao, Bernd

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

More
20 Dec 2012 05:16 - 20 Dec 2012 05:17 #4134 by vlad_vy
Can you confirm that these helis connect at DSMX mode with Spektrum Tx?

4: msrx DSM2 ok, DSMX no, ? possible DSM2?
6: mcpx1 DSM2 ok, DSMX no ? only mCPX v2 has DSMX support
7: mcpx2 DSM2 ok, DSMX no ? only mCPX v2 has DSMX support
Last edit: 20 Dec 2012 05:17 by vlad_vy.

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

More
20 Dec 2012 16:09 #4138 by Joshua
I am not sure, because i have only a DX6i for testing and
can only select Auto-DSMX mode.

ciao, Bernd

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

Time to create page: 0.072 seconds
Powered by Kunena Forum