iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.16k stars 1.48k forks source link

v2.0.0RC4 R9 Mini + Omnibus f4 pro clone FPort on Uart1/Uart6 (no telemetry) #3680

Closed davidngrc closed 6 years ago

davidngrc commented 6 years ago

ok, I found out the FPort is working on Omnibus F4 Pro v2 + softserial on CH5 and CH6 pad + R9 mini (without the inverter) + iNav 2.0.0RC4 (check here https://github.com/iNavFlight/inav/issues/3344#issuecomment-409256384 )

But when I try to do the same thing on UART 1, I got stick control, but no telemetry.

Wiring Omnibus F4 Pro sbus (uart1) -> R9 mini smart port

in INav Configurator 2.0.0 RC3 1) in "configuration tab", enable soft serial 2) in "port tab", enable "serial rx" on uart1 3) in "configuration tab", receiver mode set to "serial based receiver, and provider set to fport (rather than sbus) 4) in "CLI tab", set serialrx_inverted = OFF or ON ( doesn't matter ) set serialrx_halfduplex = OFF 5) now on "Receiver tab", you should able to see the channel value change while you move the x9d stick. 6) on x9d, delete all old telemetry sensor in "telemetry screen", then discover new. 7) no new sensor found, bug?

teckel12 commented 6 years ago

@davidngrc I seem to remember a pull request for a change to the inverted receiver and/or telemetry. I believe it was included in RC4 but not 100% sure.

Also, how do you have it wired from the R9 mini to the FC?

davidngrc commented 6 years ago

@teckel12 as mention above, Omnibus F4 Pro sbus (uart1) -> R9 mini smart port R9 mini 5v from BEC, not from FC.

BTW, I could not get the FPort working on matek F405 Wing on iNav 2.0.0RC4 if you can, could you share the dump?

teckel12 commented 6 years ago

@davidngrc One wire? To what pin in the RX and what pin on the FC?

davidngrc commented 6 years ago

@teckel12 in Omnibus f4 pro, I link it to the sbus pin, I believe it is a tx pin in matek F405 Wing, I try uart 2, 3, softsearil1, all tx pin without success

bokie1 commented 6 years ago

I think this issue is related to my s.port telemetry not working.

davidngrc commented 6 years ago

but on Omnibus f4 pro softserial1, I did not add an invertor (with R9 mini), and it work (just tweak the setting). https://github.com/iNavFlight/inav/issues/3344#issuecomment-409256384

so it should work at matek F405 Wing softserial1 at well, but it didn't

I will try add a sbus invertor tonight and test again.

davidngrc commented 6 years ago

just did the following test BTW, I buy this sbus inverter online, not DIY, so I assume it works.

wiring 1): Omnibus f4 pro clone sbus (tx1) pin -> sbus inverter IN -> sbus inverter OUT-> R9M mini smart port.

then in iNav configurator -> set "serial rx" on port "uart1", then enable FPORT in "configuration tab", then "CLI tab", try setting the serialrx_inverted and serialrx_halfduplex to ON or OFF. I try different combination, no stick control, no telemetry sensor.

I even try switch the sbus inverter IN and OUT wiring 2): Omnibus f4 pro clone sbus (tx1) pin -> sbus inverter OUT -> sbus inverter IN -> R9M mini smart port. then enable FPORT in "configuration tab", then "CLI tab", try setting the serialrx_inverted and serialrx_halfduplex to ON or OFF. I try different combination, no stick control, no telemetry sensor.

Why want this? if FPort can use the sbus (tx1) pin, then we can use the softseral1 for other stuff ONE MORE FREE UART.

teckel12 commented 6 years ago

@davidngrc Why are you using an inverter? FPort isnt inverted. It's designed to run from an uninverted port on the FC to uninverted pads on the RX.

davidngrc commented 6 years ago

@teckel12 because the sbus pin is inverted in F4 board? on RX pin??? oh my god... I test it all on TX pin. I need to do the test again tonight😱

davidngrc commented 6 years ago

@teckel12 wait a second.... if it is a RX protocol, that means FPort not suitable for long range flight?

because I don't think the R9mini can output 1W of power? while we use sbus, sometimes we get telemetry lost (RX side), but still flyable, this is due to the awesome R9M 1W power (TX side)?

anyone test the FPort range vs the SBUS range? same or not?

teckel12 commented 6 years ago

@davidngrc Use the other port for the same UART that isn't inverted. There's another connection for the serial comm port that's not inverted. No need for this double inversion nonsense. That's what FPort is designed to resolve.

teckel12 commented 6 years ago

@davidngrc The range should be about the same as S.Bus. Same hardware, just the protocol changes.

davidngrc commented 6 years ago

@teckel12 Just try FPort on Omnibus f4 pro clone

TX6 pin (without sbus invertor), try all the combination of serialrx_inverted and serialrx_halfduplex in CLI, no stick control and telemetry.

RX6 pin (without sbus invertor),, same step above, same no result.

TX6 pin (with sbus invertor, also try switch sbus invertor IN and OUT), same step above, same no result.

RX6 pin (with sbus invertor, also try switch sbus invertor IN and OUT), same step above, same no result.

so FPort is indeed has bugs, not work on tx1 (inverted) or tx6 (non-inverted, with sbus invetor or not). only port working seems to be the softserial1 (without sbus invetor) with CLI setting serialrx_inverted = ON and serialrx_halfduplex = ON

teckel12 commented 6 years ago

@davidngrc How are you connecting to your receiver? To the SBUS and S.Port pins (which are inverted) or the uninverted SBUS and S.Port pads as you should be for FPort?

On the F4 you should really be using an uninverted UART and the uninverted pads on your receiver.

You can't invert the UART signals with software switches on most F4 FC so your making things more complex by even trying that.

The duplex option is for one wire, so again, if your using two wires to two UART pins you're complicating things for no reason.

The problem isn't with FPort, it's with what your trying to do, how you're doing it, and the complexity you're adding for no reason (making it all more confusing than it should be).

So step one, forget the inverters. Step two, use a physical UART on your FC, wire the RX pad on the FC to the UNINVERTED SBUS pad on your receiver. Wire the TX pad on the FC to the UNINVERTED S.Port pad on your receiver. Step three, don't set any inverter settings, just FPort and SmartPort telemetry.

bokie1 commented 6 years ago

@teckel12 I thought Fport is just 1 wire on TX? Why woupd we need another cable to be connected on Sbus/rx pad? I understand why @davidngrc is using softserial because r9 mini doesn't have an uninverted s.port pad. For my setup, I only use sbus (rx1) and s.port (tx11/ch6). It used to work on 1.9.1 but stopped working on 2.0. Tested on rc2,3 and 4.

bokie1 commented 6 years ago

@davidngrc, omnibus f4 pro doesn't have an uninverted uart tx. It has an uninverted uart rx on rx1. That is why, either we need to use tx11 or use a hardware inverter to make s.port or f.port work.

davidngrc commented 6 years ago

@teckel12 my wiring is very simple, one wire from R9 mini SPort to FC UART TX or RX.

like @bokie1 said, R9 mini does not come with an uninverted s.port, so I add a sbus invertor to the existing inverted sport, that means I should get a uninverted sport signal.

I know FPort is suppose to connect to the FC TX pad. but just in case, I also test on the RX pad as well.

@teckel12 do you have a Omnibus f4 pro clone? if so, could you make FPORT work on Uart1 or 3 or 6? I have proved that it will work on softserial 1, but my test show it can not work on Uart 1 or 6, I assume 3 will be the same.

davidngrc commented 6 years ago

@bokie1 I have add the hardware invertor in my test, still don't work.

bokie1 commented 6 years ago

@davidngrc, which inverter are you using? Mine stopped working after 1.7.3.

davidngrc commented 6 years ago

this one, search "sbus inverter" on google sbus inverter

bokie1 commented 6 years ago

That's sbus inverter not s.port inverter.

davidngrc commented 6 years ago

I read from somewhere, it said, it is the same thing. both invert the signal.

ninja-zx11 commented 6 years ago

I believe it has to be a bi directional inverter and not just simple Sbus inverter.Check my thread here: https://www.rcgroups.com/forums/showthread.php?3112594-F-port-on-R-XSR-via-bi-directional-inverter-not-working-%28Solved%29/page2#post40025930

bokie1 commented 6 years ago

@ninja-zx11 that's the inverter I was using with my xsr-m before. Sadly, it stopped working after 1.7 3. With regards to the swapping of resistors to lesser values, did it also work for s.port or it was just a fix for f.port?

ninja-zx11 commented 6 years ago

Sorry I never tested S-port after.

teckel12 commented 6 years ago

I did get FPort working, using uninverted signals. It probably isn't working for you because your not using a bi-directional inverter. That's why I said for an F4 you really need to go totally uninverted. I'm not going to bother with FPort till I build a F7 quad, not really designed for the F4 if you're using a RX that doesn't have uninverted pads exposed.

davidngrc commented 6 years ago

thank you all, can't find bi-directional inverter in online shop, seems I had to make one myself. could someone update the wiki include the useful info here? thank you again😄

shellixyz commented 6 years ago

@davidngrc https://github.com/iNavFlight/inav/blob/master/docs/Telemetry.md#smartport-sport-with-external-hardware-inverter

teckel12 commented 6 years ago

@davidngrc There's an extensive (I believe BF) wiki on FPort which already points out the problems with using FPort on an F4 FC.

davidngrc commented 6 years ago

@shellixyz @teckel12 very helpful. thank you

cterraza commented 5 years ago

According to this page:

https://github.com/iNavFlight/inav/blob/master/docs/Board%20-%20Omnibus%20F4.md

The Uart1 and Uart6 has a unidirecctional inverter on the TX pins, so the FPORT cannot work in that UARTS.

I´m already make it work with no issues in the UART3, but this UART is shared with the I2C pins. So, if you have a external compass or another sensor with I2C protocol these can´t work anymore.

The CLI commands that I used on INAV 2.0.0 was:

set serialrx_provider = FPORT set serialrx_inverted = OFF set serialrx_halfduplex = ON

Obviously, you need to use the uninverted FORT pin on the R9mm.

image

bokie1 commented 5 years ago

According to this page:

https://github.com/iNavFlight/inav/blob/master/docs/Board%20-%20Omnibus%20F4.md

The Uart1 and Uart6 has a unidirecctional inverter on the TX pins, so the FPORT cannot work in that UARTS.

I´m already make it work with no issues in the UART3, but this UART is shared with the I2C pins. So, if you have a external compass or another sensor with I2C protocol these can´t work anymore.

The CLI commands that I used on INAV 2.0.0 was:

set serialrx_provider = FPORT set serialrx_inverted = OFF set serialrx_halfduplex = ON

Obviously, you need to use the uninverted FORT pin on the R9mm.

image

You are talking about different receiver. R9 mini doesn't have uninverted S.port.