HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Oct 01, 2013, 06:42 AM
Registered User
Joined Mar 2011
199 Posts
shame really...
Would love to crack my DSM2 Rxs to get RSSI out and upgrade to DSMx. although Im not really sure of the benefit uinless your are flying around other 2.4GHz sources, which isnt typically my case..
Sp1k3 is offline Find More Posts by Sp1k3
Reply With Quote
Sign up now
to remove ads between posts
Old Oct 01, 2013, 10:01 PM
Registered User
Imho's Avatar
Hobart, Tasmania.
Joined Jan 2005
115 Posts
I'm working on a similar project, so there may be some hope of breathing some life back into this thread.
Imho is offline Find More Posts by Imho
Reply With Quote
Old Oct 02, 2013, 10:11 AM
Registered User
United States, NH, Exeter
Joined Oct 2010
99 Posts
Upgrading a DSM2 receiver to DSMX is not really possible unless you can somehow extract the existing program from the Cypress CY8C214 processor chip used in Spektrum receivers, disassemble it, modify it, then program the chip again. Or write your own DSM2/DSMX receiver program and use that. Good luck with that.

An RSSI value is available on the SPI bus between the CPU and the CYRF6936 RF chip. The CPU reads the value from the 6936 chip after every successful or unsuccessful receive attempt. The question is: how do you get a look at it? You can't assert control over the SPI bus without interfering with the normal SPI traffic between the CPU and 6936 chip. Or you could just monitor the SPI traffic and watch for the bytes that represent the RSSI value. In either case you will need to physically tap into the SPI bus. You'll need some good soldering skills to attach small wires to the appropriate pins/PCB traces to gain access and another processor with an SPI interface to monitor/control the SPI comms.

Not saying it can't be done but is it worth it? If you really want to give it a shot, I'll help you out with the 2 attached files. You will need to download and install Salaea Logix software 1.1.15. You'll also need the data sheet for the CYRF6936 chip so you can decode the SPI bytes. Do a google search for the Unigen LETO-LPA module datasheet as the Cyress CYRF6936 datasheet does not give detailed register descriptions.
hammer22 is offline Find More Posts by hammer22
Reply With Quote
Old Oct 04, 2013, 02:48 PM
VTOL enthusiast
Joined Oct 2013
1 Posts
Hi all,

I also just captured a lot of DSM2/DSMX/Xplus serial data from between an AR9020 and 9645 satellites using a Saleae and put them up on the Paparazzi wiki. It might be most useful for users of that software since they tend to connect satellites directly to their autopilots but more data is usually good :-) TXes were DX7s and DX18, if there's any other data you want captured let me know. Keep up the good work!
jgibboney is offline Find More Posts by jgibboney
Reply With Quote
Old Oct 06, 2013, 06:08 PM
AndyKunz's Avatar
Illinois
Joined Sep 2001
24,025 Posts
We've been telling folks for a while to use the AR9020's X-Bus port instead of a single remote for a while. Glad to hear somebody was listening!

Andy
AndyKunz is online now Find More Posts by AndyKunz
Site Sponsor
Reply With Quote
Old Oct 24, 2013, 05:15 AM
Registered User
Joined Dec 2007
558 Posts
Quote:
Originally Posted by jgibboney View Post
serial data from between an AR9020 and 9645 satellites
TY for the capture.

I am attempting to figure our the X-channels protocol. That is the additional channels, not the 12 basic channels. I dont understand in which way or how the X channels have been moved in your capture. I can see the throttle move in the middle of the sample, but the 12 first channels are well known and no problem to decode, the X-channels are new.

I would like another capture. 18 channels. All the X channels moved, one after the other. Only 1 sat is enough. You may also try to use the salae internal serial decoder, 115200 baud, rest stock. Gives a clean nice output file.
Cesco is online now Find More Posts by Cesco
Last edited by Cesco; Oct 24, 2013 at 05:41 AM.
Reply With Quote
Old Oct 25, 2013, 04:24 AM
Registered User
Joined Dec 2007
558 Posts
My best guess on the X-channels as they come from a sat:

