IPhone display for Megasquirt

This forum is for the discussion of other projects on Megasquirt/Microsquirt hardware that don't fit into any of the other forums

Moderators: jsmcortina, muythaibxr

Post Reply
adamnreeves
Experienced MS/Extra'er
Posts: 220
Joined: Fri Nov 20, 2009 10:55 am

IPhone display for Megasquirt

Post by adamnreeves »

As I use my IPhone for lots of things and always carrying it with me. Thought it would be nice to have an App for displaying stuff from Megasquirt.

Anyone done anything or thinking of doing something?

I've done some research last night and the problems as I understand are:

Problem 1:Apps have to be approved by Apple with is constraining and costly.
Solution: Jailbreak the Iphone google for Cydia. I've done this and it works. Its run the Darwin opsys which is a variant of Unix. I've got a command line now ;-)

Problem 2: If I want to develop using Apple's Objective C don't I need a Mac?
Solution: Actually no, you can ssh to the Iphone via WiFi and edit, developer and compile right on the Iphone!

Problem 3: Iphone has not serial port.
Solution: Actually it does Pin1, Pin12,Pin13,Pin18 on its dock interface provide grd,tx,rx and 3.3v. Its at TTL level. You can get a converter from/to TTL to +12, google max232
Solution: Could also get a serial to bluetooth convertor

Problem 4: I want to use Java.
Solution: There is a jvm called jamvm that is part of the apps available under Cydia.


Problem 5: Who is going to do this??
Solution: You, me?
Westfield SEiGHT 4.6 Stage III
Running Megasquirt3 Wasted Spark using EDIS-8 Firmware MS3Extra 1.1.1
Build site
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: IPhone display for Megasquirt

Post by 24c »

I got Apple iPhone developer status just to try and see what I could find out re documentation, but unfortunately it's a minefield for a newbie, and work takes most of my time. I have a Mac or two and yes you need one to make an official app AFAIK. The serial port does exist in the dock connector pin outs, but the cable adapter has to be a referenced design approved by Apple, and can only work with one app (IIRC)
Once you get an iPhone to work you also bring an iPod Touch & iPad to the party. 8)

Another option is process the MicroSquirt serial data into an OBDII stream, and that way you could use a WiFi OBDII interface (Innovate OT2 & ElmCan etc), an existing .app and a MS serial port to OBDII female adapter. I have no idea how an OBDII stream is organised or the pinouts, but I imagine an interface board could be made.

...and yet another option is via MegaTunix, and I have assisted this with a few scant ideas & donationware etc, and I know djandruczyk is looking at it.
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
adamnreeves
Experienced MS/Extra'er
Posts: 220
Joined: Fri Nov 20, 2009 10:55 am

Re: IPhone display for Megasquirt

Post by adamnreeves »

Mike,

I had thought about the Wifi OBDII but ruled it out as it would be much more expensive. I believe to interface an iPhone to a traditional RS232 would be quite cheap, maybe along lines of £20. I've actually started to order the electronics for this!

Megatunix in theory could be ported I guess the majority of the porting effort will be around the GUI. Initially I just want to prove the concept, i.e. get the interface working and display some rudimentary stats being displayed such as RPM, AFR, temperature. Yes you right, once working on iPhone then will work on all the apple devices, IPad is particularily interesting.
Westfield SEiGHT 4.6 Stage III
Running Megasquirt3 Wasted Spark using EDIS-8 Firmware MS3Extra 1.1.1
Build site
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: IPhone display for Megasquirt

Post by 24c »

I think the Innovate OT1 is about £80, and that includes the wifi adapter. The short term problem is the lack of OBDII info from the MicroSquirt. If you knew how to convert the MS serial stream into an OBDII data stream than that would be a big leap forward. The annoying bit is Innovate, Rev etc can take this OBDII data and convert into gauges, tabbed screens etc.

Does anybody know what serial data protocols are used in ODBII? I've tried googling in the past.
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
adamnreeves
Experienced MS/Extra'er
Posts: 220
Joined: Fri Nov 20, 2009 10:55 am

Re: IPhone display for Megasquirt

Post by adamnreeves »

I thought it was more than that, but even so £80 + whatever is needed to convert RS232 to OBDII is a lot more expensive. The other option is a serial to bluetooth convertor but I looked at this in the past and I was surprised that these were as expensive as they were. BTw, I downloaded the SDK image last night, 2.9Gig! I need some of the headers for the Iphone development environment.

24c wrote:I think the Innovate OT1 is about £80, and that includes the wifi adapter. The short term problem is the lack of OBDII info from the MicroSquirt. If you knew how to convert the MS serial stream into an OBDII data stream than that would be a big leap forward. The annoying bit is Innovate, Rev etc can take this OBDII data and convert into gauges, tabbed screens etc.

Does anybody know what serial data protocols are used in ODBII? I've tried googling in the past.
Westfield SEiGHT 4.6 Stage III
Running Megasquirt3 Wasted Spark using EDIS-8 Firmware MS3Extra 1.1.1
Build site
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: IPhone display for Megasquirt

Post by 24c »

adamnreeves wrote:...The other option is a serial to bluetooth convertor but I looked at this in the past and I was surprised that these were as expensive as they were...
I got a couple of different makes, but I couldn't see them on the iPhone. I never managed to pair them either. I was using Windows at the time too. I believe others can get TunerStudio to see bluetooth devices intermittently on their PCs, doesn't help much with the iPhone though.

I should add to get it to work officially, I have to join the MFi program, pay a fee for the logo, whether it is wired or bluetooth, and for the later need to look for RFCOMM guidelines. Unfortunately to join MFi, I have to have a company email etc, so imagine you want to do something as a hobby or a small interest group and you are blown out of the water before you start. I might be an Apple user, but this does seem a little restrictive, and there doesn't seem to be an educational get out clause...

...and BTW you can't discuss it publicly either :twisted:
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
adamnreeves
Experienced MS/Extra'er
Posts: 220
Joined: Fri Nov 20, 2009 10:55 am

Re: IPhone display for Megasquirt

Post by adamnreeves »

Well if it is like this then they will start losing market share to Android. I am off to have a look at that as a platform next.
24c wrote:
adamnreeves wrote:...The other option is a serial to bluetooth convertor but I looked at this in the past and I was surprised that these were as expensive as they were...
I got a couple of different makes, but I couldn't see them on the iPhone. I never managed to pair them either. I was using Windows at the time too. I believe others can get TunerStudio to see bluetooth devices intermittently on their PCs, doesn't help much with the iPhone though.

I should add to get it to work officially, I have to join the MFi program, pay a fee for the logo, whether it is wired or bluetooth, and for the later need to look for RFCOMM guidelines. Unfortunately to join MFi, I have to have a company email etc, so imagine you want to do something as a hobby or a small interest group and you are blown out of the water before you start. I might be an Apple user, but this does seem a little restrictive, and there doesn't seem to be an educational get out clause...

...and BTW you can't discuss it publicly either :twisted:
Westfield SEiGHT 4.6 Stage III
Running Megasquirt3 Wasted Spark using EDIS-8 Firmware MS3Extra 1.1.1
Build site
adamnreeves
Experienced MS/Extra'er
Posts: 220
Joined: Fri Nov 20, 2009 10:55 am

Re: IPhone display for Megasquirt

Post by adamnreeves »

APad looks cheap, runs Android and have USB ports! This could be a lot easier. Thanks.

Editted: That's it looks really good. £115 for the device. And the development environment uses the same platform that I use at work. SDK being downloaded....
Westfield SEiGHT 4.6 Stage III
Running Megasquirt3 Wasted Spark using EDIS-8 Firmware MS3Extra 1.1.1
Build site
adamnreeves
Experienced MS/Extra'er
Posts: 220
Joined: Fri Nov 20, 2009 10:55 am

Re: IPhone display for Megasquirt

Post by adamnreeves »

Okay, rename this to Apad! I have the SDK installed, development environment all working. Even had Android emulator working. The best news is that the programming language is Java.
Westfield SEiGHT 4.6 Stage III
Running Megasquirt3 Wasted Spark using EDIS-8 Firmware MS3Extra 1.1.1
Build site
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: IPhone display for Megasquirt

Post by 24c »

adamnreeves wrote:.. The best news is that the programming language is Java.
So you can run TunerStudio possibly, depending on what version of Java is in the aPad, so enjoy.

I have banged an email off to Apple to see what options are available to small interest groups. I wonder whether I will get a response? I am debating whether to get the FlexSerial connector, but it's more expense for an unknown.
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
adamnreeves
Experienced MS/Extra'er
Posts: 220
Joined: Fri Nov 20, 2009 10:55 am

Re: IPhone display for Megasquirt

Post by adamnreeves »

FlexSerial connector looks interesting though, however going to APad all you need is a USB to serial converter and I have one of those already.
Good look with Apple, be interested to know what happens here.

24c wrote:
adamnreeves wrote:.. The best news is that the programming language is Java.
So you can run TunerStudio possibly, depending on what version of Java is in the aPad, so enjoy.

I have banged an email off to Apple to see what options are available to small interest groups. I wonder whether I will get a response? I am debating whether to get the FlexSerial connector, but it's more expense for an unknown.
Westfield SEiGHT 4.6 Stage III
Running Megasquirt3 Wasted Spark using EDIS-8 Firmware MS3Extra 1.1.1
Build site
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: IPhone display for Megasquirt

Post by 24c »

Well I'm just going to try a different tack. I have an ELMCAN WLAN OBDII to DB9 adapter, and interestingly it comes with a separate D Sub9 Serial Port to OBDII connector. In fact you plug this WLAN unit straight into the serial cable with my cased MIcroSquirt. Obviously it doesn't power up, as it uses 12V DC from the car battery. I reckon if I power it up, and open up the Rev software I might get a battery voltage recorded using my iPhone, so that's one gauge working, only a dozen or so to go. :lol:

I have just traced the 16 pin OBDII connector to the nine pin DB9 connector, and all nine pins are active. I just have to look at the protocols for the OBDII
connector to see which are the most relevant or paired to the different standards J1850 VPW, J1850PWM & ISO 9141-2.

I checked on an OBDII website, and pin 6 , pin 14 were traced to the 9 pin serial connector on the ELMCAN cable, but I couldn't get any info...but I have now, as they are CAN High (J-2284) and CAN Low (J-2284). This is interesting as I believe CAN protocols are supported on the MicroSquirt. :shock:

I have to find my connector box now, so I can power the WLAN adapter up, and check it connects to my iPhone.
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
adamnreeves
Experienced MS/Extra'er
Posts: 220
Joined: Fri Nov 20, 2009 10:55 am

Re: IPhone display for Megasquirt

Post by adamnreeves »

Yes exactly like that. Thanks v.much for the link. Exciting stuff.
Westfield SEiGHT 4.6 Stage III
Running Megasquirt3 Wasted Spark using EDIS-8 Firmware MS3Extra 1.1.1
Build site
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: IPhone display for Megasquirt

Post by 24c »

MS2tester wrote:something like this
No, that's better :yeah!:

I do think using the OBDII plug interface is doable, and does have the advantage of being able to use other OBDII kit & related software. I am biased by having a motorcycle head, and strapping a netbook or similar to the handlebars isn't ideal. I already have the iPhone strapped to the bike in a Givi waterproof bag/pouch, and it works well for sat nav etc, so if I could get iPhone to talk to the OBDII CAN convert this to MS CAN, it would be able to request data from MS locations, and you'd have realtime info displayed in the OBDII app. I need to look at Lances GPIO stuff to find out more on MS CAN, as I have an idea that strapping an Innovate datalogger on my bike, interfacing it to the MIcroSquirt to give partial ODBII data (RPM, PW, MAP, TPS etc via an ODBII connector, would mean I'd have the best of both worlds.

So you can see I am still going to look at the CAN stuff some more, but DaveW work is the way to go.
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
alex8966
MS/Extra Newbie
Posts: 1
Joined: Thu Nov 30, 2017 5:25 pm

Re: IPhone display for Megasquirt

Post by alex8966 »

Help, I am verryyy non-tech savvy. I have an i-pad mini i would like to use with a serial port to run off my OBD 2. can I do this with an App or do I have to know some crazy code? Thanks
MS2tester
Master MS/Extra'er
Posts: 606
Joined: Sat Apr 11, 2009 12:54 pm
Location: Aalsmeer the netherlands
Contact:

Re: IPhone display for Megasquirt

Post by MS2tester »

mobisquirt is dead in the water
you might wanna look into a rasberry pi dash
there is everything from a 10 inch display to 2,5 inch
https://www.youtube.com/watch?v=MfER6mUjTFc&t=553s
Suprazz
Master MS/Extra'er
Posts: 499
Joined: Mon Jan 22, 2007 7:58 pm
Contact:

Re: IPhone display for Megasquirt

Post by Suprazz »

Look at RealDash and you can use a Perfect Tuning serial to wifi module: http://perfecttuning.net/en/accessories ... &results=7
Best looking and most advanced CAN-bus gauge
Toyota Supra 7MGE, 7M-GTE and 1JZ-GTE Plug and play ECUs: http://www.perfecttuning.net
Serial to Bluetooth or Serial to WiFi
DIYAutotune Canadian, EFI Source and ECUMaster reseller!
Post Reply