Support for walkera telemetry.

More
23 Apr 2015 13:07 #31523 by Indigo
Replied by Indigo on topic Support for walkera telemetry.
Thanks, new version 1eeade9 has been uploaded to Test Builds.

Source

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

More
23 Apr 2015 13:29 #31525 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
With telemetry enabled connection lost and restored every 1 second. With telemetry disabled seems it work.

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

More
23 Apr 2015 13:48 - 26 Apr 2015 09:04 #31526 by linux-user
Replied by linux-user on topic Support for walkera telemetry.

Indigo wrote: Thanks, new version 1eeade9 has been uploaded to Test Builds.

basically working.
- telemetry OK

Feeling: (Not very scientific)
compared to "my reference" deviation-devo10-v4.0.1-db5dcb3 from 2015-03-30:
When walking around in my house
- there is noticeable latency at some distance (behind a corner)
- edit: one could see RX blinking

Update:
connection lost, but no hint in the debug page
Last edit: 26 Apr 2015 09:04 by linux-user.

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

More
23 Apr 2015 15:20 - 23 Apr 2015 16:55 #31531 by Indigo
Replied by Indigo on topic Support for walkera telemetry.
Thanks, new version 0ac6c2b has been uploaded to Test Builds.

Test: Devo still working? Latitude and longitude working? Fly better using CYRF_29_RX_ABORT?

Source
Last edit: 23 Apr 2015 16:55 by Indigo.

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

More
23 Apr 2015 16:12 - 23 Apr 2015 16:13 #31537 by linux-user
Replied by linux-user on topic Support for walkera telemetry.

Indigo wrote: Thanks, new version 0ac6c2b has been uploaded to Test Builds.

- No telemetry (inverted on Devo10)
- RX blinking at 5m distance (3mW power)
Last edit: 23 Apr 2015 16:13 by linux-user.

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

More
23 Apr 2015 17:06 - 30 Apr 2015 05:34 #31539 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
Too many changes. At least, I think CYRF_EndReceive() will not work with such code, we need have some delay after CYRF_WriteRegister(CYRF_0F_XACT_CFG, 0x28). I used for that original CYRF_SetTxRxMode() that has inbuilt delay.

CYRF_EndReceive() for Devo protocol will work for TxState = 15, but not for
        if (CYRF_ReadDataPacketLen(packet, 0x10)) {
            parse_telemetry_packet(packet);
            delay = 100 * (16 - txState);
            txState = 15;
        }
it will be skipped. Probably it's OK, but I'm not sure. Reception has not any abort, even by CYRF_SetTxRxMode().

My latest test code for nightly build works fine, at least I don't see problems with my Devo 8s..
Last edit: 30 Apr 2015 05:34 by vlad_vy.

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

More
23 Apr 2015 18:00 #31540 by linux-user
Replied by linux-user on topic Support for walkera telemetry.
deviation-devo10-v4.0.1-d63509f
- telemetry seems to work
- RX blinking at 5m distance (3mW power)

deviation-devo10-v4.0.1-db5dcb3 from 2015-03-30 did not have this issue.

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

More
24 Apr 2015 01:39 #31555 by Indigo
Replied by Indigo on topic Support for walkera telemetry.
Ok, new version 7080884 has been uploaded to Test Builds.

7080884 = db5dcb3 from 2015-03-30 merged with latest and a fix for alarm re-arming.

Source

vlad_vy - please tell me Latitude and Longitude are fixed.

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

More
24 Apr 2015 07:38 - 24 Apr 2015 07:38 #31558 by linux-user
Replied by linux-user on topic Support for walkera telemetry.
deviation-devo10-v4.0.1-7080884 seems to work for me.
I would expect that I should see "RST CYRF" message in debug page after some hours?
Last edit: 24 Apr 2015 07:38 by linux-user.

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

More
24 Apr 2015 08:27 #31559 by Indigo
Replied by Indigo on topic Support for walkera telemetry.
Yes, "Rst CYRF" message is included.

Update: I have merged with latest version of trunk and uploaded new version 32729dd to Test Builds.
Continuing to testing with 7080884 is fine, nothing has changed only code tidy up: renamed some variables.

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