Xchannel data is in the normal DSM SAT protocol declared as channel 12. This channel 12 has 11 bit data and is sent with every packet, not only every second like the other channels 0 to 11. The channel 12 data consists of:

dunno
Cesco is online now Find More Posts by Cesco
Last edited by Cesco; Oct 26, 2013 at 07:51 AM.
Reply With Quote
Old Oct 26, 2013, 07:52 AM
Registered User
Joined Dec 2007
558 Posts
I made some progress.

Channel numbers 0 to 11 are normal, 2048 resolution shift.
Channel 12 carries the xchannel data.

Channel transfer structure:
packet 1 -> 1 5 2 4 6 10 12
packet 2 -> 0 7 3 8 9 11 12

xchannel data format
DCCCCXXN NNNNNNNN

D=dummy
C=channel, always 12,
X=xchannel-number, low 2 bits
N=xchannel-data, 9 bits

xchannel data is 9 bit, 256 midpoint.
xval = (b1 & 0x01) * 256 + b2;

xchannel channel is a messup. its a 3 bit value split in half. This is tarded.
You have to know if your in first or second packet to read xcannel.

Andy, wouldnt it have been more simple to use channel 12 and then 13 and not something that will bite you back?
Cesco is online now Find More Posts by Cesco
Last edited by Cesco; Oct 27, 2013 at 05:47 AM.
Reply With Quote
Old Oct 27, 2013, 05:01 AM
Registered User
UK
Joined Aug 2000
1,082 Posts
Interesting. Do you know how an X-Channel receiver responds during binding?
Thanks, David.
David T is offline Find More Posts by David T
Reply With Quote
Old Oct 27, 2013, 05:06 AM
Registered User
UK
Joined Aug 2000
1,082 Posts
Does 'D' perhaps indicate packet 1/2?
dt.
David T is offline Find More Posts by David T
Reply With Quote
Old Oct 27, 2013, 05:46 AM
Registered User
Joined Dec 2007
558 Posts
Yes, D in the first channel of packet indicates packet 1 or 2.
Cesco is online now Find More Posts by Cesco
Reply With Quote
Old Oct 27, 2013, 05:53 AM
Registered User
UK
Joined Aug 2000
1,082 Posts
Great. So that makes the X-Chan number easier to determine?
dt.
David T is offline Find More Posts by David T
Reply With Quote
Old Oct 27, 2013, 06:14 AM
Registered User
Joined Dec 2007
558 Posts
This should do. Has been confirmed working on x-channels.
Code:
#include "board.h"
#include "mw.h"

// driver for spektrum satellite receiver / sbus using UART2 (freeing up more motor outputs for stuff)

#define SPEK_MAX_CHANNEL 10
#define SPEK_FRAME_SIZE 16
#define X_CHAN 12
static bool rcFrameComplete = false;
static bool spekHiRes = false;

static uint32_t spekChannelData[SPEK_MAX_CHANNEL];

static void spektrumDataReceive(uint16_t c);
static uint16_t spektrumReadRawRC(uint8_t chan);

// external vars (ugh)
extern int16_t failsafeCnt;

void spektrumInit(rcReadRawDataPtr *callback)
{
	uint8_t b;
	switch (mcfg.serialrx_type) {
        case SERIALRX_SPEKTRUM2048:
            // 11 bit frames
            spekHiRes = true;
            break;
        case SERIALRX_SPEKTRUM1024:
            // 10 bit frames
            spekHiRes = false;
            break;
    }

    for (b = 0; b < SPEK_MAX_CHANNEL; b ++)
      spekChannelData[b] = 512;

    core.rcvrport = uartOpen(USART2, spektrumDataReceive, 115200, MODE_RX);
    if (callback)
        *callback = spektrumReadRawRC;
}

struct x_dat
{
  unsigned int x_data    : 9;
  unsigned int x_chan_lo : 2;
  unsigned int chan      : 4;
  unsigned int dummy     : 1;
} __attribute__ ((__packed__));

