Format for writing serial port data?

Discussion on the Lua Scripting capabilities for RaceCapture/Pro. Also see the <a href="http://autosportlabs.net/RaceCapturePro_Lua_Scripting">Lua Scripting Guide</a>

Moderators: JeffC, stieg

Post Reply
GTIspirit
Posts: 249
Joined: Wed Jan 09, 2013 11:20 am
Location: SE Michigan

Format for writing serial port data?

Post by GTIspirit »

What is the format for using the writeSer() command?
https://wiki.autosportlabs.com/RaceCapt ... C_data_.29

writeSer( port, data )

How is data configured? with "", {}, ??

So for example, if I want to send this JSON command, how is it written?

{"command":"startRecording"}

writeSer( port,{"command":"startRecording"})

Looking at the Garmin Virb Ultra 30 API, the commands look similar to what I see in the logfile, e.g.
[USB] Received CMD: {"getLogfile":null}

So if the above StartRecording was successful, the response would be:
{"result":1}

So I think getting the Garmin Virb Ultra 30 to work is a matter of figuring out which port is the WiFi connection on the RCTrack2, and then getting the data portion of the writeSer command correctly formatted.

brentp
Site Admin
Posts: 6282
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi - I think my reply on the other post should answer this question.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply