raul-ortega/u360gts

Alternative CRC check for R9 Telemetry via build-in BLE module is needed

skaman82 opened this issue · 19 comments

I can't get my Build-in BT module to work with the Tracker FrskyX Telemetry.
CRC is checked here currently in frskyx.c:

 if (!checkSportPacket(packet)){
	  telemetry_failed_cs++;
	  return;
  }
}

after removing the "return;" it seems to work just fine. So the CRC method has changed apparently. Please add an alternative CRC routine that is working with the newer R9 and Build-In BT modules. Baudrate from the build-in module is 115200 btw. Here some input:

ACCESS.protocol.docx
Buld-in-Bluetooth.txt
BT-and-PXX2.logicdata.zip

janmj commented

I upgraded my radios from Opentx 2.2.4 to 2.3.9, and then i got this very same problem. So obviously something changed somewhere between these versions.
I hope this issue can be merged in to master soon, because i really hate to have to downgrade my radios :).
Alternatively i have to build my own version. Is there any good instructions for how to build the U360GTS firmware?

@janmj I could send you a hex file for testing. Naze or SprachingF3?

janmj commented

@skaman82 Thanks, i would appreciate that! I use a NAZE board.

@janmj please let me know if that is working
amv-open360tracker_NAZE.hex.zip

janmj commented

@skaman82 Thanks a lot, will report back :)

Alternatively I have to build my own version. Is there any good instructions for how to build the U360GTS firmware?

you can use the documents to build inav o cleanflight. I build on my own and if I remember well I just followed those instructions (as a base)
https://github.com/cleanflight/cleanflight/blob/master/docs/development/Building%20in%20Ubuntu.md
it works just fine in windows as well using the WSL.

@skaman82
It's not clear to me if the CRC issue that you found is related to ACCESS protocol.
Let me explain: my setup works just fine but it won't if I'm trying to use the internal Bluetooth module with telemetry mirror enabled but I'm still using the "old" ACCST protocol.

janmj commented

Not using access here, this problem started when i upgraded opentx..
Was working fine on both internal 2.4 and R9M (not 2019) before the upgrade.
Btw. Using a horus X12S, telemetry through internal BT module to a HM-10 module on the tracker.

@arf-it Thanks for the tips :)

janmj commented

@skaman82 I just testet your firmware, and unfortunatly it was even worse :)
With the released firmware at least i got a "connection" with telemetry, meaning the FCS number started to count. With this i got nothing...

@janmj that is strange. I am using the R9 lite Pro module (flex, access) in my x-lite and connecting via build-in BT module.

@arf-it BT is using seemingly the old style sport protocol. This setup is working fine with my modified code:
IMG_20200618_104640

janmj commented

Very strange! What version of OpenTx are you on?

janmj commented

Maybe it's a Horus problem.. I noticed from 2.3.0 the Horus got support for 60 sensors, up from 32 earlier. And i did have to delete and rediscover telemetry on all my models. Maybe the sensor index is different on the horus...

@janmj I am on OpenTX 2.3.9

janmj commented

@skaman82 Ok, but have you testet on a Horus? I will try to downgrade just to confirm...
But not until the weather get's bad around here :)

@janmj OpenTX 2.3.9 is the latest release AFAIK. I don't own a Horus - tested wit x-lite

janmj commented

Yes, and as i said, my problems began when i upgraded from 2.2.4 to 2.3.9.
But only the Horus had changes to the telemetry in the 2.3.X version(from 32 to 60 possilble sensors).
Thats why i suspect this is the problem, meaning the sensor index is different on the Horus..

Heres the same shit. R9m, x12s. Internal bt mirror.
Telemetry only over two hc05 with inverter.
Happens with 2.3.7 and 2.3.9
ACCST not access

@brainbubblersbest you don't need an inverter if using the build-in BT from the radio

Since #100 is merged, I am closing this for now

I have included both methods of CRC calculation, in this way it will no matter is telemetry is extracted directly from TX module or from internal Horus type Bluetooth module.

For test purpouses, please try: https://github.com/raul-ortega/u360gts/blob/master/other-releases/amv-open360tracker_FRSKY_X_CRC_FIX_ALL_TARGETS.zip