rasberry pi integration

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

Re: rasberry pi integration

Postby Graham T » Wed May 16, 2012 7:22 pm

Actually that is quick. Only reason I asked is because I understood that they were satisfying are UK orders before shipping overseas, and neither Rod or I have seen ours yet - Patience is not one of my virtues...

I had already discussed removing alot of features in TunerStudio by email with phil, thats when he gave me some tips on turning off features and functionality.
I like the sound of GaugeStudio...

I guess once someone is up and running with the physical device he maybe able to give a bit more input based on the results that are seen.


Edit - Spelling
Graham T
MS/Extra Newbie
 
Posts: 14
Joined: Tue Feb 01, 2011 12:41 pm

Re: rasberry pi integration

Postby weeblebiker » Thu May 17, 2012 4:16 am

I'd rather have a way to be able to tune with the pi, maybe have a full verion TS with a minimal graphics choice that can be used for on they fly tuning and a gauge only choice with full gauge graphics.

or better, just run full TS, it cant be more resource comsuming than the multiplayer quake demo the developers were able to run on a pi's networked together
v2.2 box, ms2, duel wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L 16V, TD0-14T, itbs E85
weeblebiker
Experienced MS/Extra'er
 
Posts: 234
Joined: Sun May 11, 2008 4:03 pm

Re: rasberry pi integration

Postby LT401Vette » Thu May 17, 2012 5:40 am

I’m not sure if this is the correct way of doing things but it certainly worked on the emulation – at least as far as TunerStudio being able to find the drivers.


That sounds pretty much correct to me.
If you have the compiled binary, the key is renaming it to librxtxSerial.so, then replacing the one in the dirs:
[TunerStudioInstallDir]/
and
[TunerStudioInstallDir]/lib/
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 7777
Joined: Sat Jul 16, 2005 8:07 am
Location: Charlotte, NC

Re: rasberry pi integration

Postby LT401Vette » Thu May 17, 2012 5:45 am

I'm not slated to get mine until August, but from what I understand production is ramping up and those dates may be shortened.
But then, it'd be just as helpful to have actual video drivers for the Pi's GPU in the X Server rather than just using the frame buffer


Are you short actual video drivers for the GPU now?
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 7777
Joined: Sat Jul 16, 2005 8:07 am
Location: Charlotte, NC

Re: rasberry pi integration

Postby Graham T » Thu May 17, 2012 7:49 am

I've just been doing a bit of reading to understand the comments on the graphics drivers or lack thereof and I’m still a bit vague on it.

Would I be correct in assuming that as the output resolution increases, this causes issues because there is no acceleration on the Rpi?
One thought that crossed my mind is that it looks like Brian is connecting the Rpi to a screen through HDMI?
Most of the small screens I looked at – at least low value ones – specifically design for in car use seem to be limited to AV or composite conectivity– certainly the cheap one I have bought - which in turn means resolution would be limited – mine is 1024 x 600.
Again I know it’s not real world but in my emulation on a laptop, QEMU is max’d out at 800x600. I had a 8” console on screen, which displayed a size and quality that I would be happy with in a car – after all, I will only be glancing from time to time.
So I guess the question is: will graphics performance be better if the resolution is lowered?
Graham T
MS/Extra Newbie
 
Posts: 14
Joined: Tue Feb 01, 2011 12:41 pm

Re: rasberry pi integration

Postby UnaClocker » Thu May 17, 2012 3:53 pm

Discussion of the work on GPU drivers for XWindows is here:
http://www.raspberrypi.org/phpBB3/viewt ... f=2&t=4649

As for the screens, yes, so far I've only had the Pi hooked to my 47" 1080p TV. I definitely don't want to ever hook the thing up with composite video, I actually desoldered and removed that connector to make more room for other mods I plan to do to the thing. The Pi has two LCD connection points on the board, but I haven't seen anyone actually use them yet. They use some kind of industry standard for small LCD's. Small like digital camera or phone..
The option I plan to go with is a very cheap bare VGA LCD w/ DVI input that's readily available on eBay. The resolution is low, but FAR better than composite (composite is going to be essentially 512x480i, 480i is really just 240..).
Check out this screen, this is what I plan to use, resolution isn't great, but for a gauge only install, replacing my instrument cluster, it'll be great.
UnaClocker
Super MS/Extra'er
 
Posts: 1932
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA

Re: rasberry pi integration

Postby UnaClocker » Sun May 27, 2012 10:03 am

I'm running Raspbian on the Pi now, that's the recompiled Debian that utilizes the hardware FPU in the CPU. Makes a nice performance difference. I also overclocked the Pi from it's default 700MHz to 1GHz. That helps a lot too. Anyways. TunerStudio takes a full 3 minutes from the time you hit enter at the command line before the splash screen shows up. From there, it's not long before you get the error about RxTx, gotta click No to get TS to continue to load. After that I'm in TS, so I tried to load the default MS3 project. I could see the CPU gauge peg for another minute or two, and then it stopped. Gave it another 5 minutes or so, CPU gauge at idle, so it seemed to have given up. I then closed TS. Here's the log file from my attempt.
Attachments
TunerStudioAppDebug.txt
(27.52 KiB) Downloaded 38 times
UnaClocker
Super MS/Extra'er
 
Posts: 1932
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA

Re: rasberry pi integration

Postby retired » Sun May 27, 2012 10:23 am

Brian,

In the last hour we now have one up and running over here without the serial errors.

See Graham's earlier post as to how to get the serial drivers to work.

We've been working on it together by email since Friday afternoon when mine arrived - he's been testing it on an emulation and I've been physically playing with SD cards and a real RPi.

Stanadard CPU speed, the recommended debian squeeze and so far a load time of 1min 35secs to the full set of default guages.

I just need to install the genuine RS3232 chip on my proto board to make sure the comms are real but everything in TS says the drivers have loaded correctly and defaulted to COM8, just waiting for the physical comms device to be connected. :D

Then it all gets posted to Graham for him to optimise - he's better at Linux than me..... :mrgreen:

Rod.

(edit to make more sense).
retired
Helpful MS/Extra'er
 
Posts: 77
Joined: Fri Feb 22, 2008 11:49 am
Location: Rural Suffolk, UK

Re: rasberry pi integration

Postby LT401Vette » Sun May 27, 2012 10:58 am

I'd bet the load time could be cut in half with a gauge only mode, which would not be too complicated.

I'm interested to see how well it runs while connected. It is a very slow processor, but good graphics. It will be interesting.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 7777
Joined: Sat Jul 16, 2005 8:07 am
Location: Charlotte, NC

Re: rasberry pi integration

Postby retired » Sun May 27, 2012 11:11 am

LT401Vette wrote:I'd bet the load time could be cut in half with a gauge only mode, which would not be too complicated.


I think that would be really useful :D

LT401Vette wrote:I'm interested to see how well it runs while connected. It is a very slow processor, but good graphics. It will be interesting.


We'll find out tommorow (UK time) - I'm not rushing it, I had a blonde moment and nearly used a 5V comms chip instead of 3.3V :RTFM:
retired
Helpful MS/Extra'er
 
Posts: 77
Joined: Fri Feb 22, 2008 11:49 am
Location: Rural Suffolk, UK

Re: rasberry pi integration

Postby Graham T » Sun May 27, 2012 12:53 pm

Although I have not timed each event - the biggest time issue is loading the project - not sure if Gauge only mode would help speed up the project loading?

Also, I advised Rod against using anything better that a Class 4 SD card because of the compatibility issues that had been reported on the Raspberry forums and wiki.
However, there are now alot of class 6 and class 10 SD cards tested and proven. So, I have ordereed a class 4, class 6 and class 10 - all in the proven list, just to be sure that it is not I/O speed causing the extended project load.

Once the project is loaded though, it seems the gauge cluster is not too long in loading. Even using the bar/ LED gauge template.

I have a raspbian image downloaded and ready to go. Bythe time I have that up on the emulator, I should have Rod's Rpi. - Still a month until mine is due.
Graham T
MS/Extra Newbie
 
Posts: 14
Joined: Tue Feb 01, 2011 12:41 pm

Re: rasberry pi integration

Postby LT401Vette » Sun May 27, 2012 1:22 pm

Yeah, in a gauge only mode, I could skip loading a good number of project and ini parts.

Also in the next beta round I plan to do some optimizing of the project load for android which has similar hardware.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 7777
Joined: Sat Jul 16, 2005 8:07 am
Location: Charlotte, NC

Re: rasberry pi integration

Postby UnaClocker » Sun May 27, 2012 1:55 pm

Don't see why running almost 50% slower, andwithout an FPU would make it load faster. I've benchmarked this thing, the performance goes up dramatically with the overclock. The FPU benchmark went from a score of 700 something to 80 something (lower being better, it was a timed test). Totally worth running Raspbian, it's not on the "recommended" list simply due to it not being done yet. Work in progress, much like this TS project, it's a work in progress. Also, the class 10 card I am using is astoundingly faster than the class 4 I also have. Doesn't take a research grant to see applications loading far far faster than they did before. X pops up in like half the time. This thing is definitely handicapped with a class 4 SD card.
For a baseline, MegaTunix is pulling itself up in 15 seconds or so. Can't get the gauges to work yet, so it's still not a viable option, but even at the hard to believe minute and a half you quoted, it's still a factor of 4 slower.. I'll see if I can follow the RxTx hack instructions you posted, maybe that'll solve the problem I'm having. If that's what's causing the slowdown, I suspect my load time will be under a minute.
UnaClocker
Super MS/Extra'er
 
Posts: 1932
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA

Re: rasberry pi integration

Postby retired » Sun May 27, 2012 2:15 pm

Brian,

It just does..... 1min 35secs on a class 4 Sandisk card. The class 10 I tried (Integra Ultima Pro) - not on the approved/tested list - failed to boot.

I'm sure it can be improved on but I like what you are doing with Megatunix, personally I would actually prefer that solution.

Keep us posted on that one.

Graham has already said he is going to try Raspian but at the moment we only have the one RPi between us and we are many miles apart.

Graham's serial drivers just work - real test tommorow - with an actual 3.3V serial chip and an MS2 :D

Rod.
retired
Helpful MS/Extra'er
 
Posts: 77
Joined: Fri Feb 22, 2008 11:49 am
Location: Rural Suffolk, UK

Re: rasberry pi integration

Postby UnaClocker » Sun May 27, 2012 2:27 pm

I've got two more Pi's on the way, I'm going to send one to Phil. Dj has been SSHing into my Pi and trying various tricks to fix the gauge problem. But it takes over an hour to compile MTX on this thing.. heh.. Anyways.. Back on topic..
I had good librxtx drivers already installed, thanks to the Arduino IDE I already installed (which works great, btw). So I copied those over to the three directories suggested. I didn't see a point in editting the .sh file at this point, due to having replaced all copies of the bad rxtx. And yeah, that worked fine. So you guys were right, it does load significantly faster with the rxtx working. 12 seconds and the splash screen is up, 25 seconds I see the MTx window. With the MS3 example project set as default, I'm at the gauges with no CPU load at 1 minute 25 seconds. Gauge demo is more of a slideshow, but that's the [lack of] video drivers, I'd imagine.
Not bad, I'm impressed. I suspect there'll be proper video drivers before the backlog of preorders is fullfilled (so sometime around Christmas). :)
UnaClocker
Super MS/Extra'er
 
Posts: 1932
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA

Re: rasberry pi integration

Postby retired » Sun May 27, 2012 3:03 pm

All good stuff :D

But you've only got 10 seconds ahead of us with overclocking and a faster SD card...... :yeah!:

It will be really interesting to see how this pans out.


I still can't understand how you can get these boards delivered before us in the UK :x

Anyway, bedtime over here.....
retired
Helpful MS/Extra'er
 
Posts: 77
Joined: Fri Feb 22, 2008 11:49 am
Location: Rural Suffolk, UK

Re: rasberry pi integration

Postby UnaClocker » Sun May 27, 2012 3:10 pm

I may still be getting some timeouts on the serial. It came up with the no valid serial port the first time, I said "Always Yes", so it'll still look, but always fail without complaint. It didn't seem to see any valid serial ports when I pulled down the port selection box. I'll try plugging in a USB-serial adapter and see if having a valid port defined helps any. I agree, unless I'm timing it wrong, or the MS3 project takes longer to load or something, mine should be running a bit faster.
UnaClocker
Super MS/Extra'er
 
Posts: 1932
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA

Re: rasberry pi integration

Postby LT401Vette » Sun May 27, 2012 3:17 pm

An ms3 project would take longer. The ini is quite a bit larger.
You could strip out quite a lot when you are just lioking for gauges. The entire [Menu] and [UserDefined] sections can be cleared for starters.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 7777
Joined: Sat Jul 16, 2005 8:07 am
Location: Charlotte, NC

Re: rasberry pi integration

Postby LT401Vette » Sun May 27, 2012 3:20 pm

Also, on linux you won't see anythink in the port drop down if there isn't a port connected. On linux and OS X that drop down is populated with the valid port on the machine.
But from something Graham had emauled me, it seemed the Ras Pi image may not use convensional naming for serial ports?
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 7777
Joined: Sat Jul 16, 2005 8:07 am
Location: Charlotte, NC

Re: rasberry pi integration

Postby UnaClocker » Sun May 27, 2012 3:34 pm

Makes sense on the time to load. Maybe I'll try the MS2 project, see how fast that comes up. Then I'll see about making a streamlined stripped down MS3 ini like you suggested.
As for the port name, It's probably the hardware serial port that has a funny name. When I plugged in my usb-serial adapter in the past, it was either a normal name, or abundantly obvious which one it was. :)
Seems like TS on my Linux laptop has no problem suggesting a valid choice when my USB port comes up under a new name after sleep.
I posted on the MTx RPi thread, there are quite a few people working on getting the Microchip 2515 CAN-SPI chip working with the Pi, it's supported by the Linux kernel, and I guess it comes up as a network interface. Would be pretty cool to be able to interface through can, so the Pi can just be a dashboard, and you'll still have the MS serial port free for normal tuning and such..
UnaClocker
Super MS/Extra'er
 
Posts: 1932
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA

PreviousNext

Return to Tuner Studio

Who is online

Users browsing this forum: No registered users and 3 guests