More
24 Apr 2015 09:26 - 24 Apr 2015 09:28 #31562 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
It's interesting thing, we have different results with one protocol. Build 32729dd, Devo 8s and Ladybird:
1) Telemetry ON, power on Ladybird, no connection al all, LED flashing fast.
2) Telemetry OFF -> power on Ladybird -> Ladybird connect -> telemetry ON -> Ladybird remains connected. It's a miracle !!!

With build 7080884 I had the same thing.
Last edit: 24 Apr 2015 09:28 by vlad_vy.

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

More
24 Apr 2015 11:59 - 24 Apr 2015 12:00 #31563 by Indigo
Replied by Indigo on topic Support for walkera telemetry.
Thanks, for testing and reporting problem.
During merged with trunk, I tried to reorder my code to be more like the trunk version but in doing so I had broke functionality.
It has now been corrected and existing commits replaced.

New version 5c7cca6 has been uploaded to Test Builds.

The Devo protocol code has now changed so LOC testing should be restarted using new version.
Last edit: 24 Apr 2015 12:00 by Indigo.

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

More
24 Apr 2015 12:43 - 24 Apr 2015 12:44 #31564 by linux-user
Replied by linux-user on topic Support for walkera telemetry.
version 5c7cca6
quick testing looks good, nothing unusual detected yet.
Last edit: 24 Apr 2015 12:44 by linux-user.

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

More
24 Apr 2015 14:49 - 24 Apr 2015 16:57 #31570 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
Except for auto bind doesn't work. Connection work for Fixed ID only. Linux-user, can you test it?

GPS Speed is permanent with red background. Nightly build has variable Speed value.

It seems that ReadRegisterMulti(CYRF_21_RX_BUFFER, NULL, length) is dangerous, at my case it cause Tx reboot. I changed it back to CYRF_ReadRegister(CYRF_21_RX_BUFFER).

        // else empty buffer: dummy read all received bytes
        if (length)
            ReadRegisterMulti(CYRF_21_RX_BUFFER, NULL, length);
        // else empty buffer: dummy read all received bytes
        while (length) {
            CYRF_ReadRegister(CYRF_21_RX_BUFFER);
            length--;
        }
Last edit: 24 Apr 2015 16:57 by vlad_vy.

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

More
24 Apr 2015 17:24 - 24 Apr 2015 17:27 #31578 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
Changed devo_cb(), now it works with auto bind (without Fixed ID).
static u16 devo_cb()
{
    int delay = 100;
    if (txState == 0) {
        DEVO_BuildPacket();
        CYRF_WriteDataPacket(packet);
        delay = 900;
    } else if (txState == 1) {
        int i = 0;
        u8 reg;
        while ( !((reg = CYRF_ReadRegister(0x04)) & 0x02)) {
            if (++i >= NUM_WAIT_LOOPS)
                break;
        }
        if (((reg & 0x22) == 0x20) || (CYRF_ReadRegister(0x02) & 0x80)) {
     	    CYRF_Reset();
            cyrf_init();
            cyrf_set_bound_sop_code();
            CYRF_ConfigRFChannel(*radio_ch_ptr);
            //printf("Rst CYRF\n");
            delay = 1500;
            txState = 15;
        } else {
            if (state == DEVO_BOUND) {
                /* exit binding state */
                state = DEVO_BOUND_3;
                cyrf_set_bound_sop_code();
            }
            if(pkt_num == 0 || bind_counter > 0) {
                delay = 1500;
                txState = 15;
            } else {
                if (Model.proto_opts[PROTOOPTS_TELEMETRY] == TELEM_ON) {
                    CYRF_SetTxRxMode(RX_EN); //Receive mode
                    CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x80); //Prepare to receive (do not enable any IRQ)
                    delay = 900;
                    txState = 9;
                } else {
                     delay = 1500;
                     txState = 15;
                }
            }
        }
    } else if (txState < 15) {
    txState++;
    if(txState == 16) { //2.3msec have passed
        CYRF_SetTxRxMode(TX_EN); //Write mode
        if(pkt_num == 0) {
            //Keep tx power updated
            CYRF_WriteRegister(CYRF_03_TX_CFG, 0x08 | Model.tx_power);
            radio_ch_ptr = radio_ch_ptr == &radio_ch[2] ? radio_ch : radio_ch_ptr + 1;
            CYRF_ConfigRFChannel(*radio_ch_ptr);
        }
        txState = 0;
    }
    return delay;
}
Last edit: 24 Apr 2015 17:27 by vlad_vy.

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

