iPhone app

All Megasquirt 1 support questions. See also the Documentation

Moderators: jsmcortina, muythaibxr

DaveW
Experienced MS/Extra'er
Posts: 151
Joined: Mon May 17, 2004 9:05 am
Location: North Yorkshire, UK
Contact:

iPhone app

Post by DaveW »

Sorry if this is posted in the wrong place !

I'm looking for a bit of feedback and to see if anyone else is doing something similar already.

I'm in the early stages of writing an iPhone app that will display and log data from an MS1/Extra ECU. The "data engine" that retrieves, logs and can play back the data is done and dusted and I'm now in the second part of the current development, producing useful views of the data for the user to view.

In addition to logging the normal realtime data from the ECU the app will log and display the current location, speed and acceleration/deceleration either in 3 axis or as a combined value (assuming the platform you are running it on has the necessary hardware). The logs can then be fed into MSLV.

Later in the year I'll be looking for testers who have iPhones/iPads and would be interested in testing the app prior to it being made publicly available on the app store. The app can be tested without any additional hardware.

As well as feedback on potential features/functionality of the app I'd be interested to hear from anyone who's been down this route before and can forewarn me about any brick walls/gotchas that I'm about to run headlong into !

I also need a name for the app !
Matt Cramer
Super MS/Extra'er
Posts: 17499
Joined: Thu Apr 16, 2009 8:08 pm

Re: iPhone app

Post by Matt Cramer »

Very cool! We get people asking if there's an iPhone app for MegaSquirt quite often, but I'm not aware of any projects that have gotten that far.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
wildman
Helpful MS/Extra'er
Posts: 104
Joined: Tue Aug 31, 2004 5:52 am
Contact:

Re: iPhone app

Post by wildman »

Guess any form of iTune is out.

I have an iPad and a touch, love to help out.. Let me know.
Tonymill
MS/Extra Newbie
Posts: 4
Joined: Tue Aug 03, 2010 7:09 pm
Location: Perth, Western Australia
Contact:

Re: iPhone app

Post by Tonymill »

Great idea Dave, If you need testers, let me know.

Cheers

Tony
ptownsin
MS/Extra Newbie
Posts: 28
Joined: Thu May 05, 2005 4:03 am
Location: Peterborough, UK

Re: iPhone app

Post by ptownsin »

Does the iPhone have a serial port then?
DaveW
Experienced MS/Extra'er
Posts: 151
Joined: Mon May 17, 2004 9:05 am
Location: North Yorkshire, UK
Contact:

Re: iPhone app

Post by DaveW »

ptownsin wrote:Does the iPhone have a serial port then?
No... (not officially anyway).

The app connects via tcp so you can use an RS232 to WiFi adaptor on the ECU and connect to it that way. For test purposes I've put together a "bridging app" so you can use a WiFi enabled laptop to pretend to be an RS242 to WiFi adaptor. That way people can test the app without having to buy an adaptor first.

The adaptor I'm using at the moment fits inside the MS ECU case.
richyvrlimited
Master MS/Extra'er
Posts: 568
Joined: Mon Jun 26, 2006 1:03 pm
Location: Warrington, NorthWest England

Re: iPhone app

Post by richyvrlimited »

very very cool

Will you be offering a version that can communicate with MSII and MSIII aswell?

I'd be happy to test non-theless, I have both an iPad and an iPhone3G and 3GS
2003 MX5. Coldside MP62
-
MS3, RTC, & Knock board, Release 1.2. LC-1 Wideband.
DaveW
Experienced MS/Extra'er
Posts: 151
Joined: Mon May 17, 2004 9:05 am
Location: North Yorkshire, UK
Contact:

Re: iPhone app

Post by DaveW »

I plan to support MSII and MSIII as well at some point, MS1Extra is just a convenient starting point as I have access to a few different vehicles running it.
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: iPhone app

Post by UnaClocker »

I'm really glad someone is doing this now. I'm glad you're taking this on in bitesize chunks too. Get it to display the raw data, then move on to getting some gauges. It'd be nice to eventually be able to change the settings on the MS from within the app.
Brian
'84 Dodge Rampage
wildman
Helpful MS/Extra'er
Posts: 104
Joined: Tue Aug 31, 2004 5:52 am
Contact:

Re: iPhone app

Post by wildman »

