Support for walkera telemetry.

More
01 Apr 2015 14:07 - 01 Apr 2015 14:38 #30614 by aMax
Replied by aMax on topic Support for walkera telemetry.

Devo7e, TaranisQ X7, R9M , 4in1 MM, Futaba FC18plusV3.2 & DFT/FLD-02
Last edit: 01 Apr 2015 14:38 by aMax.

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

More
01 Apr 2015 17:21 #30631 by PhracturedBlue
Replied by PhracturedBlue on topic Support for walkera telemetry.
getting off topic here now. It looks like the UP02 may be wired in reverse for rx/tx. Not really sure, but I'll see what happens if I reverse the tip and 1st ring (If you one available, short the tip and ring and see if you can use a terminal app (putty) to type and see what you enter..) Otherwise, I recommend spending a couple bucks and getting something like this:
www.ebay.com/itm/USB-2-0-to-UART-TTL-6PI...&hash=item339aeeb9e8

I'll just use a file to capture logs. I think we're still waiting on Indigo for a new build with his latest fix? After that, I'll add in some additional logging info.

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

More
01 Apr 2015 23:01 #30645 by Indigo
Replied by Indigo on topic Support for walkera telemetry.

PhracturedBlue wrote: I think we're still waiting on Indigo for a new build with his latest fix?


My latest code is available here .

I'm trying to work out how to gracefully end receive mode and force when required.

Please feel free to make any coding suggestions.

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

More
02 Apr 2015 07:28 - 02 Apr 2015 08:16 #30677 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
Once again I will return to CYRF_SetTxRxMode()
/*
 * 1 - Tx else Rx
 */
void CYRF_SetTxRxMode(enum TXRX_State mode)
{
    //Set the post tx/rx state
    CYRF_WriteRegister(0x0F, mode == TX_EN ? 0x2C : 0x28);
#if HAS_MULTIMOD_SUPPORT
    if (MODULE_ENABLE[CYRF6936].port == 0xFFFFFFFF) {
        if ((MODULE_ENABLE[CYRF6936].pin >> 8) == 0x01) {
            AWA24S_SetTxRxMode(mode);
            return;
        }
        if ((MODULE_ENABLE[CYRF6936].pin >> 8) == 0x02) {
            BUYCHINA_SetTxRxMode(mode);
            return;
        }
    }
#endif
    if(mode == TX_EN) {
        CYRF_WriteRegister(0x0E,0x80);
    } else {
        CYRF_WriteRegister(0x0E,0x20);
    }
}

I don't understand how it possible:
CYRF_WriteRegister(0x0F, mode == TX_EN ? 0x2C : 0x28);

I reviewed several implementations of DSM2/X protocols and as I can see they use:
CYRF_WriteRegister(0x0F, mode == TX_EN ? 0x28 : 0x2C);
CYRF_MODE_SYNTH_TX = (0x2 <<2),
CYRF_MODE_SYNTH_RX = (0x3 <<2),

How it can work with exchanged TX and RX in Deviation???

Probably I incorrectly understand how work code "mode == TX_EN ? 0x2C : 0x28".

But, very old code do the same thing:
/*
 * 1 - Tx else Rx
 */
void CYRF_ConfigRxTx(u32 TxRx)
{
    if(TxRx)
    {
        CYRF_WriteRegister(0x0E,0x80);
        CYRF_WriteRegister(0x0F,0x2C);
    }
    else
    {
        CYRF_WriteRegister(0x0E,0x20);
        CYRF_WriteRegister(0x0F,0x28);
    }
}
Last edit: 02 Apr 2015 08:16 by vlad_vy.

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

More
02 Apr 2015 13:21 - 02 Apr 2015 13:33 #30689 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
Tested build with CYRF_WriteRegister(0x0F, mode == TX_EN ? 0x28 : 0x2C);

Nothing changed, at least for Devo protocol. All work fine.
Last edit: 02 Apr 2015 13:33 by vlad_vy.

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

More
02 Apr 2015 19:31 - 02 Apr 2015 19:33 #30705 by PhracturedBlue
Replied by PhracturedBlue on topic Support for walkera telemetry.
I don't know why it is that way. perhaps because 'synth mode' is just about stabilizing the frequency after changing the channel. I double checked captures from a real devo8, and it definitely works as we've coded it.
I checked my dsm2/x logs and it is a mixed bag. Some radios use 2c for Tx, others don't' use 0x0f for forcing mode, and only use mode 0x24 (idle mode). I wouldn't be surprised if we could get rid of the mode 0x0f setting altogether.
Last edit: 02 Apr 2015 19:33 by PhracturedBlue.

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

More
03 Apr 2015 03:53 #30727 by PhracturedBlue
Replied by PhracturedBlue on topic Support for walkera telemetry.
FYI, I hooked up my logic analyzer to my UP02 and I can't get it to wiggle at all in linux using a term. There may be some magic keys sent to it to activate it or something, but regardless, it is out for now as a debug hook

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

More
03 Apr 2015 06:17 - 03 Apr 2015 06:26 #30732 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
What is the difference between "Synth Mode (TX)" and "Synth Mode (RX)" of CYRF6936?

