Skip to content
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

INAV 2.0.0 RC2 doesn't work with XSR-M S.Port unless smartport_uart_unidir = ON #3526

Closed
teckel12 opened this issue Jul 6, 2018 · 7 comments

Comments

@teckel12
Copy link
Contributor

teckel12 commented Jul 6, 2018

Board and Version

Omnibus F4 Pro
INAV/OMNIBUSF4PRO 2.0.0 Jul 6 2018 / 09:28:45 (afc5602)
It's custom compiled, with the only inclusion being #3519, same result with downloaded release RC2

Behavior

No S.Port telemetry from INAV from FrSky XSR-M receiver (latest firmware). Downgraded to INAV 1.9.1 and S.Port telemetry worked again. Flashed back INAV 2.0.0 RC2 and it didn't work. Replaced XSR-M receiver with a backup and it still didn't work. Works fine on other quad running 2.0.0 RC2 (same build) and similar hardware except for different receiver X4R-SB.

Blackbox logs/Config (.ZIP) where problem occurs

https://pastebin.com/xp5iaxHC

@teckel12
Copy link
Contributor Author

teckel12 commented Jul 6, 2018

Got it working, but with a sacrifice. With 2.0.0 RC2 and the XSR-M/E you need to set smartport_uart_unidir = ON for S.Port telemetry to work. On a different quad with the same firmware, same FC, and almost exactly the same settings, but using an X4R-SB receiver I have smartport_uart_unidir = OFF. Both receivers are connected exactly the same way, to the SBUS port and S.Port connected to soft serial via the ch5/ch6 pads. With INAV 1.9.1 I had smartport_uart_unidir = OFF and bidirectional S.Port worked with the BetaFlight PID Lua Script.

I believe what this means is that with INAV 2.0.0 RC, the XSR-M/E (at least when using soft serial) can't do bidirectional S.Port as well as smartport_uart_unidir = ON being required.

@teckel12 teckel12 changed the title INAV 2.0.0 RC2 doesn't work with FrSky XSR-M S.Port telemetry INAV 2.0.0 RC2 doesn't work with FrSky XSR-M S.Port telemetry unless smartport_uart_unidir = ON Jul 6, 2018
@teckel12 teckel12 changed the title INAV 2.0.0 RC2 doesn't work with FrSky XSR-M S.Port telemetry unless smartport_uart_unidir = ON INAV 2.0.0 RC2 doesn't work with XSR-M S.Port unless smartport_uart_unidir = ON Jul 6, 2018
@fiam
Copy link
Member

fiam commented Jul 7, 2018

@teckel12 I've just set up an XSR (note the different RX) with an OMNIBUSF4PRO and it works with S.Port over softwareserial with smartport_uart_unidir = OFF. Could you use DEBUG_TRACE() to figure out if the port is being open properly and if the S.Port driver is getting the requests from the RX?

@teckel12
Copy link
Contributor Author

teckel12 commented Jul 8, 2018

@fiam will do... Note that my X4R-SB also works fine with smartport_uart_unidir = OFF. Also note that I'm running S.Port via SS in all cases.

@teckel12
Copy link
Contributor Author

teckel12 commented Jul 8, 2018

@fiam Did a build with DEBUG=GDB and flashed but that's as far as I got. I was expecting more of log, but it seems that it uses a debugger of some kind? I've never needed to use a debugger so maybe this is where it's beyond my experience. I'm old, so I learned to program before we had debugging tools. I avoid writing bugs, so I've never needed a debugger, I guess till now.

Is this what's needed?: https://gnu-mcu-eclipse.github.io/debug/install/

If so, I could give it a go. But like I said, I've never used a debugger so my effectiveness would probably be low.

@fiam
Copy link
Member

fiam commented Jul 8, 2018

@teckel12 Don't worry, you don't need to set up a full-fledged debugger. Use https://github.com/fiam/msp-tool to connect to the FC and it will print debug messages. Then change the code to use DEBUG_TRACE() to print stuff.

@teckel12
Copy link
Contributor Author

teckel12 commented Jul 9, 2018

👍 Will give it a go.

@teckel12
Copy link
Contributor Author

Now works fine with 2.0.0 on this quad with the smartport_uart_unidir = OFF, so closing...

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

No branches or pull requests

2 participants