Is there a way to get SmartAudio working?

Thanks! I’ve put in some comments. Happy to work with you on this

There is a functional version in dev (4.0 version or above) for sma in ardupilot, it’s a very basic protocol impl which permit to setup vtx parameters at GCS level and sincro the hardware vtx options with this data. Is already a wip but it’s tested against smartaudio 2.0 impl.

The setup method is to config vtx_ namespace parameters like vtx_band, vtx_channel, vtx_power, etc…
and in reboot the hardware vtx take this values. Serial port must be defined with protocol 35 and the uart tx on the fc connected to the sma pin in the vtx. Actual comm is a “hardcoded” half-duplex uart.

You can find the pr in https://github.com/ArduPilot/ardupilot/pull/15174

Any bug feedback with other versions from the sma spec are welcome.

1 Like

Ohhh yeah it’s finally we have VTX power in our hand :sunglasses:

Thank you @wapophis

Happy flying :slightly_smiling_face:

The setup is the following:

  • Wiring: Connect the tx of one spare uart of your fc to the sma pin in the vtx. Also connect the gnd from uart to the gnd of the vtx, be carefull to not mistake with the - pole from power.
  • Setup the uart port protocol to value 35 to enable sma protocol in this uart, baud setup is in the sma driver settled to 4800 baud as spec says. This is made setting the value into the SERIAL_<<UART_NUMBER>> protocol param. Setup uart options to half-duplex.
  • Enable vtx setup setting to 1 the para VTX_ENABLE, save and reboot.
  • Enable sma protocol in vtx setting the VTX_SMA_ENABLE PARAM TO 1, save and reboot.
  • Enable hot_deploy to auto-adjust your VTX settings on the fly without rebooting.
  • Setup your desired params for band,chan and power in the VTX_BAND,VTX_CHAN,VTX_POWER.
  • Setup the additional options which affects pitmode, or unlocking features for the vtx.
  • Save and reboot.
    When the vtx has power on, the sma driver will send to the hw-vtx the commands needed to sincro your vtx params config with the hw-vtx, and if hot_deploy is enabled, you could change at runtime into your GCS.
    Thats all for now.
2 Likes

I am glad we finally got SmartAudio.
I really missed this feature.

In addition we need a way to alter vtx settings via rc channel and set vtx power low when disarmed like in iNav.

Most of this in already in 4.1

Hi Andy,

I noticed you’ve picked up the PR on this?

I’ve got the 4.1.0 dev firmware installed on my Cube Black - and have enabled the VTX_ENABLE param, but i dont have any param for the VTX_SMA_ENABLE - as @wapophis mentions above.

Keen to give this a go for my TBS VTX. As others say above - happy to chuck some $$ toward the developers for such a great job on all of this.

Cheers.

You just need VTX_ENABLE and appropriate serial protocol, no need for anything else anymore. But you need to build the firmware currently.

Cheers Andy. Forgive my noobness, does that mean it’s not currently in the Dev version? Also is there a guide to building the firmware? Not done anything like that before.

Its not currently in the dev version, but I hope to get it merged this week

1 Like

Smart audio is now merged, but we just need the half-duplex change merged in order for it to work properly

1 Like

Half-duplex change is merged, so SmartAudio is ready to go! Thanks to @wapophis and anyone else who has contributed to this - a group effort.

1 Like

Hi Andy,

Whatever I try, SA isn’t working, I’m using ArduPlane V4.1.0dev (c3502689) on a PH4-mini 00190036 31385118 35333837.

The VTX I’m using is a Atlatl-HV 2.3 with SA 2.0 on a Pixhawk 4 mini

|VTX_BAND|0|
|VTX_CHANNEL|0|
|VTX_ENABLE|1|
|VTX_FREQ|0|
|VTX_MAX_POWER|800|
|VTX_OPTIONS|0|
|VTX_POWER|0|

|SERIAL2_BAUD|4|
|SERIAL2_OPTIONS|4|
|SERIAL2_PROTOCOL|35|

When I change for example |VTX_CHANNEL|0| to |VTX_CHANNEL|1| nothing changes on the VTX.

I connected the SA connector of the VTX to the TX of SERIAL1 of the FC and also the power and common ground is connected to the FC.

Do I need a special firmware version to use this? I thought is was already “merged”

Thanks OJ

When it finally got merged SA was protocol 37 - 35 is ADSB

hi, it require lua scripting? It will work on f405wing?

No lua requirement, it will work on all boards

1 Like

Hi I have 4.0.1dev at April 9th, is Smartaudio built-in already? Or I need compile myself.
MP 1.3.74.1 build 1.3.7768.13970

Sorry is it is obvious, but I’m new on this

It’s only in 4.1-dev

Hallo Andy,

In my previous message I stated “I connected the SA connector of the VTX to the TX of SERIAL1 of the FC and also the power and common ground is connected to the FC.”

This statement was wrong it’s SERIAL2 not 1, I configured everything on SERIAL2.

Even when I changed SERIAL2_PROTOCOL = 37 SA still isn’t working do you know if anybody tested this successfully already?

Thanks for the answer

Other people have got it to work. Try changing the baud to 4800.