More
24 Apr 2015 17:56 - 24 Apr 2015 18:01 #31579 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
Indigo, why we need at dsm2_cyrf6936.c CYRF_ReadDataPacketLen(NULL, 0x00) ??? I think CYRF_ReadDataPacketLen(telem_pkt, 0x10) perform buffer clean-up in case any error.

     } else if(state == DSM2_CH2_READ_A || state == DSM2_CH2_READ_B) {
        //Read telemetry if needed and parse if good
        if (CYRF_ReadDataPacketLen(telem_pkt, 0x10))
            parse_telemetry_packet(telem_pkt);
        else
            CYRF_ReadDataPacketLen(NULL, 0x00);
Last edit: 24 Apr 2015 18:01 by vlad_vy.

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

More
24 Apr 2015 18:20 - 25 Apr 2015 14:08 #31580 by linux-user
Replied by linux-user on topic Support for walkera telemetry.

vlad_vy wrote: Except for auto bind doesn't work. Connection work for Fixed ID only. Linux-user, can you test it?

Uhh, I haven't used auto bind for a long time.
All my RX have fixed ID, and I don't want to use this tiny little "bind" plugs too often.
So I tried with V120D02s which has a known bug, that lets it bind with auto bind even if it has set a fixed ID

Well 5c7cca6 binds with V120D02s in auto bind mode.
So I can't confirm right now, although it may be different with other RX.

Edit:
another test:
- Bound V12D02S to Devo7 in auto bind mode
- Than tried to bind V12D02S with Devo10 5c7cca6
=> Confirmed 5c7cca6 does not bind any more.
- with nightly 2015-04-24 51825fc auto binding is working
Last edit: 25 Apr 2015 14:08 by linux-user. Reason: confirmed: autobind not working

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

More
24 Apr 2015 18:47 - 24 Apr 2015 18:49 #31581 by vlad_vy
Replied by vlad_vy on topic Support for walkera telemetry.
V120D02s can't use arbitrary Fixed ID, it can use auto bind ID as Fixed ID only, so it doesn't confirm anything.
Last edit: 24 Apr 2015 18:49 by vlad_vy.

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

More
24 Apr 2015 20:18 #31582 by Indigo
Replied by Indigo on topic Support for walkera telemetry.

vlad_vy wrote: Indigo, why we need at dsm2_cyrf6936.c CYRF_ReadDataPacketLen(NULL, 0x00) ??? I think CYRF_ReadDataPacketLen(telem_pkt, 0x10) perform buffer clean-up in case any error.

     } else if(state == DSM2_CH2_READ_A || state == DSM2_CH2_READ_B) {
        //Read telemetry if needed and parse if good
        if (CYRF_ReadDataPacketLen(telem_pkt, 0x10))
            parse_telemetry_packet(telem_pkt);
        else
            CYRF_ReadDataPacketLen(NULL, 0x00);


CYRF_ReadDataPacketLen(telem_pkt, 0x10) will only perform buffer clean-up when receive is complete. The reason for that is because Devo protocol calls it multiple times (every 100us until packet received). When called with a length of zero buffer clean-up is forced, which will only go ahead if RX_COUNT is not zero. However, I read that there is a problem "Count must not be read when RX_GO=1" so I will rewrite it to use 07_RX_IRQ_STATUS instead.

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

More
25 Apr 2015 03:37 #31586 by Indigo
Replied by Indigo on topic Support for walkera telemetry.
Thanks for testing :)

New version a9e60ff with the following bug fixes:
  • fix Devo binding (keep it simple)
  • fix CYRF_ReadDataPacketLen(pkt, len):
    • do not read RX_COUNT if still receiving
    • use CYRF_ReadDataPacketLen(NULL, 0x00) for buffer clean-up
    • do not clean-up buffer if empty or still receiving
  • fix display of Frysky velocity
  • fix DSM Latitude and Longitude
  • try to fix display of Devo velocity
  • fix "automatically show telemetry alarm value" to only do so for visible telemetry values

Source

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

Time to create page: 0.096 seconds
Powered by Kunena Forum