struct dat_lo // 1024 resolution
{
  unsigned int data      : 10;
  unsigned int chan      : 4;
  unsigned int dummy     : 2;
} __attribute__ ((__packed__));

struct dat_hi // 2048 resolution
{
  unsigned int data      : 11;
  unsigned int chan      : 4;
  unsigned int dummy     : 1;
} __attribute__ ((__packed__));

typedef union
{
  uint8_t       in[SPEK_FRAME_SIZE];
  struct dat_lo chans_lo[SPEK_FRAME_SIZE/2];
  struct dat_hi chans_hi[SPEK_FRAME_SIZE/2];
  struct x_dat  x_chans[SPEK_FRAME_SIZE/2];
} spekMsg;

static spekMsg spekFrame;

const uint8_t endianness[16] = {1,0,3,2,5,4,7,6,9,8,11,10,13,12,15,14};
static uint16_t xValue[8] = {128, 128, 128, 128, 128, 128, 128, 128 };

// Receive ISR callback
static void spektrumDataReceive(uint16_t c)
{
    uint32_t spekTime;
    static uint32_t spekTimeLast, spekTimeInterval;
    static uint8_t  spekFramePosition;

    spekTime = micros();
    spekTimeInterval = spekTime - spekTimeLast;
    spekTimeLast = spekTime;
    if (spekTimeInterval > 5000)
        spekFramePosition = 0;
    spekFrame.in[endianness[spekFramePosition]] = c;
    if (spekFramePosition == SPEK_FRAME_SIZE - 1)
    {
    	rcFrameComplete = true;
        failsafeCnt = 0;   // clear FailSafe counter
    } else {
        spekFramePosition++;
    }
}

bool spektrumFrameComplete(void)
{
    return rcFrameComplete;
}

static uint16_t spektrumReadRawRC(uint8_t chan)
{
    uint16_t data;
    uint8_t b;

    if (rcFrameComplete) {
      for (b = 1; b < SPEK_FRAME_SIZE/2; b ++)
      {
    	if (spekHiRes)
    	{
          uint8_t spekChannel = spekFrame.chans_hi[b].chan;
          if (spekChannel < SPEK_MAX_CHANNEL)
        	  spekChannelData[spekChannel] = spekFrame.chans_hi[b].data >> 1;
          if (spekChannel == X_CHAN)
          {
            uint8_t xChannel = spekFrame.x_chans[b].x_chan_lo;
            if (spekFrame.chans_hi[1].dummy) xChannel += 4;
            xValue[xChannel] = spekFrame.x_chans[b].x_data;
          }
    	}
    	else
    	{
            uint8_t spekChannel = spekFrame.chans_lo[b].chan;
            if (spekChannel < SPEK_MAX_CHANNEL)
          	  spekChannelData[spekChannel] = spekFrame.chans_lo[b].data;
    	}
      }
      rcFrameComplete = false;

      debug[0] = xValue[0];
      debug[1] = xValue[1];
      debug[2] = xValue[2];

    }

    if (chan >= SPEK_MAX_CHANNEL) {
        data = mcfg.midrc;
    } else {
        data = 988 + spekChannelData[mcfg.rcmap[chan]];
    }

    return data;
}
Cesco is online now Find More Posts by Cesco
Last edited by Cesco; Oct 27, 2013 at 06:21 AM.
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Sold DSMX DX-8 and (2) DSMX Sats for Sale laughingstill Aircraft - General - Radio Equipment (FS/W) 3 Jan 20, 2012 11:24 AM
Wanted JR9503 DSMX or JR 11X DSMX and AR9200/AR9210 Receiver w/sats patrick21x Aircraft - General - Radio Equipment (FS/W) 0 Nov 17, 2011 10:22 PM
Discussion WALKERA 2.4 TX hack -can YOU hack it? aaronstomfoolery Radios 2 Oct 29, 2011 04:44 AM
Sold NNIB AR6210 DSMX w/sat + AR600 DSMX GeetarJoe Aircraft - General - Radio Equipment (FS/W) 0 Oct 19, 2011 01:50 AM