In Synth Mode (TX), the synthesizer is settled to the channel frequency and the time for which it will remain in this state the synthesizer will remain tuned to this frequency. If we switch to the sleep state then the synthesizer will be switched OFF and it needs to be settled down again before transmitting.

Synth Mode (RX) is used when we are using the different frequency for transmission and reception. Before switching to the Receive mode device will switch to the Synth Mode (RX). In this the synthesizer will tune to the frequency required. Once the frequency is tuned to the Receive Frequency then the device will switch to Receive mode for reception of data, whenever required. Thus, eliminating the delay required to switch the frequency from transmit to receive.



What is the difference between "idle mode" and "RX mode" of CYRF6936?

In Idle mode the oscillator, SPI and PMU are running and it won't be receiving or transmitting. But in RX mode the oscillator, SPI, and PMU are running along with the synthesizer In this mode the device will be in the reception state. The power consumption in this mode will be more than the Idle mode.
Last edit: 03 Apr 2015 06:26 by vlad_vy.

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

More
03 Apr 2015 07:45 #30733 by linux-user
Replied by linux-user on topic Support for walkera telemetry.

PhracturedBlue wrote: FYI, I hooked up my logic analyzer to my UP02 and I can't get it to wiggle at all in linux using a term.

Thank you for your effort.
I've ordered a "CP2102 USB 2.0 zu TTL UART Module 6 pin converter".
Together with UP02_adapter and a standard 3,5mm audio cable this should give us a "plug and play" solution for logging.

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

More
04 Apr 2015 12:07 - 04 Apr 2015 12:14 #30783 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
PB, I don't quite understand from reading devo documentation about telemetry packets.

"Telemetry data is transmitted as 2 16 byte packets. Packets are sent every 2.4msec. They are processed between data packets."

What does it mean? Two telemetry packets can be received in 2.4msec, after data packet?
Last edit: 04 Apr 2015 12:14 by vlad_vy.

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

More
04 Apr 2015 15:24 #30787 by PhracturedBlue
Replied by PhracturedBlue on topic Support for walkera telemetry.
No, data packets are sent every 2.4msec from the tx to the rx.
data packets are also received every 2.4msec from the rx to the tx

After sending the transmit command for a data packet, the transmitter waits 700us, then starts checking for tx completeion (Reg04). It will poll Reg04 every 10us until tx completes, then switches to Rx mode. this usually happens about 950us after a packet is transmitted. Then the transmitter will look for data received. It polls Reg07 every 200us until a packets is available, at which point it is read.

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

More
05 Apr 2015 08:06 - 05 Apr 2015 08:13 #30804 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
Latest Indigo build 36cce5c - Devo telemetry is ON, I can see Rx voltage on Main screen, but Telemetry Monitor screen says 'Telemetry is off' (Devo 8s).
Last edit: 05 Apr 2015 08:13 by vlad_vy.

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

More
05 Apr 2015 10:26 #30806 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.

vlad_vy wrote: Tested build with CYRF_WriteRegister(0x0F, mode == TX_EN ? 0x28 : 0x2C);

Nothing changed, at least for Devo protocol. All work fine.


DSM2/X protocol also work fine.

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

More
05 Apr 2015 15:14 - 05 Apr 2015 15:16 #30807 by Indigo
Replied by Indigo on topic Support for walkera telemetry.

vlad_vy wrote: Latest Indigo build 36cce5c - Devo telemetry is ON, I can see Rx voltage on Main screen, but Telemetry Monitor screen says 'Telemetry is off' (Devo 8s).


Try build 5c8744e
Last edit: 05 Apr 2015 15:16 by Indigo. Reason: Added link to downloads

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

More
05 Apr 2015 21:39 #30813 by linux-user
Replied by linux-user on topic Support for walkera telemetry.

Indigo wrote: Try build 5c8744e

Got disconnected with Devo10 and telemetry ON

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

More
06 Apr 2015 04:46 - 06 Apr 2015 04:51 #30826 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
I can't reproduce disconnect even with older builds, 36 hours with telemetry ON and Ladybird connect as usual (Devo 8s). But couple times I had lost of connection in flights.
Last edit: 06 Apr 2015 04:51 by vlad_vy.

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

More
06 Apr 2015 05:37 #30828 by vlad_vy

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

More
06 Apr 2015 05:54 #30829 by Indigo
Replied by Indigo on topic Support for walkera telemetry.

vlad_vy wrote: Examples:

read.pudn.com/downloads139/doc/597220/CY...orial_1/main.c__.htm


Excellent :) :) :)

Great find, thank you.

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

More
06 Apr 2015 06:06 #30830 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
I think we need

MyRadioAbort(RxState); // Stop the receive operation

before transmit, just in case.

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

More
06 Apr 2015 07:30 #30832 by Indigo
Replied by Indigo on topic Support for walkera telemetry.
I agree. When testing near the edge of reception area, there is something which is causing a loss of binding.

It's getting late here, so I won't start work on this until tomorrow.
I should have a new version within 24hrs. :)

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

Time to create page: 0.099 seconds
Powered by Kunena Forum