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

nuvolarossa
Experienced MS/Extra'er
Posts: 301
Joined: Tue Jul 27, 2010 6:15 am

Re: rasberry pi integration

Post by nuvolarossa »

I give up, after a few hours on a raspy1 b+ and arch...
what i wrote above works also on raspberry, you can make it boot straight to ts without desktop environment and without window manager.
BUT
boot aside it's still slow, too slow :roll: (raspberry 1)
forget about loading full ms3 projects, too slow.
even when overclocked at 900mhz i still get only 534 processor score :oops:
I'm pretty sure raspbian gave me the impression that tunerstudio on it was more fluid than arch.
I must check if all packets are up to date vs raspbian ones.
I feel like java lagging more on arch arm than raspbian, but it's only a feeling.
I think I'll give raspbian another try.
Robert
MS3x 1.4.1 | TS 3.0.28
grom_e30
Super MS/Extra'er
Posts: 4451
Joined: Thu Mar 08, 2012 12:44 pm
Location: UK

Re: rasberry pi integration

Post by grom_e30 »

How do i make it open Ts without it asking me if i want to 'Execute, Execute in Terminal, open or cancel' each time? cus thats getting old now.
1990 bmw 320i daily driver with m20b25 ms3 sequential fuel, 380cc injectors, d585 coil near plug, home made cam sync, launch control, fan control, vss, homebrew egt logging what's next????
nuvolarossa
Experienced MS/Extra'er
Posts: 301
Joined: Tue Jul 27, 2010 6:15 am

Re: rasberry pi integration

Post by nuvolarossa »

grom if you're on ubuntu, I explained in this post half way, you can choose alway run, ask, or always view as text file. http://www.msextra.com/forums/viewtopic ... 20#p431492

BTW I've got Arch much much faster!
I found the culprit: Arch ARM by defaults uses openjdk8 and there's no oracle on repositories... I was able to install oracle java 8 from their website and is MUCH MUCH faster.

Greatly surprised! mouse clicks/menu finally are somewhat responsive. (under 1sec from click)

some conservative times without optimizing much, no overclock:
51 seconds cold boot to tunerstudio idling ready + 37 seconds to load my full ms3x project. This on a raspberry v1 B+.
Pretty sure the boot time can be faster, don't know how much cause I need lots of the services like mouse etc :D

NOTE: times are with openbox. It could be faster(?) without it, but without window manager you can't resize the tables/move the windows...
e.g. if fuel table defaults too small, you can't resize it.
A small wm will be light enough to not slow down boot too much and you'll still be able to resize windows and tables inside tunerstudio.
Tried only openbox, will try others too.

2.951s (kernel) + 11.410s (userspace) = 14.361s
Also got processor score up to 2811 with oracle java @1080p:D
@1024x768 it goes up, 3102 :lol:

EDIT: overclock @1000mhz "turbo mode",
TunerStudio shows ready in 42s + another 25s to load full ms3 project = 1m 7s total

this raspberry 1 b+, arch arm, openbox, no DE, oracle java 8, wifi wep static, accelerated video driver and obv the correct rxtx lib
I give up definitely, I have enough of it, but it was fun.
Last edited by nuvolarossa on Sat Feb 28, 2015 9:44 am, edited 1 time in total.
Robert
MS3x 1.4.1 | TS 3.0.28
grom_e30
Super MS/Extra'er
Posts: 4451
Joined: Thu Mar 08, 2012 12:44 pm
Location: UK

Re: rasberry pi integration

Post by grom_e30 »

I'm still using raspbian atm.
1990 bmw 320i daily driver with m20b25 ms3 sequential fuel, 380cc injectors, d585 coil near plug, home made cam sync, launch control, fan control, vss, homebrew egt logging what's next????
nuvolarossa
Experienced MS/Extra'er
Posts: 301
Joined: Tue Jul 27, 2010 6:15 am

Re: rasberry pi integration

Post by nuvolarossa »

my overclocked 1GHz Raspy 1 B+ booting TS, just as a reference to compare with, I hope the new raspy 2 will be much faster:
https://www.youtube.com/watch?v=HRDAbwpkqqo

boot time can vary a few seconds depending on usb peripherals hooked, that's as slow it is :lol:
If you would like to use it as display only, maybe "disabling" the whole usb/drivers and input stack (and clearly stripping the project) will make it boot much faster.
Robert
MS3x 1.4.1 | TS 3.0.28
TheSilverBuick
Experienced MS/Extra'er
Posts: 356
Joined: Thu Feb 02, 2012 9:08 am

Re: rasberry pi integration

Post by TheSilverBuick »

LT401Vette wrote:
TheSilverBuick wrote:Yup, saw that too. I'm still moving forward on mine. I'm sorting out the powering system in the car for the Pi and screen as well as having issue with Tuner Studio maintaining it's registration on the Pi without an internet connection.
Did 2.6.15 not take care of the registration loss?
I just got back to this, and followed the instructions Brian sent me and now it works like a champ. I did install an RTC chip at the same time so the time didn't default to the 1970's. I may put a clock on the dashboard since it should technically keep time.

And for my purposes, a little slow on boot won't kill me. I am going to work on the power setup in the car, then start optimizing the boot up process of the Pi, and maybe with some guidance(?) trim the TunerStudio run file to load only the bare essentials(?).

For my '69 Firebird.
Image
"Hey, at least the Skylark proves that even a messy hack can patch together a reliable EFI system. I can't think of a time the MegaSquirt has left me stranded since installation ~100,000 miles ago."

Drag Week 2011, 2012 & 2015. - BB N/A - 1977 Skylark w/Buick 455 EFI and TKO-600!
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: rasberry pi integration

Post by LT401Vette »

Looks pretty good.

The ini loader has a read only mode where it only load the sections it needs for dashboard. That is what is used by ShadowDash, I thought there was a parameter you could put in the project to tell it to load in that mode, but it doesn't appear so. I need to add that.

By stripping do the ini you can remove a bunch of sections. Some things like all the tooltip help that has been added has caused a great deal of bloat in the newer firmwares and you don't need it for dashboards and data logging.

You can delete all these sections:
[LoggerDefinition]
[SettingContextHelp]
[Menu]
[ControllerCommands]
[UserDefined]
[PortEditor]
[CurveEditor]
[Tuning]
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
TheSilverBuick
Experienced MS/Extra'er
Posts: 356
Joined: Thu Feb 02, 2012 9:08 am

Re: rasberry pi integration

Post by TheSilverBuick »

Thanks Phil! Maybe this weekend I'll poke around with that, and I'll watch the future updates for possible changes.
"Hey, at least the Skylark proves that even a messy hack can patch together a reliable EFI system. I can't think of a time the MegaSquirt has left me stranded since installation ~100,000 miles ago."

Drag Week 2011, 2012 & 2015. - BB N/A - 1977 Skylark w/Buick 455 EFI and TKO-600!
winstonusmc
Experienced MS/Extra'er
Posts: 204
Joined: Sun Jul 31, 2011 7:45 am

Re: rasberry pi integration

Post by winstonusmc »

I have successfully freed up one of my registrations for the Pi. I have been messing with a Waveshare 3.2 touchscreen, so it has eaten up my time. OK, got the openbox-session working through .xsession in the /home/pi folder. I also stripped the INI as Phil suggested.

Here is the video booting up to my TV through HDMI. now that is done, I will work on a simpler dash when I get the 3.2" display configured. Power on to project loaded ~ 40 seconds

http://youtu.be/FOtBRfX9qyg
Nissan Skyline R34 RB26DETT ran MS3/MS3X w/ factory Hitachi CAS (sold)
Nissan Silvia S14 RB25DE ITB/NA ran MS3/MS3X w/ factory Mitsubishi CAS (disassembled)
Datsun 240z RB25DE ITB/NA with MS3/MS3X
winstonusmc
Experienced MS/Extra'er
Posts: 204
Joined: Sun Jul 31, 2011 7:45 am

Re: rasberry pi integration

Post by winstonusmc »

Update!

Got a pretty spiffy gauge display on the Waveshare 3.2 display................ but, I cant do anything offline. I get the registration error. I am attaching my debug text. As everyone can see I am using 2.6.17.

With the Pi 2 online and the 3.2 LCD configured, it will boot right into the dashboard I created.
TunerStudioAppDebug.txt
Tunerstudio boot up on the Raspberry Pi 2 3.2 LCD: http://youtu.be/MsHBQ-ACVpA
Nissan Skyline R34 RB26DETT ran MS3/MS3X w/ factory Hitachi CAS (sold)
Nissan Silvia S14 RB25DE ITB/NA ran MS3/MS3X w/ factory Mitsubishi CAS (disassembled)
Datsun 240z RB25DE ITB/NA with MS3/MS3X
mill383
Helpful MS/Extra'er
Posts: 134
Joined: Thu Nov 26, 2009 5:02 pm
Location: Indianapolis, IN

Re: rasberry pi integration

Post by mill383 »

[/quote] I just got back to this, and followed the instructions Brian sent me and now it works like a champ. I did install an RTC chip at the same time so the time didn't default to the 1970's. [/quote]


SilverBuick,
Great gauge installations. Nicely done. Which RTC clock did you get for the PI? I bought one from ebay last month, SunFounder DS3231 RTC http://www.amazon.com/gp/product/B00HF4 ... UTF8&psc=1, and have not been able to get it to work with my B+ model. I have since bought the new PI 2 (which should work much better anyways). Can you give some hints on how you got your RTC working on your PI? Which how-to message-board did you use? There are a bunch of them out there. I tried 3 or 4 of them, with no luck so far. Am running the standard NOOBs package (pre-loaded store-bought 8GB card) running Raspbian. Thanks. -Dave
Dave
1958 Cushman scooter Microsquirt'ed and turbo-ed
1994 Camaro MS3Pro and GPIO MShift
1996 Buick Roadmaster wagon, MS3Pro and uV3 TCU
grom_e30
Super MS/Extra'er
Posts: 4451
Joined: Thu Mar 08, 2012 12:44 pm
Location: UK

Re: rasberry pi integration

Post by grom_e30 »

I just got that same rtc you linked its working but the back up battery is dead so am waiting for a replacement works with my pi 2 apart from losing the time if the power is removed, have you enabled the i2c on the pi?? if not its covered here:
https://learn.adafruit.com/adafruits-ra ... guring-i2c

once you have done that follow this to set up the rtc:
http://thepihut.com/products/mini-rtc-m ... spberry-pi
1990 bmw 320i daily driver with m20b25 ms3 sequential fuel, 380cc injectors, d585 coil near plug, home made cam sync, launch control, fan control, vss, homebrew egt logging what's next????
mill383
Helpful MS/Extra'er
Posts: 134
Joined: Thu Nov 26, 2009 5:02 pm
Location: Indianapolis, IN

Re: rasberry pi integration

Post by mill383 »

Yes, that all looks familiar. And I thought the batt measured 3V. I'll check it again. It sure acted like a dead battery. Thanks for the feedback that at least that RTC unit is working for you.

Dave
Dave
1958 Cushman scooter Microsquirt'ed and turbo-ed
1994 Camaro MS3Pro and GPIO MShift
1996 Buick Roadmaster wagon, MS3Pro and uV3 TCU
grom_e30
Super MS/Extra'er
Posts: 4451
Joined: Thu Mar 08, 2012 12:44 pm
Location: UK

Re: rasberry pi integration

Post by grom_e30 »

I followed those instructions and it worked for me even with a dead battery it kept the time as long as I did not remove the power cord from the pi
1990 bmw 320i daily driver with m20b25 ms3 sequential fuel, 380cc injectors, d585 coil near plug, home made cam sync, launch control, fan control, vss, homebrew egt logging what's next????
mill383
Helpful MS/Extra'er
Posts: 134
Joined: Thu Nov 26, 2009 5:02 pm
Location: Indianapolis, IN

Re: rasberry pi integration

Post by mill383 »

Ok, I just set this up on the Pi2, and just like you said, it keeps time as long as power is connected (without internet). So looks like I need to order a battery too.
Thanks for the help.
Dave
1958 Cushman scooter Microsquirt'ed and turbo-ed
1994 Camaro MS3Pro and GPIO MShift
1996 Buick Roadmaster wagon, MS3Pro and uV3 TCU
TheSilverBuick
Experienced MS/Extra'er
Posts: 356
Joined: Thu Feb 02, 2012 9:08 am

Re: rasberry pi integration

Post by TheSilverBuick »

I bought the cheapest one I could find that was assembled. It was like $6 (but looks the same as the one you linked, might be the same). I just plugged it in and so far it appears to just be doing its job and I didn't do anything else, but I haven't done any real rigorous testing with it yet either. I'll double check it tonight to be sure it's working.

