Skip to content

Issues with VTX Foxeer Reaper Infinity on Plane. #29782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
IvanLeu opened this issue Apr 14, 2025 · 11 comments · May be fixed by #29950
Open

Issues with VTX Foxeer Reaper Infinity on Plane. #29782

IvanLeu opened this issue Apr 14, 2025 · 11 comments · May be fixed by #29950

Comments

@IvanLeu
Copy link

IvanLeu commented Apr 14, 2025

Bug report

Hello! I've been stuck for a while trying to make Foxeer Reaper Infinity 5W work with Ardupilot and SpeedyBeeF405WING. Seems like the VTX doesn't respond to the commands or the firmware doesn't see it:
Here is the log:
14.04.2025 11:40:25 : send command 'r': 0
14.04.2025 11:40:25 : send command 'r': 0
14.04.2025 11:40:24 : send command 'r': 0
14.04.2025 11:40:24 : send command 'r': 0
14.04.2025 11:40:24 : send command 'r': 0
14.04.2025 11:40:24 : send command 'r': 0
14.04.2025 11:40:24 : send command 'r': 0
14.04.2025 11:40:23 : send command 'r': 0
14.04.2025 11:40:23 : send command 'r': 0
14.04.2025 11:40:23 : send command 'r': 0
14.04.2025 11:40:23 : send command 'r': 0
14.04.2025 11:40:22 : send command 'r': 0
14.04.2025 11:40:22 : send command 'r': 0
14.04.2025 11:40:22 : send command 'r': 0
14.04.2025 11:40:22 : send command 'r': 0
14.04.2025 11:40:22 : send command 'r': 0
14.04.2025 11:40:22 : send command 'r': 0
14.04.2025 11:40:22 : send command 'r': 0

I use the latest firmware from the website, I believe its Arduplane 4.5.7. I tested it on betaflight and it worked fine.
I attached my parameter list

Platform
[ ] All
[ ] AntennaTracker
[ ] Copter
[X] Plane
[ ] Rover
[ ] Submarine

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Apr 19, 2025

Can you please try again to attach parameters, and also bin logs if you have them? Normally, support requests should go on the forums.

@peterbarker
Copy link
Contributor

Ping @IvanLeu - logs requested

I've just had a look at the code and I don't think 4.5.7 can emit that debug. Please report the correct version.

@andyp1per might need to get one of these devices to test with.

@IvanLeu
Copy link
Author

IvanLeu commented May 1, 2025

Ping @IvanLeu - logs requested

I've just had a look at the code and I don't think 4.5.7 can emit that debug. Please report the correct version.

@andyp1per might need to get one of these devices to test with.

So I did some debugging, for that vtx the header is always 0, and it messes all up. My solution was just to ignore the header for that VTX and it works, but I'm sure there is a better solution. I'm pretty sure that didn't work on 4.5.7, also I tested on plane 4.5.6.

@andyp1per
Copy link
Collaborator

Ping @IvanLeu - logs requested
I've just had a look at the code and I don't think 4.5.7 can emit that debug. Please report the correct version.
@andyp1per might need to get one of these devices to test with.

So I did some debugging, for that vtx the header is always 0, and it messes all up. My solution was just to ignore the header for that VTX and it works, but I'm sure there is a better solution. I'm pretty sure that didn't work on 4.5.7, also I tested on plane 4.5.6.

Do you have a trace of the line data? I'm not sure I understand what you mean by the header always being 0

@IvanLeu
Copy link
Author

IvanLeu commented May 1, 2025

Do you have a trace of the line data?

I don't have it. By header always being 0 I meant that in AP_Tramp::receive_response() in the case ReceiveState::S_WAIT_LEN(file AP_Tramp.cpp line 204) there is a check if the byte is equal to c == 0x0F, if it is not, the receiver is being reset. On Foxeer Reaper Infinity the first Byte is 0x00 and that condition is never true for the first byte of the packet, only the next byte has the proper header, so I had to ignore the leading byte and that worked.

@andyp1per
Copy link
Collaborator

Oh we have an option for SmartAudio that does this, would be easy to add for Tramp - I'll see if I can cook something up

@andyp1per
Copy link
Collaborator

Actually not quite the same. I need to know - is it every single packet that comes from the VTX that has a leading 0 that needs to be ignored or only some?

@andyp1per
Copy link
Collaborator

Or rather can you post the fix you made that worked and I can incorporate something similar into the driver

@IvanLeu
Copy link
Author

IvanLeu commented May 1, 2025

Or rather can you post the fix you made that worked and I can incorporate something similar into the driver

Here is what I came up with, I think every packet comes with leading 0.

case ReceiveState::S_WAIT_LEN: {
            if (c == 0x0F) {
                // Found header byte, advance to wait for code
                receive_state = ReceiveState::S_WAIT_CODE;
            } else {
                
                const int16_t b1 = port->read();
                const uint8_t c1 = uint8_t(b1);
                if (c1 == 0x0F) {
                    // Found header byte, advance to wait for code
                    response_buffer[receive_pos] = c1;
                    receive_state = ReceiveState::S_WAIT_CODE;
                } else {
                    reset_receiver();
                }
            }
            break;
        }

@andyp1per
Copy link
Collaborator

@IvanLeu can you try #29950 ?

@IvanLeu
Copy link
Author

IvanLeu commented May 1, 2025

@IvanLeu can you try #29950 ?

Thank you, I will try it and come back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants