sam028

  • *
  • 38
OPLink troubles
« on: December 21, 2017, 12:47:55 pm »
Hello,

It's a kind of follow up of this thread https://forum.librepilot.org/index.php?topic=3921.0 but as this previous thread title is not accurate anymore better start a new one.

So here is the context:
- two new Revo boards, bought from HobbyKing and Banggood
- two new OPLink mini, bought from HobbyKing and Banggood too
- LP Next release (20171029 12:16), but similar behavior with the stock 16.09
- for testing purposes Revo plugged on one PC, OPLink mini on another PC
- the "Xtal capacitor" has been tune on the Revo, with the default 127 value no "Connected" status
- the Revo has its "RX Seq. No." rising but not its "TX Seq. No."
- the OPLink mini has its "TX Seq. No." rising but not its "RX Seq. No."

Problem:
- Revo Link State is "Connected"
- OPLink mini Link State is "Enabled" or "Disconnected"
- OPLink mini Link State goes briefly to "Connected" after a Revo reset (see videos attached)

Questions:
- why is the Revo link state is "Connected" while the OPLink mini state is "Disconnected"?
- there is come kind of communication between both, could it some kind of protocol problem where both boards are not using the same communication protocol?
- any idea on how to debug this, like checking what's really received/transmitted by both boards?

I think it's a big problem if all newly bought Revo/OPLink boards can't work together with LP...

On the video :
- on the right PC 1: plugging the OPLink mini
- on the left PC 2:, plugging the Revo

Thanks,
Sam

(Edited by TheOtherCliff to change youtu.be to youtube.com)
« Last Edit: December 21, 2017, 08:01:57 pm by TheOtherCliff »

Re: OPLink troubles
« Reply #1 on: December 21, 2017, 07:42:51 pm »
Quote
I think it's a big problem if all newly bought Revo/OPLink boards can't work together with LP...
The problem is the cheap clones, not LP.  16.09 works well and is proven so it seems obvious, unless next has a bug (which I would not think likely).  Statements saying it is LP's fault when you admit that 16.09 (which is known to work) also has problems with your setup and hardware, are more likely to hurt your chances of getting help than to help you.  :)

IIRC:  First of all be aware that connecting USB telemetry will, disconnect the RF...  Only one telemetry stream at a time.  So GCS with USB OpLink on PC, but bare Revo with no USB connection that only talks via RF.  OSD is a separate case that does not count with this.

Second, what you see in your Tx/Rx Seq No. may be just that you only have Telemetry going from Revo to GCS and basically nothing going from GCS to Revo.

Third, be aware that all devices must run the same version: GCS, Revo, and especially note this includes OpLink firmware.  I have received some OpLinks that had an old bootloader.  I don't think it actually caused problems, but I updated it anyway.  Manual Rescue bu_oplinkmini.opfw and then manual Rescue fw_oplinkmini.opfw (or ef_oplinkmini.opfw does both).

Use an ohm meter to test continuity on RF connector from tiny inner pin (or the connection on the board) to outer shield (or connection on the board).  There should be NO connection according to the ohm meter.  If there is, you must repair or discard that board.  This is true of all OP RF boards including OpLink, Revo, Sparky2.

Also, you must have enough power and good enough antennas to get the signal across in both directions.  The floppy wire dipoles that come with Revos and OpLinks are the best antennas you will find, but the wires should be mounted in one straight line and the coax should come in 90 degrees from the side for best performance.  All antennas should be mounted vertically without using carbon or RF conductive plastic.  Mounting is the problem with these antennas.

If you can, start with a set of OpLink/Revo that talk well at default tuning and use the tuning to make the others talk well with the good set.  Else use the device that has clear markings on the RF board.  Bad clones use unmarked chips.

You know you are doing it (antennas, mounting) right if you can get at least a couple hundred meters with telemetry at lowest power setting (1.25mw) in clear LOS conditions.  For an upward only (doesn't have a lower half to hit the ground) antenna, the Nagoya NA-771 (long half wave like the OP floppy wire dipole) has no peers.  I just did extensive testing on a dozen different antennas (including the NA-701 which needs a ground plane to work well because it is a quarter wave) and will publish a thread once I have verified that the $2 shipped eBay NA-771 clones work well.
« Last Edit: December 21, 2017, 08:00:30 pm by TheOtherCliff »

sam028

  • *
  • 38
Re: OPLink troubles
« Reply #2 on: December 21, 2017, 08:58:04 pm »
I didn't meant it was LP fault, my concern is I can't find any "not bad clones" anywhere (if you have an address please let me know).
It's also can't an LP next bug as I tried with 15.09, 16.09 and 16.09 next (after having flashed the right firmware for each board each time).

I'll try the continuity test as it's the only thing I didn't tried yet.

Thanks,
Sam
« Last Edit: December 21, 2017, 09:25:49 pm by sam028 »

Re: OPLink troubles
« Reply #3 on: December 21, 2017, 10:35:57 pm »
The best OpLinks (and Nanos) are probably here and are old OP stock:
https://sasquatchlabs.org/product/openpilot-oplink-mini-modem-bundle/ (sasquatchlabs.org web store has closed)

The best Sparky2s are probably here and are old authentic Sparky2 stock:
https://www.ebay.com/itm/Taulabs-Sparky-2-0-32bit-F4-MCU-Based-Flight-Controller-compatiable-Librepilot/172353561802

I haven't bought a Revo in a while...

I have bought probably close to 20 Sparky2's and OpLinks from (in no particular ordering):
xt-xinte.com
banggood.com
sasquatchlabs.org
ebay.com
I have never got one that didn't work, but my latest ebay OpLink (the cheapest one there) has reduced range that I need to research (it may be a simple tuning issue).
« Last Edit: July 20, 2018, 06:04:00 pm by TheOtherCliff »

f5soh

  • *****
  • 4572
    • LibrePilot
Re: OPLink troubles
« Reply #4 on: December 22, 2017, 12:35:08 am »
Quote
- why is the Revo link state is "Connected" while the OPLink mini state is "Disconnected"?
- there is come kind of communication between both, could it some kind of protocol problem where both boards are not using the same communication protocol?

First you may need more baudrate for accurate link. Try 100000 or 128000 bauds
Second the AFC displayed on Revo is around 14KHz off. Keep the known "fine device" running the same xtal value and tune the other for AFC value around zero.

Edit: Seems one side (Revo) is untuned around -14Khz (Xtal value set to max), and cause the same reverse AFC value in OPLM (+14Khz)

When briefly connected, levels seems almost balanced.
« Last Edit: December 22, 2017, 12:49:34 am by f5soh »

sam028

  • *
  • 38
Re: OPLink troubles
« Reply #5 on: December 22, 2017, 03:34:23 pm »
@f5soh: I tried with 100000 and 128000 bauds but same thing
I also used two more pairs and kept the AFC value to 127 (see video).

@TheOtherCliff: one OPLink mini antenna connector has a 2 ohms continuity, the two other have 0. I used one with 0 in the video attached in this post. All my 3 Revo have 0 ohm continuity.
While I understand cheap OPLink can have a lower range in my case all is done in the same room, there is less than  meter between both antennas.

The things I don't get is:
- why does the Revo show "Connected" with a good RSSI and RX Level while the OPLink Mini connected on the other PC says "Disconnected"?

Another thing I see is:
- OPLink Mini plugged on PC 1, Revo unplugged
- I plug the Revo on PC 2 and then I can see on the OPLink Mini side (PC 1):
 -> about 20 "RX Seq. No." received
 -> a valid RSSI value
 -> a valid "Link Quality"
This lasts a second or less but it means a kind of communication is established between both (see screenshot).

Thanks to @TheOtherCliff for the vendors links.
But with 3 Revos and 3 OPLink Mini I don't think it's an hardware issue nor an LP bug (I tried all combinations), I may have configured something wrong but after having triple-checked everything I'm stuck...

Re: OPLink troubles
« Reply #6 on: December 22, 2017, 04:28:35 pm »
2 is bad.  0 is bad.  Infinity is good.  :)

It should show no connection at all.  The same as when not touching the ohm meter to anything.

Measure the Revos too.  They should all be "open circuit".  Measuring center pin on back side is easier than meauring center pin inside of connector.

For telemetry, you should set one OpLink to "Coordinator" and "Data".  Set the baud rate as desired.  Set the power level desired.  Save.  Copy the device ID from the bottom part that is read only because you need in the Revo settings.  Settings are only active on subsequent power ups.  Revo should be OpLinkReceiver and Data.  Same baud rate and power.  Set CoordID to the value you copied from the OpLink.
« Last Edit: December 22, 2017, 04:42:24 pm by TheOtherCliff »

sam028

  • *
  • 38
Re: OPLink troubles
« Reply #7 on: December 22, 2017, 05:01:53 pm »
2 is bad.  0 is bad.  Infinity is good.  :)

Yes, my bad. My tester shows 0.L for infinity and this is what I have (infinity) on all Revo/OPLink Mini minus one OPLink Mini I moved aside.

Quote from: TheOtherCliff
For telemetry, you should set one OpLink to "Coordinator" and "Data".  Set the baud rate as desired.  Set the power level desired.  Save.  Copy the device ID from the bottom part that is read only because you need in the Revo settings.  Settings are only active on subsequent power ups.  Revo should be OpLinkReceiver and Data.  Same baud rate and power.  Set CoordID to the value you copied from the OpLink.

Already done, unplug/plug the OPLink Mini after each "Save" and reset the Revo after each "Save" of the OPLink setup.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: OPLink troubles
« Reply #8 on: December 22, 2017, 09:28:03 pm »
Thinking to the issue you have, connecting remotely to a Revo board already connected using a USB connector do not make sense.
Telemetry goes to the computer/GCS/USB port where the Revo board is connected physically.

Try connecting the Revo using +5V/BEC or USB cable connected to a USB charger and look if you have access to the Revo using the OPlink.

sam028

  • *
  • 38
Re: OPLink troubles
« Reply #9 on: December 23, 2017, 12:44:01 pm »
Try connecting the Revo using +5V/BEC or USB cable connected to a USB charger and look if you have access to the Revo using the OPlink.

That was it, problem solved!
So if I understand correctly when the Revo is connected in USB on an running GCS the telemetry data is not sent through OPLink.

Thanks a lot!

Re: OPLink troubles
« Reply #10 on: December 23, 2017, 04:49:11 pm »
I said that in the very first reply in the very first suggestion.

[IIRC:  First of all be aware that connecting USB telemetry will, disconnect the RF...  Only one telemetry stream at a time.  So GCS with USB OpLink on PC, but bare Revo with no USB connection that only talks via RF.

sam028

  • *
  • 38
Re: OPLink troubles
« Reply #11 on: December 23, 2017, 05:27:42 pm »
I said that in the very first reply in the very first suggestion.

[IIRC:  First of all be aware that connecting USB telemetry will, disconnect the RF...  Only one telemetry stream at a time.  So GCS with USB OpLink on PC, but bare Revo with no USB connection that only talks via RF.

You're right but I didn't understood it, sorry for that.
As a punishment I will whip myself with cooked noodles!