If ya have a laptop in the car configure it's wireless adapter to be add hoc.
Connect to it with your iPad, use vnc or rdp to take control of the laptop and enjoy megatune on the iPad.
I ran down the express way doing this works real nice.
But. It's a tease compared to a native app. I mean I'm still using the laptop, but it does look cool.
DaveW
Experienced MS/Extra'er
Posts: 151
Joined: Mon May 17, 2004 9:05 am
Location: North Yorkshire, UK
Contact:

Re: iPhone app

Post by DaveW »

I thought I'd post a small progress report :)

I've done some back to back comparisons of the datalog outputs from the iPhone app and Megatune and have refined the data conversions as a result. As far as I can tell, the data logs are pretty much spot on now and the sampling rate of the iPhone is comparable to Megatune which was one concern I had lurking in the back of my mind. The app now reads and interprets all the standard .ini and .inc files so hopefully adapting it for use with other versions of MS shouldn't be too time consuming.

I've started putting some basic gauges and layouts together for the iPhone and hope to take it out on the road this weekend to grab some real data rather than just megastim driven data.

There's a sneak preview of the working version of the gauges available here...
http://www.youtube.com/watch?v=gbpd3tjFRGA

Still more elements to add and those that are there need some work on both the graphics and customisation but it's a starting point :)

Still need some inspiration on what to call the app !
Last edited by DaveW on Thu Aug 12, 2010 4:03 pm, edited 1 time in total.
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: iPhone app

Post by UnaClocker »

That's awesome! Can't wait to see it on a real phone with a real motor. :) I'd call it iSquirt, but that name is already taken.. Maybe iTune? or iGauges if that's available..
Brian
'84 Dodge Rampage
megaS1
Helpful MS/Extra'er
Posts: 45
Joined: Wed Aug 15, 2007 10:54 am
Location: Birmingham, England

Re: iPhone app

Post by megaS1 »

awesome idea, was thinking why no one had tried it yet after seeing the innovate one.

I'll give it a go for sure.
Mad Menace
Experienced MS/Extra'er
Posts: 319
Joined: Sat Feb 27, 2010 8:03 pm
Location: Leadville Colorado USA

Re: iPhone app

Post by Mad Menace »

Still need some inspiration on what to call the app !
Call it "iSquirt" :yeah!: :yeah!: :yeah!:

I would not only be willing to try this, I really want it!!!
I got all the Criteria...
MS3-MS3x w/4bar MAP & Barro correction
Jailbroken iPhone 3g
TunerStudio Full Edition

It would be awesome to Un-clutter the front seat of the truck and use something that I always have in my pocket anyway...

P.s. Can I get a link to this Wifi adapter thats supposed to work with these things?
MS3-MS3X 4bar Map w/Baro Correction, 1993 Mitsu Mighty Max 4g64 converted to 16v DOHC, 9.1:1 Billet Alum. Pistons, SS Valves, t3/t4 AR .50 Turbo, 27" FMIC, Walbro 255 LPH fuel pump, 550cc EvoIII injectors, Ford 36-1 w/VR, Ls2 Coil On Plug
DaveW
Experienced MS/Extra'er
Posts: 151
Joined: Mon May 17, 2004 9:05 am
Location: North Yorkshire, UK
Contact:

Re: iPhone app

Post by DaveW »

Just an update...

Pressures of my day job have slowed the development of the app down but slow but steady progress is being made.

The wi-fi to serial adaptor I bought is still not working (not just with my iPhone app, it just doesn't work at all !) and I'm trying to get my money back from the suppliers who have been no help at all. I chose their wi-fi adaptor primarily because it comes as a bare PCB that is easy to fit inside the MS enclosure but given the problems I've had I'm now looking at more "consumer facing" suppliers with plug and play devices. The WiSnap looks like a possibility, more expensive than the one I've bought already but then it may actually work properly !
http://www.serialio.com/products/mobile ... napAAA.php

As a workaround for testing and development I ended up writing an application that runs on my PC and pretends to be a Wi-Fi adaptor. I tried a couple of commercial apps that purported to do that anyway but in testing found that they could only deliver around 4 data streams per second whereas my own streamlined version will do at least 12 a second so I've stuck with my own.

The demise of my in-car PC due to me not sealing the waterproof cover properly meant I had no way of testing the app outside of a test environment until today when I finally got the PC rebuilt and managed to take the iPhone app on a real test run to see how the logging performed. One of my main concerns, the potential lack of logging speed on an iPhone, has been laid to rest, the resulting log is perhaps a bit low in rows per second terms, however, I've not done any optimisation yet and it's already acceptable I think. I'm testing it on a 3GS running IOS 4.1 at the moment, if the speed does become an issue I can always run a "post recording" function that handles the data calculations. I might do that anyway as it will make the log playback function on the phone a lot easier to implement.

I've attached a datalog that I made with the phone earlier today if anyone wants to spend some time checking that the values in it look about right...
datalog201010161553.xls
Working name for the app at the moment is MobiSquirt on the grounds that the other alternatives suggested or that I've come up with so far either get a bit too close to Apple trademarks for comfort or come up with some very dubious content when you google it :)
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: iPhone app

Post by UnaClocker »

Very cool. :) Looking forward to this being available in the future. :) If you need a tip on a good CarPC, I found one I'm very happy with, it's a "FoxConn Nettop", dual core Atom CPU, and it was like $150 (without ram or HD) from NewEgg.. Also runs directly off the battery voltage in the car without an adapter quite well. :)
Brian
'84 Dodge Rampage
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: iPhone app

