DIY-Multiprotocol-TX-Module icon indicating copy to clipboard operation
DIY-Multiprotocol-TX-Module copied to clipboard

add telemetry support to SGF22 protocols

Open rdba2k opened this issue 8 months ago • 24 comments

Hi, Pascal:

I found out there are also low battery telemetry for SG F22 and KF700 J20. Do you want to send me the modified SGF22 code to collect the telemetry? It is a little bit hard for me to understand the telemetry code to copy from FX to SGF22 now. Thanks.

rdba2k avatar Mar 29 '25 19:03 rdba2k

I haven't implemented the telemetry since the SG-F22 shows clearly with the inboard LEDs that the battery is low. I can add it if you really think its useful...

pascallanger avatar Mar 29 '25 20:03 pascallanger

Let us try it, especially for KF700 J20 which does not have LED.

rdba2k avatar Mar 29 '25 20:03 rdba2k

Ok I'll add the code when I'll have some free time.

pascallanger avatar Mar 29 '25 20:03 pascallanger

Just tried to add the telemetry code but strangely I don't get anything at all from my SGF22... I don't have the original TX anymore so I'm a bit stuck at this point. Can you do a XN297dump with the original radio and SGF22 plane turned on? Can you run it in Auto mode? Can you also scan manually and slowly all the rf frequencies using the XN297dump sub protocol 1M? Please post both to see if the telemetry is captured and how it looks like.

pascallanger avatar Mar 29 '25 22:03 pascallanger

SGF22 manual says

  1. The remote control will make a "drop" "drop" sound when the aircraft is out of power.

I connected a variable voltage supply to SG F22, its servo starts shaking around 2.9v, I even lower the voltage more, but I did not hear any beep or "drop" sound from the stock TX. Probably there is no telemetry for SGF22. Attached is the dump file. BTW, how to "slowly all the rf frequencies using the XN297dump sub protocol 1M"? But I can here beep from KF700 J20 stock TX when the voltage is low.

TX+airplane+VV.txt

rdba2k avatar Mar 30 '25 03:03 rdba2k

Attached is for KF700 J20 dump

J20TX+Plane+6v.txt

, close to the end the voltage is lower to 6.6v and the stock TX is beeping. I do not think the file shows anything.

rdba2k avatar Mar 30 '25 03:03 rdba2k

Attached files are not interesting, I really need the manual scan.... Select the xn297dump protocol, select the 1M sub protocol then on the field RF frequency which is at 0 by default, increment the value slowly by 1 until you reach the max of 84. You will see the RF channel changing accordingly on the serial terminal and the packets received for that RF channel. Make sure to stay enough time on each channel.

pascallanger avatar Mar 30 '25 08:03 pascallanger

J20TXNobeep is when the battery voltage is above 7.0v. J20TXbeep is when the voltage is 7.0v

Nobeep2beep is only monitor on Ch30, it is found this line

RX: 48859us C=30 Enhanced pid=2 S=Y A= C7 95 3C BB A5 P(3)= 00 0B 01

also this line in J20TXbeep.

It seems only send once. Even I raised the voltage again, the TX beep would not stop.

J20TXNobeep.txt

J20TXbeep.txt

nobeep2beep.txt

rdba2k avatar Mar 30 '25 19:03 rdba2k

another collection, "00 0B 01" is found in Ch15.

auto.txt ch61.txt ch45.txt ch30.txt ch15.txt

rdba2k avatar Mar 30 '25 22:03 rdba2k

Does the SGF22 do the same? Since I have it I could try my code...

pascallanger avatar Mar 31 '25 13:03 pascallanger

I do not get any telemetry from SG F22. There is low battery beep for Park 10 F22S, but I do not find any related telemetry signal either.

rdba2k avatar Apr 01 '25 17:04 rdba2k

For J20, I found "00 0B 00" for 8.0v good battery. Apparently ""00 0B 01" for low battery.

