/dist/images/branding/favicon

Receiving Date Packets with Radio Controller

Discussion in 'MōVI Pro' started by Chong Kwan Lok, Jul 4, 2017.

  1. Chong Kwan Lok

    Chong Kwan Lok New Member

    Joined:
    Jul 4, 2017
    Messages:
    9
    Likes Received:
    0
    Hi all, I just bought my MōVI Pro yesterday and I am not very familiar the setting of the MōVI Pro at all. There is one question that might be seen silly is that how I can actually receive the data packets from the MōVI Pro? I went through the user manual and also the FreeflyAPI software documentation, it did not mention how can I receive the data packets from the MōVI Pro while using with a radio controller. For reference, I am using the R6303SB from Futaba as a receiver connected to COM2 and the model of my radio controller is also from Futaba. I tried to plug into different port of the receiver to see whether I can get the data packets from the MōVI Pro but failed. Do I need to connect the wires COM1 in order to receive the data packets instead of directly from COM2? Thank you all of you in advance!
     
  2. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,383
    Likes Received:
    1,164
    Lok: Can you confirm that you read page 74 of the Movi Pro manual, please -- it describes the answer to the question I think you're asking.

    Andy

    Forensic Software & sUAV / Drone Analyst : Photographer : Videographer : Pilot (Portland, Oregon, USA): Trees=2, Ground=1, Props=11. :(
    The Ground Is The Limit™
    ---------- Forensic Drone Analyst : Forensic sUAV Analyst : Forensic Unmanned Aircraft Analyst : Forensic Drone Expert
     
  3. Chong Kwan Lok

    Chong Kwan Lok New Member

    Joined:
    Jul 4, 2017
    Messages:
    9
    Likes Received:
    0
    Hi Andy. Thank you for your reply but what I want is to analyze the data on my Logic. I could read any data from my logic even though I followed the guide in the software manual, which is connecting the MIMIC with COM1 port and I saw nothing. What is the major reason? Thank you for replying once again!
     
  4. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,383
    Likes Received:
    1,164
    Hi Lok: When you say "Logic" do you mean a logic analyzer? If so, you should probably do a Google search for the Futaba S-BUS protocol, e.g. https://developer.mbed.org/users/Digixx/notebook/futaba-s-bus-controlled-by-mbed/

    Which connector on the R6303 SB are you using to connect to the Movi Pro? (I'm assuming you're using S.Bus.)

    Andy

    Forensic Software & sUAV / Drone Analyst : Photographer : Videographer : Pilot (Portland, Oregon, USA): Trees=2, Ground=1, Props=11. :(
    The Ground Is The Limit™
    ---------- Forensic Drone Analyst : Forensic sUAV Analyst : Forensic Unmanned Aircraft Analyst : Forensic Drone Expert
     
  5. Chong Kwan Lok

    Chong Kwan Lok New Member

    Joined:
    Jul 4, 2017
    Messages:
    9
    Likes Received:
    0
    yes, it is S.Bus. I will try it later. Thanks a lot.
     
  6. Chong Kwan Lok

    Chong Kwan Lok New Member

    Joined:
    Jul 4, 2017
    Messages:
    9
    Likes Received:
    0
    For your information, I tried to plug into all the ports in the R6303 SB but there is nothing coming out on the Logic Analyzer. Is it about the difference of communication protocol? Thanks!
     
  7. Chong Kwan Lok

    Chong Kwan Lok New Member

    Joined:
    Jul 4, 2017
    Messages:
    9
    Likes Received:
    0
    Once again I tried to read the data on my Logic Analyzer but unfortunately there is nothing. I confirmed that there is some data sending to the MōVI Pro but when I tried to connect to the COM1 Port of the MōVI Pro, the gimbal does not have any movement and there is no feedback from the MōVI Pro. Is it necessary for me to at first send something, for example the packet QX277 to the MōVI Pro, then the MōVI Pro could response Thanks!
     
  8. Gary Haynes

    Gary Haynes Administrator
    Staff Member

    Joined:
    Jul 6, 2012
    Messages:
    5,211
    Likes Received:
    460
    You may want to open a ticket with at support@freeflysystems.com. I think you are the first forum member that has asked any questions about the data feed.
     
  9. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,383
    Likes Received:
    1,164
    Lok: I have had a quick look at the example Arduino app included with the API code (the file name is movi_pro_joystick.ino).
    Based on this example it appears that the code attempts to read data without sending any data.

    Have a look at line 225 onwards and it looks like this:

    // Get Recieved Messages
    int i = 64;
    uint8_t c;
    while (Serial1.available() > 0)
    {
    c = Serial1.read();
    QX_StreamRxCharSM(QX_COMMS_PORT_UART, c);​
    }​
    #endif

    // Send control packet
    FreeflyAPI.send();

    // Empty the send buffer
    for(int i = 0; i < sizeof(UART_Tx_Buf); i++){
    if(BufRemove(1, &UART_Tx_Buf) == 0) break;
    #ifdef UNO_BOARD
    Serial.write(UART_Tx_Buf);​
    #else
    Serial1.write(UART_Tx_Buf);​
    #endif
    }


    As you can see the code simply starts by doing a serial read before it sends a control packet.
    That said, it may be that the first time around this code, if there is not serial data available, then the sending of the control packet triggers a data packet from the MoVI Pro on a subsequent iteration.

    Please post again when you get an answer from FF.

    Andy


    Forensic Software & sUAV / Drone Analyst : Photographer : Videographer : Pilot (Portland, Oregon, USA): Trees=2, Ground=1, Props=11. :(
    The Ground Is The Limit™
    ---------- Forensic Drone Analyst : Forensic sUAV Analyst : Forensic Unmanned Aircraft Analyst : Forensic Drone Expert
     
  10. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,383
    Likes Received:
    1,164
    Lok: The API documentation also has this in the "Porting" section:

    6. Modify the commanded variable structure with command values. Call the send packet function to command the MōVI. QX_SendPacket_Cli_WriteABS(&QX_Clients[0], 277, QX_COMMS_PORT_UART, options);

    7. Implement a custom callback send packet to comm port function that will send the constructed message to the communication port, or intermediate buffer.

    8. Call the function QX_StreamRxCharSM() periodically in a loop to receive status messages from MōVI. ​


    The above seems to suggest that you do have to send the 277 packet before you read data from the MoVI Pro.

    Andy

    Forensic Software & sUAV / Drone Analyst : Photographer : Videographer : Pilot (Portland, Oregon, USA): Trees=2, Ground=1, Props=11. :(
    The Ground Is The Limit™
    ---------- Forensic Drone Analyst : Forensic sUAV Analyst : Forensic Unmanned Aircraft Analyst : Forensic Drone Expert
     
  11. Chong Kwan Lok

    Chong Kwan Lok New Member

    Joined:
    Jul 4, 2017
    Messages:
    9
    Likes Received:
    0
    Hi Andy! Thanks for your help at first!
    Now I am able to receive the packets of QX287 from the MōVI Pro with a manually generated buffer according to the wire definition in the API documentation.
    However, I would like to ask about "7. Implement a custom callback send the packet to comm port function that will send the constructed message to the communication port, or intermediate buffer." Does it mean I need to set the values manually to send out the packets of QX277? Or there are some codes in C that I can implement to send the packets of QX277?

    For your reference, I am neither using Arduino and STM32. I am using ICD 3 to compile the code. Will there be any difference in the coding among this two programming software?

    Many Thanks!
     
  12. Chong Kwan Lok

    Chong Kwan Lok New Member

    Joined:
    Jul 4, 2017
    Messages:
    9
    Likes Received:
    0
    1Hi Andy!

    There are a few more questions on receiving the data packet QX287.

    1. I looked into the wire definition of the QX287 and I could not find the representation of Gimbal RR, RX, RY, RZ. What are the bits inside represented? I knew that they are all 16-bit long integer but I want to know the specific meaning of each bit.

    2. I found that the received packet changed a liitle bit comparing to the one which received one second before. And I checked that the packet that I sent was continously the same. Is it normal to have some diversity owing to the noise to the system?

    It would be my honor if you can solve these questions in my head! Thanks in advance!!
     
  13. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,383
    Likes Received:
    1,164
    Hi Lok:

    I'm afraid I've not looked into the API protocol too much -- and I'm a little bit busy with my day job this week. I'll try and have a look at it later on this week....you will probably get an answer faster from either some other forum member who's experimented with the API, or by email to Freefly Support (support@freeflysystems.com).

    Regards
    Andy

    Forensic Software & sUAV / Drone Analyst : Photographer : Videographer : Pilot (Portland, Oregon, USA): Trees=2, Ground=1, Props=11. :(
    The Ground Is The Limit™
    ---------- Forensic Drone Analyst : Forensic sUAV Analyst : Forensic Unmanned Aircraft Analyst : Forensic Drone Expert
     
  14. Chong Kwan Lok

    Chong Kwan Lok New Member

    Joined:
    Jul 4, 2017
    Messages:
    9
    Likes Received:
    0
    Hi Andy,

    Thanks for your help anyways! I will send an email to support@freeflysystems.com to look for a solution.

    Best Regards,
    Chong Kwan Lok
     
  15. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,383
    Likes Received:
    1,164
    Hi Lok:
    Please do post an answer when you hear back from FF. There may well be other forum users who will like to know the answer, now or in the future.

    Cheers
    Andy

    Forensic Software & sUAV / Drone Analyst : Photographer : Videographer : Pilot (Portland, Oregon, USA): Trees=2, Ground=1, Props=11. :(
    The Ground Is The Limit™
    ---------- Forensic Drone Analyst : Forensic sUAV Analyst : Forensic Unmanned Aircraft Analyst : Forensic Drone Expert
     
    Rob Weidner likes this.

Share This Page