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

Post Reply
weeblebiker
Master MS/Extra'er
Posts: 421
Joined: Sun May 11, 2008 4:03 pm

rasberry pi integration

Post by weeblebiker »

any get one of the first release?
looks like it should be able to run tuner studio (700mHz processor). looks like a neat way to integrate a full mini computer to run a lcd dash and a human interface into the car for cheap
rasberry pi $35
7" usb monitor $105 ($200 for touch screen)
mini wireless keyboard and touchpad $27


I'm on the pre order list for August release!
v2.2 box, ms2, dual wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L16V, TD0-14T turbo, itbs
jsmcortina
Site Admin
Posts: 39569
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: rasberry pi integration

Post by jsmcortina »

I've not ordered (yet.) Keep us posted.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
racingmini_mtl
Super MS/Extra'er
Posts: 9127
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: rasberry pi integration

Post by racingmini_mtl »

The problem I see is the very small amount of memory. With only 256MB of RAM shared with video, I think it's going to be problematic. Phil would be better able to say if it's even possible.

But I know of a couple of people looking into it (they may chime in here later) and I look forward to their results. It would be a great solution.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
retired
Helpful MS/Extra'er
Posts: 142
Joined: Fri Feb 22, 2008 11:49 am
Location: Rural Suffolk, UK

Re: rasberry pi integration

Post by retired »

racingmini_mtl wrote:But I know of a couple of people looking into it (they may chime in here later) and I look forward to their results. It would be a great solution.
I guess I'm one of the ones Jean mentions, Graham T being the other.

Yes, memory could well be an issue, Graham is looking at that, I'm just doing the hardware (add-on PCB) to make it work in a car (power supply, serial link etc.).

Graham has already had TS running under a cutdown version of Linux on a laptop so we are hopefull.

Now if there were to be a cutdown version of TS, ie, just display from MS2/3 and IOx, no changing settings or any form of tuning, just purely outwards comms, that could be really usefull in saving memory.

Because we are both UK, we are probably going to get ours earlier, I have a provisional date of early May (second batch).

The only immediate hardware issue we are debating is the RPi only has composite video (RCA) and HDMI, the two extremes, but no VGA. Composite is probably cheapest (for cheap in-car displays) but pretty poor quality (won't know for sure until mine arrives) and you can't get a cheap HDMI "car size" display.

But we are going to give it a go :D
Classic Mini "A" series 5 port 1360 turbo
MS2-E fully sequential siamese code
14point7 SLC widebands, inner and outer cylinders and after turbo
digital AFR data and digital displays via Tiny-IOx
weeblebiker
Master MS/Extra'er
Posts: 421
Joined: Sun May 11, 2008 4:03 pm

Re: rasberry pi integration

Post by weeblebiker »

lilliput makes mini monitors in usb vga and hdmi. the hdmi goes for $170
not knowing anything, why isn't a hdmi to usb adaper not an option for the monitor?
v2.2 box, ms2, dual wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L16V, TD0-14T turbo, itbs
retired
Helpful MS/Extra'er
Posts: 142
Joined: Fri Feb 22, 2008 11:49 am
Location: Rural Suffolk, UK

Re: rasberry pi integration

Post by retired »

Converters/adapters are allways an option but whether you look at prices in US$ or GB£, there seems little point in spending too much money on converters/screens until we know if the RPi is a viable option.

Once we get the RPIs, it's easy enough to develop/test on any modern TV/monitor (HDMI) or older TV (composite) but not on a traditional PC monitor (VGA or DVI).

If the principle is viable, then we look in more detail at output options/limitations.
Classic Mini "A" series 5 port 1360 turbo
MS2-E fully sequential siamese code
14point7 SLC widebands, inner and outer cylinders and after turbo
digital AFR data and digital displays via Tiny-IOx
weeblebiker
Master MS/Extra'er
Posts: 421
Joined: Sun May 11, 2008 4:03 pm

Re: rasberry pi integration

Post by weeblebiker »

yah just getting ahead of things.
i just need to slow down.
v2.2 box, ms2, dual wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L16V, TD0-14T turbo, itbs
racingmini_mtl
Super MS/Extra'er
Posts: 9127
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: rasberry pi integration

Post by racingmini_mtl »

Phil,

I don't know if you've seen this thread but do you have any comment on this? Do you think this limited amount of RAM is sufficient to run TS or would it require a trimmed down version?

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
LT401Vette
Super MS/Extra'er
Posts: 12684
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: rasberry pi integration

Post by LT401Vette »

No I had not...

I think the 256 MB will be ok as the computer won't be doing much else.

For performance the video chip performance will be the big question... The processor isn't very fast, but with good video and good video drivers should be able to do it..

The biggest obstacle to trying it out will be getting the RXTX driver working. There are pre-compiled ARM RXTX drivers available for download, but I haven't seen any one get one to work yet... I'll have to try to get one of these and give it a go.
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
weeblebiker
Master MS/Extra'er
Posts: 421
Joined: Sun May 11, 2008 4:03 pm

Re: rasberry pi integration

Post by weeblebiker »

newark.com
search rasberry pi
looks like 1 per preorder or your preorder delivery gets pushed from August to September
v2.2 box, ms2, dual wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L16V, TD0-14T turbo, itbs
piledriver
Super MS/Extra'er
Posts: 1678
Joined: Tue Oct 27, 2009 6:24 am
Location: Van Alstyne, Texas

Re: rasberry pi integration

Post by piledriver »

I had TS working for the most part on an N800, I was running hard out of memory trying to run Java SE on it, but serial appeared to work, just unusable slow.
128M was nowhere near enough esp given shared video memory.

It was swapping hard and using >330M total, imho 512 might be considered a bare minimum, but that was also running all the std std Nokia Linux stuff in the background.
Always doing things the hard way, MS2 sequential w/ v1.01 mainboard, LS2 coils. 80 mile/day commuter status.
Twistedmetal
Helpful MS/Extra'er
Posts: 85
Joined: Mon Jul 11, 2011 9:43 am
Location: NW Minnesota

Re: rasberry pi integration

Post by Twistedmetal »

piledriver wrote:I had TS working for the most part on an N800, I was running hard out of memory trying to run Java SE on it, but serial appeared to work, just unusable slow.
128M was nowhere near enough esp given shared video memory.

It was swapping hard and using >330M total, imho 512 might be considered a bare minimum, but that was also running all the std std Nokia Linux stuff in the background.
Are you running linux natively or via VNC?
MS3X v3 w/Ford IAC mod running MS3 1.41
Sig PIP TFI trigger with direct coil control, 60# highZ injectors
91 Ford Mustang, modified 5.0, 70mm turbo @ 11#s
piledriver
Super MS/Extra'er
Posts: 1678
Joined: Tue Oct 27, 2009 6:24 am
Location: Van Alstyne, Texas

Re: rasberry pi integration

Post by piledriver »

Twistedmetal wrote:
piledriver wrote:I had TS working for the most part on an N800, I was running hard out of memory trying to run Java SE on it, but serial appeared to work, just unusable slow.
128M was nowhere near enough esp given shared video memory.

It was swapping hard and using >330M total, imho 512 might be considered a bare minimum, but that was also running all the std std Nokia Linux stuff in the background.
Are you running linux natively or via VNC?
The N800 ran Linux from the factory., Nokias custom version called Maemo, Debian based.
I returned the N800 after playing with it a bit and fixing the jacked up SW load it had on it, as the fellow sold it as an N810, which has WIMAX, and it wasn't.
The guy thanked me for fixing it for him, he could never get it to work properly ;-).

It actually ran chroot'd Ubuntu pretty reasonably, considering.

It's aslo possible the rediculous slowness of TS was graphics related, the N800 is quite long in the tooth now.
Always doing things the hard way, MS2 sequential w/ v1.01 mainboard, LS2 coils. 80 mile/day commuter status.
m3ltd0wn
Helpful MS/Extra'er
Posts: 149
Joined: Sun Oct 03, 2010 2:32 am

Re: rasberry pi integration

Post by m3ltd0wn »

raspberry should do well for TS graphics, saw some demo about rasp's graphics on youtube and for a ARM based processor I was like "wow" :)
though nice idea for a carputer :)
retired
Helpful MS/Extra'er
Posts: 142
Joined: Fri Feb 22, 2008 11:49 am
Location: Rural Suffolk, UK

Re: rasberry pi integration

Post by retired »

Any further thoughts on this ???

I've got a scheduled delivery date of W/C May 28th and should have all the supporting bits (12V from car power supply, serial to MS2 etc) on a custom PCB by the time it arrives.

Graham has been running some emulations - main issue being the RXTX drivers as expected - but we won't know for certain until we get a real one in our hands.

Anyone ahead of us on this or any further thoughts ???
Classic Mini "A" series 5 port 1360 turbo
MS2-E fully sequential siamese code
14point7 SLC widebands, inner and outer cylinders and after turbo
digital AFR data and digital displays via Tiny-IOx
Graham T
MS/Extra Newbie
Posts: 21
Joined: Tue Feb 01, 2011 12:41 pm

Re: rasberry pi integration

Post by Graham T »

Although I am nowhere near finishing testing, I thought I would add an update to this thread.

I’ve been working on and off, as Rod has stated previously, on testing TunerStudio in an ARM environment.
I have got the latest debian squeeze image for the raspberry – debian6-19-04-2012 from http://www.raspberrypi.org/downloads - working within an emulated environment. I am using QEMU on a Ubuntu host.
The image is installed with openjkd6 and a full, registered copy of TunerStudio.
There are some “quirks” to using the emulator such as it does not load into a user interface - it loads into command line and the user needs to use the STARTX command to get to the user interface. I'm not sure if this can be overcome.
Because of this I have not been able yet to set a script to open Tunerstudio at startup.

Load times for TunerStudio are at the moment slightly long and the CPU monitor is showing 100% utilisation when Tunerstudio loads, but on load completion the utilisation goes down dramatically.
I have the emulator set to use 192Mb RAM. The Raspberry pi GPU needs a minimum memory of 32Mb, so this gives a bit of leeway.
Although I cannot quote figures – I’m nowhere near the install at the moment and never thought to note exact figures - the debian task manager is showing very low memory usage during TunerSTudio startup and also once it is running - though that will inevitably rise once data starts to flow.

Opening TunerStudio in full screen mode does not seem to make that much difference to speed of opening – at the moment loading the project and dash seem to be causing the biggest delays. That said, it is an emulation and it is running off of a 5 year old laptop with a 5400rpm hard drive, so I guess with the OS on the actual device and running off of an SD card, IO should be much quicker.

The 3 main drawbacks so far with using the raspberry image in QEMU are:
The obvious – it’s only an emulator
The graphics are not what they could be – I’m stuck with a max resolution of 800x600, which makes life painful and it’s only emulating a cirrus graphics card, rather than the Raspberry pi GPU, so there should be a lot of improvement with the real hardware.
I cannot for the life of me get comms into the emulated machine, ie pass through from either the host serial port or a USB serial convertor. I suspect that this is due to my being a novice with all things Linux and especially the QEMU software…

hence, at this point I think I have gone as far as I can with testing in an emulation.

So far with TunerStudio loaded in full screen mode, using one of the pre defined dash layouts, I’ve had “reasonable” results with the gauge demo mode. Not as smooth as would be liked, but again, that’s probably down to the fact it is an emulation.

I have been in contact with Phil via email regarding optimising TunerStudio and he has given me some pointers, but up to now, I have not had time to test them.

I did have problems as suspected with rxtx drivers, but that was easily overcome by download the correct rxtx drivers for the ARM processor.
I say overcome, but I can only go by the fact that TunerStudio started by complaining about not finding rxtx drivers. After downloading and moving the rxtx-2.2pre2 to the correct paths and renaming to rxtxserial.so, TunerStudio loaded happily. But, because I cannot get data from the host serial port, I cannot definitively say that it will work.
Very soon – I hope, we will have a Raspberry pi in hand to continue testing, but for now I thought I would share my findings.

Just as a besides, I have bought a cheap 9” display for testing - http://eonon.co.uk/Stand%20Alone/L0608.html
The resolution is a bit irregular, 1024 x 600 but I got it for $55 delivered.
I do not have a PC with AV outputs, so I have plugged it into the av port of my blu-ray player for testing and it is actually a lot better than I expected.

So if the physical Raspberry pi plays nicely with TunerStudio, using Rods custom power supply/comms PCB, this should be a rather inexpensive and compact alternative to the myriad of gauges I would otherwise need on my dash.


Anyhow, results look promising at this point.

As said I am a Linux novice, so please feel free to correct me/ give me some pointers if I have anything wrong in any of my assumptions.

Graham
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: rasberry pi integration

Post by UnaClocker »

I've got a Raspberry Pi, I'll look into getting the OpenJDK installed and see if RXTX is going to play nice with the ARM CPU.
Brian
'84 Dodge Rampage
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: rasberry pi integration

Post by UnaClocker »

Took something close to 5 minutes to load. Stuck on the RXTX drivers. Now that I have a JVM, I was able to install the Arduino IDE. Seems to have functional RXTX drivers, just gotta figure out where they are, and how to move them and where to move them to.
Maybe I can download the RXTX source and compile it myself?
Brian
'84 Dodge Rampage
Graham T
MS/Extra Newbie
Posts: 21
Joined: Tue Feb 01, 2011 12:41 pm

Re: rasberry pi integration

Post by Graham T »

If I remember correctly, I downloaded and installed the librxtx-java_2.2pre2-2 package using aptitude

Copied the file librxtxSerial-2.2pre1.so from the folder /usr/lib/jni/ into the TunerStudio root folder and the alternate linux x86_amd64 folder.
Then renamed the librxtxSerial-2.2pre1.so to librxtxSerial.so, hence over writing the librxtxSerial.so that were already in those folders.
This was using a beta version of TunerStudio.
Then I copied the line in the TunerStudio.sh file which actually launches the application to a new .sh file and replaced the driver path variable with a hard coded path to the alternate linux drivers folder that I had copied the new librxtxserial.so into.

TunerStudio then stopped complaining about missing rxtxserial drivers and loaded up to allow me to create a project.
TunerStudio was very slow for me on start up when it could not find the rxtx drivers. once it had the drivers, load time was MUCH quicker. If I recall the tunerstudiolog showed a lot of errors when it was looking for the drivers.

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.

Sorry the paths for TunerStudio and the command line I used are vague, I’m on Business in Thailand at the moment and all of my research is on my test laptop back in the UK. I hope this may be of some use?

Also, this maybe of some help when getting the actual serial ports to work on the device:
http://www.irrational.net/2012/04/19/us ... rial-port/


Just as a matter of interest how did you manage to get a Rpi so quickly?
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: rasberry pi integration

Post by UnaClocker »

heh, didn't feel like I got one quickly. I was on their mailing list starting in October. February 29th when they opened up preorders, I got an order in with Newark/Farnell/Element14, as well as a "registration of interest" with RS/Allied within the first 5-10 minutes after it was made public. Newark has yet to actually ship the one I paid for in February, but on May 4th, my number came up with RS and they invited me to order one. They shipped it May 8th, somehow it got from the UK to my mailbox here in Tacoma on the 10th.
I'll give your tips a whirl and see where I get with it. It'd be great if Phil could whip up an actual Lite version of TS that ONLY has code to display the gauges. (Maybe call it GaugeStudio? heh) 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, I don't imagine the gauges can run smoothly until that happens.
Brian
'84 Dodge Rampage
Post Reply