I updated Raspbian last night and it seemed to have significantly cleaned up the boot sequence and speed. However it toasted my ability to remote desktop into it now with my laptop. So I spent about an hour last night trying to get the remote desktop working again and still haven't succeeded. It says its installed and running but my laptop won't remote in even though I have the IP address and the Pi is receiving an internet connection through the Ethernet cable plugged into my laptop. Grr indeed, but I am happy to say the boot up speed seemed to be quite a bit faster now. My next step is to backup, then trim TS with Phil's guidelines.

How do you boot the Pi back up (to check the time) without removing the power cord? Once I go through the shut down procedures it is off until I unplug then replug it back in. It's going to live a brutal life in the car once I install it and it just get's it power abruptly cut. If I fry the hardware or corrupt the software I'll buy an intelligent power supply like I have in my Skylark.
"Hey, at least the Skylark proves that even a messy hack can patch together a reliable EFI system. I can't think of a time the MegaSquirt has left me stranded since installation ~100,000 miles ago."

Drag Week 2011, 2012 & 2015. - BB N/A - 1977 Skylark w/Buick 455 EFI and TKO-600!
grom_e30
Super MS/Extra'er
Posts: 4451
Joined: Thu Mar 08, 2012 12:44 pm
Location: UK

Re: rasberry pi integration

Post by grom_e30 »

on both my b+ and pi 2 there is an open header on the board next to the display adapter 2 holes thats the reset. if you shut it down but leave the power cord in, short those it will reboot without having to remove the cord.
1990 bmw 320i daily driver with m20b25 ms3 sequential fuel, 380cc injectors, d585 coil near plug, home made cam sync, launch control, fan control, vss, homebrew egt logging what's next????
old guy
Experienced MS/Extra'er
Posts: 362
Joined: Thu Jan 24, 2008 9:20 am
Location: North Carolina

Re: rasberry pi integration

Post by old guy »

TheSilverBuick
Experienced MS/Extra'er
Posts: 356
Joined: Thu Feb 02, 2012 9:08 am

Re: rasberry pi integration

Post by TheSilverBuick »

Oh, so that's how =P Learning something new!

That is a nifty power supply. The intelligent one I have on my Skylark (running a Win7 computer) uses a timer based off an 12v input. Basically when I turn the car off, it doesn't shut the computer down for about a minute (it's programmable), so cycling the key, etc won't re-boot the computer. It also has a low power shut off so if the voltage drops to ~9v it powers down. I have it programmed to hibernate the computer for shut down so the re-boot/startup is quicker. I'm thinking I'm going to utilize a 3-way toggle switch for the Pi. One will be ignition 12v, one will be battery 12v and one will simply be OFF. Normally I intend to leave it hooked to the ignition source, but if I'm tuning or just moving the car around a few times I'll set it to ON/battery or OFF.
"Hey, at least the Skylark proves that even a messy hack can patch together a reliable EFI system. I can't think of a time the MegaSquirt has left me stranded since installation ~100,000 miles ago."

Drag Week 2011, 2012 & 2015. - BB N/A - 1977 Skylark w/Buick 455 EFI and TKO-600!
mill383
Helpful MS/Extra'er
Posts: 134
Joined: Thu Nov 26, 2009 5:02 pm
Location: Indianapolis, IN

Re: rasberry pi integration

Post by mill383 »

I updated my Pi2 last night too. My goodness, it took forever!

SilverBuick,
What remote desktop method were you using? I had good success using TightVNC on a Pi B+, but haven't tried it on the Pi2 yet.

With regard to the RTC, I don't think you can just plug it in. There's about an hours worth of setup you have to do. Check out those two links that grom_e30 posted above. You have to enable the I2C bus etc. The way I was testing the clock was to remove power, disconnect the internet, wait several minutes, and power it back up. If the RTC is working, it'll keep time. In my case, pulling power causes it to lose time, so am thinking the on board coin battery must be bad.

This Pi2 is great. Am using it to post this right now. For a $35 computer, how cool is that? I'd recommend installing Iceweasel also, if you like the Firefox browser. Iceweasel is the linux version of Firefox. Pi2 -- your off the grid mini-computer. When some cataclysmic virus crashes all forms of windoze, at least I'll still be able to tune my car with the Pi. :yeah!:
Dave
1958 Cushman scooter Microsquirt'ed and turbo-ed
1994 Camaro MS3Pro and GPIO MShift
1996 Buick Roadmaster wagon, MS3Pro and uV3 TCU
Post Reply