Why analog VTX doesn't support 600mW power level?

Hi

I have read the docs Video Transmitter Support — Copter documentation , and did some proper setings. And it works with 0mW(pit mode), 100mW, 200mW, 400mW, but I can’t get 600mW working.

My VTX is 5804ML1.

And I pobably get the root cause. Can anyone let me know why this 600mW is commented.

I have asked about it, but I think it might be a long history, so there is no clear answer about it Discord

It’s because in SmartAudio 2.0 the power levels have fixed specific meanings. To get variable power levels you need SmartAudio 2.1

But I didn’t find where to configure Smart Audio 2.1 in document Video Transmitter Support — Copter documentation

The only thing I have found is the above power level table. And I searched the code, it seems support V21/V20/V1 smart audio protocol. But actually, the table doesn’t have 600mW setting.

So how can I set 600mW in V21 smart audio protocol, any guides?

I googled spec https://www.team-blacksheep.com/media/files/tbs_smartaudio_rev09.pdf

There is no specific definition about V2.1. It recommended but I didn’t know what it means.

SA 2.1 is a hardware feature of your VTX. Most non-TBS gear do not support SA 2.1

For //{ 0x13, 600, 28, 0xFF }, 600mW setting, It seems no confliction with SA 2 and SA 2.1.

As SA2 is using level, and SA 2.1 is using dbm, so there is no confiliction with { 0x13, 1000, 30, 0xFF }, // only in SA 2.1.

Is there any other more info or power list avaliable do suggest 600mW should NOT be in the list. Currently, what I have found is an compatibility issue. As 600mW is NOT on the list of SA 2.

BTW, I’m using Tramp protocol.

ok tramp is different. tramp works like SA 2.1 in that it advertises the power levels that are supported. If you can’t get the power level you want that indicates that the tramp implementation for the VTX you are using isn’t conformant. This is quite common - lots of badly written VTX protocols - I haven’t yet decided what the best way (or whether) to cope is.

OK, I might be know the answer. It’s Tramp using the SA power table.

  1. Different protocol needs different table. Tramp protocol use mW for direct power configuration.
  2. The roundf will cause a lot of problem when using SA power table, there will be a deviation.

I suggest to use parameters bit mask (pit_mode/25mW/100mW/200mW/400mW/500mW/600mW/800mW/1000mW/1600mW etc) for user to select (max 6 bit can be selected at the same time)

  1. There can be only one power table for tramp and smart audio protocols.
  2. bit mask should do a sanity check when VTX communication is established, eliminate those un-proper configured protocols, or give warnings for VTX configuration re-check.
  3. get rid of roundf function just check with power(tramp)/level(SA2)/dbm(SA2.1)/dac(SA1)

If it’s complicated with sanity checks, SA version should be defined ahead.

It works perfectly well for pandarc-VT5804ML1

  • 6 position + 0/25/100/200/400/600mW
  • tramp protocol

Happy flying! :smiley:

diff --git a/libraries/AP_VideoTX/AP_VideoTX.cpp b/libraries/AP_VideoTX/AP_VideoTX.cpp
index 72fe6e4e54..8568116380 100644
--- a/libraries/AP_VideoTX/AP_VideoTX.cpp
+++ b/libraries/AP_VideoTX/AP_VideoTX.cpp
@@ -109,10 +109,10 @@ AP_VideoTX::PowerLevel AP_VideoTX::_power_levels[VTX_MAX_POWER_LEVELS] = {
     { 0x11, 100,  20, 0xFF }, // only in SA 2.1
     { 1,    200,  23, 16   },
     { 0x12, 400,  26, 0xFF }, // only in SA 2.1
-    { 2,    500,  27, 25   },
-    //{ 0x13, 600,  28, 0xFF },
-    { 3,    800,  29, 40   },
-    { 0x13, 1000, 30, 0xFF }, // only in SA 2.1
+    //{ 2,    500,  27, 25   },
+    { 0x13, 600,  28, 0xFF },
+    //{ 3,    800,  29, 40   },
+    //{ 0x13, 1000, 30, 0xFF }, // only in SA 2.1
     { 0xFF, 0,    0,  0XFF, PowerActive::Inactive }  // slot reserved for a custom power level
 };
 
diff --git a/libraries/AP_VideoTX/AP_VideoTX.h b/libraries/AP_VideoTX/AP_VideoTX.h
index 4ffa6c21ab..1d8698c487 100644
--- a/libraries/AP_VideoTX/AP_VideoTX.h
+++ b/libraries/AP_VideoTX/AP_VideoTX.h
@@ -21,7 +21,7 @@
 #include <AP_Param/AP_Param.h>
 
 #define VTX_MAX_CHANNELS 8
-#define VTX_MAX_POWER_LEVELS 9
+#define VTX_MAX_POWER_LEVELS 7
 
 class AP_VideoTX {
 public:
@@ -80,7 +80,6 @@ public:
     };
 
     static PowerLevel _power_levels[VTX_MAX_POWER_LEVELS];
-
     static const uint16_t VIDEO_CHANNELS[MAX_BANDS][VTX_MAX_CHANNELS];
 
     static uint16_t get_frequency_mhz(uint8_t band, uint8_t channel) { return VIDEO_CHANNELS[band][channel]; }

@andyp1per inav/src/main/io/vtx_tramp.c at master · iNavFlight/inav · GitHub

FYI

trampPowerTable_5G8_600 is right for PandaRC VT5804L1

Hi. I had MiniPix and VTX support didn’t work, so I controlled it on Arduino (but without PIT). Now I installed a Pixhawk Radiolink, threw out the Arduino, connected my VTX straight to the Pixhawk and it works badly.
Only switches PIT-25mW-200mW. Question 1: how to change AP_VideoTX.cpp and AP_VideoTX.h yourself
and modify Ardupilot.
Question 2: if it is difficult, can someone share the IRC Tamp transmission protocol so that I can do the PIT myself.
(VTX to RAD VTX5.8G 2.5W, PIT-25mW-200mW-600mW-1600mW-2500mW, IRC Tramp)

Ask your VTX vendor to support ardupilot is much more convenient way. Or you have to ask someone has the expetise to handle the code for you.

Could I ask you to compile Ardupilot with the corrections for my VTX?
(Protocol: IRC Tramp, Power: Pit-25-200-600-1600-2500).
Thank you.

The code doesn’t support high power VTX. (Maybe wrong, as I didn’t see 2.5W in code)
It needs specification, and I didn’t familiar with those specs.

I’m NOT sure if andy have time to help, add high power VTX support??? sharing some links about analog VTX specification.

@takow Well, you know that they are pretty busy on developing the ardupilot. Maybe someone has time and know more things on specification can help.

I managed temporarily. I started Arduino and send commands from it. Maybe someone will find it useful:
PitOn = {0x0F,0x49,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x49,0x00};
PitOff = {0x0F,0x49,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4A,0x00};
Pwr25 = {0x0F,0x50,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x00};
Pwr200 = {0x0F,0x50,0xC8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00};
Pwr600 = {0x0F,0x50,0x58,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAA,0x00};
Pwr1600 = {0x0F,0x50,0x40,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x96,0x00};
Pwr2500 = {0x0F,0x50,0xC4,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1D,0x00};