Is there a way to get SmartAudio working?

Today later or tomorrow I will pull a PR with the initial SmartAudio implementation. To get a feedback from core dev team before going forward.

1 Like

it is great news. my most interest about this is actually to control vtx power and channel settings, that would be an extremely nice to have.
btw, does the runcam split camera also talk via smart audio protocol, for camera control to start/stop recording and settings?

1 Like

No, runcam has its own protocol (a few commands). But the most problem it uses different UART speed. Anyway, controlling both via single UART is possible.

is runcam doing half or full duplex? would be nice to have it married somehow with a generic camera control arducopter feature - i tried to look at it, but could not trace how one hooks with an another - i mean the camera trigger feature on the RCx with a protocol type on the serial. if you have figured it out - it would be a useful thing to have, to be able to start/stop runcam at least.

anyway, pls confirm when/if the smart audio will make it into the master. it would be really nice to have as well.

I din’t recall runcam interface details, I just sending a command and it works. I’m not reading an answer afterwards. So I have only the TX wire connected from FC to camera.

PR is on the review now, AP_SmartAudio: initial implementation by SergeyBokhantsev · Pull Request #11630 · ArduPilot/ardupilot · GitHub

BTW, for the practical purposes I have a 3.6.9 FW with a SmartAudio + Runcam control on the single UART port. You can compile and use it.
OR, for the testing purpose - you can compile my SmartAudio branch that is in PR.

Would love to see this as well. My main reason is as VTX get more powerful it’s nice to have them power up in pit mode and then go full power on arm.

1 Like

I am also ready to donate $ 20! Please place the developer’s wallet, and we will start transferring money for motivation.

1 Like

Hello @sergbokh
Do you have SmartAudio protocol code extracted for Arduino.
Or a library for that.
I plan to connect simple arduino Nano to arducopter via passthrough PWM and control the vtx with the Nano borad.
(Or the new Arducpter 4.0 onboard scripting)

If you want just to control VTX power basing on incoming PWM - you don’t really need a SmartAudio library for that. Just open serial port at 9600 and send a corresponding set_power command - this is just a few bytes.

Also I saw a PR that allows ArduPilot scripting to access serial ports. So you event don’t need a arduino board. You can handle PWM channel within your script and send set_power SmartAudio command to a serial port.

I would most certainly chuck at least $20 into the pot if it will help towards getting smartaudio implemented - even if it’s only able to control power levels, i think that is the most important feature of smartaudio. Such a shame it’s not implemented seeing that so many vtx units support it now.

I am trying to use realterm and or serial port monitor to send commands to my eachine vtx 1200 this uses the tramp protocol. What I want to do is just send power commands to the vtx. I am using the software mentioned and a ftdi board with the tx wire to the smart port. I have the software set up as 4800 baud, parity none, data bits 8 and stop bits 2. I can’t find any real information on the protocol. I have looked at your work and tried to send some hex but no luck. can you lead me in the right direction on this project.

Could you be more specific the commands needed to send to the vtx. I am using eachine 1200 I sure it uses the tramp protocol. Is it as easy as sending text set_power = ??? Or do I need to send it in Hex? I really can’t find information about these protocols.

I don’t know much about Tramp protocol, but here is the SmartAudio set-power payload example, that should work with SmartAudio v2 and v2.1 devices.
Also here is the specs http://www.team-blacksheep.com/tbs_smartaudio_rev09.pdf

Set power payload: 0x00 [pull line low], 0xAA 0x55 [header], 0x05, 0x01 [set power command], 0x00 [power level (0-3 usually)], 0xXX [CRC of all bytes including header], 0x00 [some devices have a bug and requires this low byte as ending, but other devices doesn’t]

CRC alg in “CRC-8/DVB-S2” with polynom 0xD5. You can find some online calculators. Also TBS spec has a C method example.

You should use HEX

hi Sergey,

could you pls remind me - your implementation was able to control recording and photo/video switches on RunCam devices, right? were you able to associate this activity of your smartaudio implementation with the RELAY_PINx configs in ardupilot, so it could be possible to actually map camera control for RunCam from Taranis channels?

PS. i just read comments in the PR - so, is this whole effort pretty much dead now? damn, i just got back to it all with a hope to put a spare RunCam on the plane i intend to build. too bad, too bad indeed.

I did two implementations - the first one is my internal thing, that I’m actively using on my builds. It does support RunCam (start/stop recording only) and SA, in fact there are two drivers in a single class. That’s because I wanted to use a single UART for both devices (had no much free ports on my PixRacer). And this is working. Driver just need to change UART speed accordingly when talking to different devices. Yes, RunCam recording is bind to a RC switch by a custom RC-switch action definition.

Also I did another try to do “public” implementation of SA driver, but unfortunately I’m haven’t enough time to complete it. There was no RunCam support.

Add me to the money pot, got $30 waiting for whoever implements SA.

I’ve started to implements the smartaudio spec where sergey left. After a refactoring to include the spec implemented in betaflight. I have a question about the vtx tables. Betaflight includes this tables after 4.1 version, and i’m planning to configure this tables, based in the same json formats as betaflight does. Are there any json parser wich can be used out of the box into the ardupilot proyect?. Thanks in advance

Not sure you want to do it that way. Do you have a branch?

I’m working into a branch on a forked repo ( un GitHub space ) . I’ll try to explain this. Vtx in a more generic fashion are using an array to express working frequencies grouped into bands. Other functionality is about the trasmisión power applied to the signal expressed in other structure. Into the smartaudio spec there are at least there versións which operates in a diferentes manner at terms of the vtx power output. Betaflight are using this json structures to configure each vtx model. The plan is use the jsons and use the model name to config the vtx into the AP, reads then json descriptor and load the correct table into memory , then spec frecuency and power to finish the vtx setup. The final steps is integrate the vtx controls into the osd.
Hope it helps.
Codebase is into https://github.com/wapophis/ardupilot smartaudio2 branch
Jsons could be found at https://github.com/Jackjan4/betaflight-vtx-tables