Page 1 of 1

TunerStudio in Linux - automatic logging upon launch?

Posted: Mon Jun 18, 2012 7:01 am
by dieselgeek
I recently built an in-car PC for datalogging to avoid having to strap a laptop into a 300+mph landracing car. Car is running MS3X, but the SD logging isn't able to capture as much data as I need (also using a fully populated IOX).

I am running Ubuntu 12.04, and the TunerStudio and MegaLogViewer installs went perfectly easily. Simpler than Windows, actually.

Here's my question. Is there any current method, after booting into Linux, TunerStudio could be set up to automatically begin a datalog? Right now, the in-car PC boots in about 20 seconds, and I have set TunerStudio to launch automatically, the icing on the cake would be a way to launch TS from the command line and tell it to start logging.

Any suggestions are welcome!

(thought I'd add, I'm using VNC to remotely control this machine over an adhoc Wifi network. With a good antenna in the race car, and another on the push vehicle, it appears as though I'll be able to monitor and tune while the car is on course. Will be testing this more in the coming weeks before Bonneville).

-Scott

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Mon Jun 18, 2012 1:52 pm
by LT401Vette
Hi Scott,
Unfortunately, there is not. That wouldn't bea big deal and I have a plan for this beta cycle to cover it.
But right now you would need to do CTRL+L to start logging.

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Mon Jun 18, 2012 1:56 pm
by dieselgeek
LT401Vette wrote:Hi Scott,
Unfortunately, there is not. That wouldn't bea big deal and I have a plan for this beta cycle to cover it.
But right now you would need to do CTRL+L to start logging.
No problem. I'm happy to run a beta so, I will keep an eye out for it!! will gladly test it for you too.

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Mon Jun 18, 2012 3:02 pm
by The Deviant
It's sort of a kludge, but it will work until the feature is implemented in TS - using xdotool.

You can install it on your Ubuntu system with:

sudo apt-get install xdotool

xdotool does all sorts of neat things (can move the mouse, insert keystrokes, bring windows into focus, move 'em around, etc.).

Below is a simple script that will start TS and start logging, using xdotool to do the magic.

(Script starts TS, waits 15 seconds, sets variable "zid" to the windowid of the TS window, activates the TS window, then sends the keystrokes.)

jbass@galactica:~/TunerStudioMS$ cat AutoLog.sh
./TunerStudio.sh &
sleep 15
zid=`xdotool search --name "TunerStudio MS\(Beta\).*"`
xdotool windowactivate --sync $zid
xdotool key --clearmodifiers ctrl+l KP_Enter

jbass@galactica:~/TunerStudioMS$

Hope this helps some...

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Wed Jun 20, 2012 6:10 pm
by dieselgeek
James, that script worked perfectly - no debugging whatsoever, THANK YOU!!


Now I have an in-racecar PC that boots up in 15 seconds when the ignition is switched on, fires up TS and starts a timestamped datalog. So far, this system (on my kitchen table wit a 12v power supply) is 100% rock solid.

I plan on connecting to it via VNC with my laptop via ad hoc wifi, when in the pits or staging. Plus I get the benefits of fastest data logging using the serial port on the car pc.

Thanks again, this is exactly what I needed,

-Scott

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Mon Jun 25, 2012 11:45 pm
by Nigep
James, I shall be trying that !

I have a dedicated laptop that sits in my track car, all it does it datalog (occasionally I tweak the map, but thats is VERY infrequently), 99% of the time it is used to simply datalog. I`m running lubuntu and it automatically runs Tunerstudio, I then have to manually datalog once the car is turned on.

If your method works, that will do EXACTLY what I need !


Hopefully, a future release will have an `automatically datalog on startup` tickbox. If it loaded and started datalogging to a time-stamped file once the ECU was turned on, then stopped once the car was turned off, that would be perfect, but it sounds like your method is pretty close.

Thanks for posting. :D

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Wed Jun 27, 2012 11:26 pm
by Nigep
Er, this may be blindingly obvious to others, but where do I put the script to `autorun` so it starts logging automatically ? :oops:

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Fri Jun 29, 2012 9:39 am
by piledriver
Nigep wrote:Er, this may be blindingly obvious to others, but where do I put the script to `autorun` so it starts logging automatically ? :oops:
It depends on what desktop you are using:

kde,:mkdir ~/.kde/Autostart, stick the script in there, chmod it executable, and Bobs your uncle after you restart X..

If running the default Ubuntu Gnome based setup, http://www.ghacks.net/2009/04/08/add-an ... autostart/

For lxde http://wiki.lxde.org/en/Autostart (Highly recommended, low overhead Lightweight X11 Desktop Environment)

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Fri Jun 29, 2012 9:44 am
by dieselgeek
piledriver, do you recommend me running the lighter weight X environment on my Atom processor car PC? Teh default Ubuntu window manager seems fine, vmstat shows the box is 98% idle when TS is up and logging...


Any other input on my car PC is welcome! I'm not working up a wifi ad hoc network setup so I can remote control the PC from inside our push truck. Provided I can set up decent wifi antennae and probably a 1w booster on each end.

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Fri Jun 29, 2012 9:55 am
by Peter Florance
dieselgeek wrote:piledriver, do you recommend me running the lighter weight X environment on my Atom processor car PC? Teh default Ubuntu window manager seems fine, vmstat shows the box is 98% idle when TS is up and logging...


Any other input on my car PC is welcome! I'm not working up a wifi ad hoc network setup so I can remote control the PC from inside our push truck. Provided I can set up decent wifi antennae and probably a 1w booster on each end.
http://www.radiolabs.com/Articles/wifi-antenna.html

Directional antennas maybe?

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Fri Jun 29, 2012 10:47 am
by piledriver
dieselgeek wrote:piledriver, do you recommend me running the lighter weight X environment on my Atom processor car PC? Teh default Ubuntu window manager seems fine, vmstat shows the box is 98% idle when TS is up and logging...


Any other input on my car PC is welcome! I'm not working up a wifi ad hoc network setup so I can remote control the PC from inside our push truck. Provided I can set up decent wifi antennae and probably a 1w booster on each end.
I would give it a shot, once lxde is installed you just select it as your default desktop once from the GDM or whatever (you get it when you log out of X .. The "login" screen should have menus for stuff)

Gnome, esp the Unity desktop ... (expletives deleted)... is a resource hog not meant for weak processors/graphics.
The next version won't even have a 2D only option.

There's literally a herd of window managers out there to try, XFCE is another somewhat more integrated option for lightweight hardware.

It's going to be tough to get a mile of range out of wifi with a bulletproof signal in a possibly electrically noisy environment, but you know the drill with the resistor plugs etc.
You'll need directional antenne at least.

IIRC you may be able to stream digital (modem) data on CB bands, might check on the legality and practicality of that.
At least you won't be power limited.
.

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Fri Jun 29, 2012 11:59 am
by dieselgeek
I have a HAM license. I can stream over packet radio up to, I believe, 5 watts? I have to check into that. Was hoping that I could use decent antennae and power booster to get there. I'm a little afraid of a completely directional antenna because those need aimed properly and this is a slightly moving target. Semi-directional would work best. I notice that racing radio systems seem to put an Omni on the car, and a Yagi or other directional along the track...

let's go ahead and have that discussion if you guys are interested. I have a simple Intel mini-PCI card in the car, and two antenna leads coming off it (that I can solder to whatever antenna I end up using.

SOme at my work have suggested I should use a wireless access point meant for cars (trains, actually) as these can have higher transmit power. I'd rather do it without the A/Ps. How would you guys approach this?

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Fri Jun 29, 2012 3:37 pm
by old guy
Have you looked at any of the X-Bee stuff. I had some on a racing motorcycle that were good for 1/2 mile, but they make modules that have more range than the ones that I was using. They are line of sight,but i am sure this would be no problem at Bonneville. Here is a link to a sight that has a lot of X-Bee products and information, but if you look around you can find a little better price on these.
Board member Whittlebeast gave me a lot of help setting these up.
http://www.sparkfun.com/

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Sat Jun 30, 2012 8:52 pm
by piledriver
Hhhhmmm that would have been less expensive (series 1) or about the same (series2) as a BT solution...

Hows the effective datarate etc? (series 2B=1 mile range, is that with omnis? Me likes, HTF did I never notice these? :yeah!: )

BT says it can do serial data at 900K baud, but it's latency is the pits & ~no timing guarantees, it can barely give you 15FPS updates on Tuner Studio, but I suppose with a remote X session, it would be NBD as the X11 protocol itself and the remote access systems were built to work with high latency marginal connections.

I'd happily pay again for a wireless setup that could deliver a solid >50 FPS update rate in TS like std RS232.

Any suggestions as to a cheaper source than sparkfun for the Xbees?
(preferably one that actually answers technical questions unlike sparkfun)

EDIT---bad news is xbees/xbee Pros are apparently really limited in meatspace to <56K half duplex serial data, ~19.2 full duplex, so same or slower than BT. :cry:
(i.e: You can SET it to 156K, but don't expect to get actual data out the other end)

but if you have $900/end to spend, they have a 4W 900MHz ethernet bridge that can give you ~1mb, up to 15 mile range LOS with dipoles. :twisted:

What do the big dogs use for telemetry?

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Sun Jul 01, 2012 9:21 am
by old guy
A little bit over my head on all the technical stuff. I was just using them to data-log, not remotely tune the vehicle You may want to pm Whittlebeast . He is a racer and a really nice guy and was the one that helped me set these things up.
As far as the price, look around on E-Bay or just do a Google search. I think I had about $150 in my setup including antennas, enclosures and misc components.
You might also want to research some of the stuff that radio control airplanes are using. i have seen some that even have video camera capabilities.
Hope this helps.

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Thu Jul 05, 2012 10:55 pm
by Nigep
Anyway...... if Tunerstudio can automatically log on startup, that`d be great... :mrgreen:

Re: TunerStudio in Linux - automatic logging upon launch?

Posted: Tue Feb 05, 2013 5:52 am
by jibaine
Hello, can somebody gives me the script he use to start Tuner Studio at login, I run it on Linaro distribution with LXDE desktop. I can execute a simple shell at login (.config/autostart method) but not launch TS.
Thank you