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

rasberry pi integration

Postby weeblebiker » Sun Apr 15, 2012 5:56 am

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, duel wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L 16V, TD0-14T, itbs E85
weeblebiker
Experienced MS/Extra'er
 
Posts: 309
Joined: Sun May 11, 2008 4:03 pm

Re: rasberry pi integration

Postby jsmcortina » Sun Apr 15, 2012 6:02 am

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

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 27127
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: rasberry pi integration

Postby racingmini_mtl » Sun Apr 15, 2012 7:59 am

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
racingmini_mtl
Super MS/Extra'er
 
Posts: 6284
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada

Re: rasberry pi integration

Postby retired » Sun Apr 15, 2012 8:33 am

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
retired
Helpful MS/Extra'er
 
Posts: 77
Joined: Fri Feb 22, 2008 11:49 am
Location: Rural Suffolk, UK

Re: rasberry pi integration

Postby weeblebiker » Sun Apr 15, 2012 9:59 am

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, duel wheel, sequential ignition, staged injection, boost control, maf
'87 VW scirocco, 2L 16V, TD0-14T, itbs E85
weeblebiker
Experienced MS/Extra'er
 
Posts: 309
Joined: Sun May 11, 2008 4:03 pm

Re: rasberry pi integration

Postby retired » Sun Apr 15, 2012 10:36 am

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.
retired
Helpful MS/Extra'er
 
Posts: 77
Joined: Fri Feb 22, 2008 11:49 am
Location: Rural Suffolk, UK

Re: rasberry pi integration

Postby weeblebiker » Sun Apr 15, 2012 5:38 pm

yah just getting ahead of things.
i just need to slow down.
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: 309
Joined: Sun May 11, 2008 4:03 pm

Re: rasberry pi integration

Postby racingmini_mtl » Mon Apr 16, 2012 8:50 am

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
racingmini_mtl
Super MS/Extra'er
 
Posts: 6284
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada

Re: rasberry pi integration

Postby LT401Vette » Mon Apr 16, 2012 10:31 am

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
User avatar
LT401Vette
Super MS/Extra'er
 
Posts: 8030
Joined: Sat Jul 16, 2005 8:07 am
Location: Charlotte, NC

Re: rasberry pi integration

Postby weeblebiker » Mon Apr 16, 2012 11:39 am

newark.com
search rasberry pi
looks like 1 per preorder or your preorder delivery gets pushed from August to September
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: 309
Joined: Sun May 11, 2008 4:03 pm

Re: rasberry pi integration

Postby piledriver » Fri Apr 20, 2012 2:43 pm

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.
piledriver
Super MS/Extra'er
 
Posts: 1047
Joined: Tue Oct 27, 2009 6:24 am

Re: rasberry pi integration

Postby Twistedmetal » Fri Apr 20, 2012 9:27 pm

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?
MS2 v3 w/Ford IAC mod running MS2Extra 3.3.2b8
EDI8, dual coil packs, 60# highZ injectors
91 Ford Mustang, modified 5.0, 70mm turbo @ 11#s
Twistedmetal
Helpful MS/Extra'er
 
Posts: 72
Joined: Mon Jul 11, 2011 9:43 am
Location: NW Minnesota

Re: rasberry pi integration

Postby piledriver » Fri Apr 20, 2012 9:40 pm

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.
piledriver
Super MS/Extra'er
 
Posts: 1047
Joined: Tue Oct 27, 2009 6:24 am

Re: rasberry pi integration

Postby m3ltd0wn » Sun Apr 22, 2012 10:47 pm

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 :)
m3ltd0wn
Helpful MS/Extra'er
 
Posts: 135
Joined: Sun Oct 03, 2010 2:32 am

Re: rasberry pi integration

Postby retired » Fri May 04, 2012 2:54 pm

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 ???
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 » Mon May 14, 2012 6:12 am

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
Graham T
MS/Extra Newbie
 
Posts: 14
Joined: Tue Feb 01, 2011 12:41 pm

Re: rasberry pi integration

Postby UnaClocker » Tue May 15, 2012 8:27 pm

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
User avatar
UnaClocker
Super MS/Extra'er
 
Posts: 1932
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA

Re: rasberry pi integration

Postby UnaClocker » Wed May 16, 2012 5:12 pm

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
User avatar
UnaClocker
Super MS/Extra'er
 
Posts: 1932
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA

Re: rasberry pi integration

Postby Graham T » Wed May 16, 2012 6:56 pm

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?
Graham T
MS/Extra Newbie
 
Posts: 14
Joined: Tue Feb 01, 2011 12:41 pm

Re: rasberry pi integration

Postby UnaClocker » Wed May 16, 2012 7:07 pm

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
User avatar
UnaClocker
Super MS/Extra'er
 
Posts: 1932
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA

Next

Return to Tuner Studio

Who is online

Users browsing this forum: Google [Bot] and 4 guests