Post by 24c »

DaveW I bought a WiFi dev kit that I can only assume has one of the parts you are describing. :shock:

I too and stuffed with work, and also working away from home, so progress on any projects are way too slow. Really frustrating for me too, and I will try and get my dev kit to work in adhoc mode later today with the MacBook, but only with the bench test rig and TunerStudio. I will also check if I can see it on my iPhone 4, if it helps. BTW, I got the RN-134-K and also looked at the WiSnap first, because I was trying to do away with the wired USB Serial cable to the laptop by using a Bluetooth adaptor with TunerStudio. Never got that to work in OSX, more coin down the drain! :(

Otherwise, this is great news from you.

PS Can you see your device with the WiSnap app?
Yamaha GTS1000 v2 MicroSquirt, B&G 2.891
Yamaha GTS1000 v3 beta MicroSquirt, B&G3.760
Yamaha GTS1000 MSExtra 3.1, Dual VR Board
Yamaha YZF1000 MSExtra 3.1
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: iPhone app

Post by 24c »

Well I can see why you're getting p*ssed off. I have a few bits on the phone, booting the dev kit from a PP9 for now, and all the leds are blinking or solid. I did manage a brief connection on the Macbook using MacWise and managed to get everything to send a message back. I also got the HELLO response, but I kept getting an error trying to go into CMD mode by entering the $$$ string.

I also managed to see the adhoc network on the iPhone using the Telnet app and also get the HELLO message back, but I am unable to type anything in Telnet or connect using port 23.

...and don't mention WiSnap, it can see it but then tells me to buy a free app...and then it can't get onto the iTunes store, even though I can, but there is no facility/dropdown to buy etc... stuck in a loop with this.

EDIT Using Terminal, telnet ip portnumber which is telnet 169.254.1.1 23 does not connect, but telnet 169.254.1.1 2000 creates the right response HELLO, and then I can use the get everything $$$ commands etc, so there might be a fault with MacWise like HyperTerminal.
Yamaha GTS1000 v2 MicroSquirt, B&G 2.891
Yamaha GTS1000 v3 beta MicroSquirt, B&G3.760
Yamaha GTS1000 MSExtra 3.1, Dual VR Board
Yamaha YZF1000 MSExtra 3.1
DaveW
Experienced MS/Extra'er
Posts: 151
Joined: Mon May 17, 2004 9:05 am
Location: North Yorkshire, UK
Contact:

Re: iPhone app

Post by DaveW »

I've decided to take the plunge and bought an RN-134, I'll let you know how I get on with it later in the week with any luck :)

As long as the iPhone can establish an adhoc connection to it I'll be happy.
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: iPhone app

Post by 24c »

DaveW wrote: As long as the iPhone can establish an adhoc connection to it I'll be happy.
It does, but you use port 2000 to talk to it. Documentation is a little confusing. I tried yesterday, but mine died, started playing up as just get the blue led lighting up now. So just to test the unit away from home, I have just got ripped off in Maplins (UK Electronics shop for those that don't know) buying a few batteries to drive the thing. It could just be the 9V PP9 dying, in a couple of hours the new ones will be charged.

In the meantime, I am going to try the USB port on the MacBook and see if I can reconfigure it, but I have to read the manual some more...
Yamaha GTS1000 v2 MicroSquirt, B&G 2.891
Yamaha GTS1000 v3 beta MicroSquirt, B&G3.760
Yamaha GTS1000 MSExtra 3.1, Dual VR Board
Yamaha YZF1000 MSExtra 3.1
Post Reply