Channel=15,0x0F RX: 0us C=15 Enhanced pid=2 S=Y A= C7 95 3C BB A5 P(12)= 1E 16 00 0B 03 7F 7E 80 84 00 42 10 RX: 48082us C=15 Enhanced pid=2 S=Y A= C7 95 3C BB A5 P(12)= 1E 1A 00 0B 03 7F 7E 80 84 00 42 10 RX: 48083us C=15 Enhanced pid=2 S=Y A= C7 95 3C BB A5 P(12)= 1E 1E 00 0B 03 7F 7E 80 84 00 42 10 RX: 48088us C=15 Enhanced pid=2 S=Y A= C7 95 3C BB A5 P(12)= 1E 22 00 0B 03 7F 7E 80 84 00 42 10 RX: 48785us C=15 Enhanced pid=1 S=Y A= C7 95 3C BB A5 P(3)= 00 0B 00 RX: 47375us C=15 Enhanced pid=2 S=Y A= C7 95 3C BB A5 P(12)= 1E 2A 00 0B 03 7F 7E 80 84 00 42 10 RX: 48086us C=15 Enhanced pid=2 S=Y A= C7 95 3C BB A5 P(12)= 1E 2E 00 0B 03 7F 7E 80 84 00 42 10 RX: 48091us C=15 Enhanced pid=2 S=Y A= C7 95 3C BB A5 P(12)= 1E 32 00 0B 03 7F 7E 80 84 00 42 10 RX: 48081us C=15 Enhanced pid=2 S=Y A= C7 95 3C BB A5 P(12)= 1E 36 00 0B 03 7F 7E 80 84 00 42 10

rdba2k avatar Apr 01 '25 17:04 rdba2k

For J20, telemetry is found only in Ch15 .

ch15_2.txt

rdba2k avatar Apr 01 '25 18:04 rdba2k

I've added some code for the telemetry but I haven't tested anything... Please try first the new code leaving the telemetry flag disabled to see if the protocol still works on the SGF22 and J20. Then uncomment this line and try again to see if you get some telemetry: https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/blob/13024e3816e67567a8295bec711d1ff58c21aa09/Multiprotocol/SGF22_nrf24l01.ino#L52 I'm not quite sure it will work as it is but let's see.

pascallanger avatar Apr 01 '25 21:04 pascallanger

Attached it is for park10 f22s. I only caught "P(3)= 29 B4 00", It seems in the format of rx_tx_addr[2], rx_tx_addr[3], 0x00/0x01(for battery). The telemetry is not constantly sent, and I do not know which channel it will be sent.

ch45_f22s.txt

rdba2k avatar Apr 02 '25 00:04 rdba2k

It looks great. ParkTen F22S telemetry works, the low battery voltage threshold is 2.9v (max 4.2v). KF700 J20 telemetry works too, the low battery voltage threshold is 7.0v (Max 8.4v). And the airplane controls work fine with telemetry code.

Correction: The telemetry also works for SG F22, the voltage threshold is 2.9v (max 4.2v). My variable-voltage power supply source comes from a USB. I added a 10uF capacity at the output, It seems SGF22 need a lot of current to start the motors then F22S and J20 do.

rdba2k avatar Apr 02 '25 01:04 rdba2k

I don't have access to my SGF22 anymore for a week or so, I can't test myself. I've pushed the code with the telemetry enabled by default and updated the documentation if you can give it a last check. Closing for now as I think we are ok but let me know.

pascallanger avatar Apr 02 '25 12:04 pascallanger

The battery low voltage alert works great, but I constantly got "telemetry lost"/"telemetry recovered". It seems the airplane need be quite close to get the telemetry signal. In edgetx I checked "Disable telemetry audio warning" to deal with this issue.

rdba2k avatar Apr 03 '25 20:04 rdba2k

@rdba2k For the V761, I had to trick the radio since if you miss one or two telemetry packets it was complaining lost/recover. Do you think I should do the same or it's really distance?

pascallanger avatar Apr 14 '25 13:04 pascallanger

We could try to see whether it alleviates the telemetry-lost issue or not.

Thanks.

rdba2k avatar Apr 15 '25 17:04 rdba2k

Can you test the latest code? I'm maintaining the telemetry "up" for about 3.5s before declaring it lost to the radio.

pascallanger avatar Apr 16 '25 05:04 pascallanger

The "telemetry loss" situation is improved, but not completely gone, especially when the plane is in aerobatics or flies close to the ground. However, I have received the "low battery" in all situations.

rdba2k avatar Apr 18 '25 22:04 rdba2k

I can increase the wait time...

pascallanger avatar Apr 19 '25 19:04 pascallanger

I test fly the double wait time for telemetry, I am satisfied with the result. Two lines of code change in SGF22_nrf24l01.ino,

change static uint8_t telem_count = 0; to static uint16_t telem_count = 0;

change if(telem_count > 4*63) to if(telem_count > 8*63)

Thanks.

rdba2k avatar May 01 '25 20:05 rdba2k