iPhone app

All Megasquirt 1 support questions. See also the Documentation

Moderators: jsmcortina, muythaibxr

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 »

MicroSquirt IS MS2.. So if you support MS2, MicroSquirt is supported. MS3 isn't much different than MS2, so once you have MS2 support, you'll pretty much have MS3 support.
Brian
'84 Dodge Rampage
onslack
MS/Extra Newbie
Posts: 16
Joined: Thu Aug 24, 2006 4:02 am
Location: Westsussex, UK

Re: iPhone app

Post by onslack »

Good work daveW!

Have you got any screen shots of the work in progress?

I'm hoping to get my car fired up on megasquirt within the next week! :D
Image
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 »

onslack wrote:Good work daveW!

Have you got any screen shots of the work in progress?

I'm hoping to get my car fired up on megasquirt within the next week! :D
There is a short video of the basic functions here:
http://www.youtube.com/watch?v=MhNojpF4qKQ
ThatGuy
Helpful MS/Extra'er
Posts: 46
Joined: Thu Sep 30, 2010 1:14 pm

Re: iPhone app

Post by ThatGuy »

Is there any hope for USB or bluetooth connectivity with the iPhone? because looking around at Wifi devices for the Megasquirt, most of them are currently out of my spending budget.
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 »

The problem with USB Bluetooth connectivity is tied up with the Apple licensing restrictions. If you make something that hooks up to the dock connector, you pay a fee for that, and the Bluetooth side is deliberately shackled too. It looks like iOS 4.2 (developer issue) is making things easier, but wifi is still the best option for connectivity. The chips are coming down in price, as I think the cheapest TTL device is sub £50 in the UK, but dedicated RS232/WiFi dongles are in the £100 mark, and industrial grade devices double this.

For readymade RS232/WiFi devices, Serialio do the WiSnap, which I think is a Roving Networks product copy, and there is this Korean unit
http://www.eztcp.com/en/products/csw-h80.php
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 »

ThatGuy wrote:Is there any hope for USB or bluetooth connectivity with the iPhone? because looking around at Wifi devices for the Megasquirt, most of them are currently out of my spending budget.
Not really :(

Bluetooth is limited at the moment to specific uses within the iPhone, primarily audio. It's a shame as Bluetooth to Serial adaptors do seem to be a lot cheaper than the WiFi equivalent.

A USB or serial adaptor would be possible BUT getting an accessory such as that approved by Apple is expensive and so far none of the manufacturers of such things have brought one to market for whatever reason. I assume the costs of manufacturing a serial adaptor are felt to outweigh the potential market. With such a relatively small market the adaptor would probably end up costing more than the $99 a WiFi adaptor costs and given a choice between the two a WiFi adaptor has a lot more uses.

The reason I ended up using WiFi in the end was simply because it's the only way the iPhone can communicate with the outside world without any restrictions. If any other methods of connecting come up it wouldn't be a big job to change the app to use them.

One option that may be worth considering if someone wants to try it is to use an RN-131G instead of the RN-134. It's $49 at DigiLink and is the module that the RN-134 is based on. It's missing the RS232 adaptor but could potentially be hooked up directly to the MS, bypassing the RS232 stage altogether or you could build your own RS232 stage onto it. It's a surface mount module but at half the price of the RN-134, which is an RN-131G mounted on a PCB with an RS232 chip and 3 LEDs. I suspect, though I've not tried it, that either module could also be used on the CAN connection on an MS2.
onslack
MS/Extra Newbie
Posts: 16
Joined: Thu Aug 24, 2006 4:02 am
Location: Westsussex, UK

Re: iPhone app

Post by onslack »

dave where did you get your wifi adapter from? i'm going to need one! :lol:

the one listed/linked by 24c are £84 in the UK!

http://www.equinox-tech.com/products/de ... sp?ID=1314
Image
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 bought this one...
http://www.sequoia.co.uk/shop/product.php?p=872

They also stock the RN-134K which is the same but with some cables/connectors.
http://www.sequoia.co.uk/shop/product.php?p=873
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 »

onslack, I bought the RN-134K too, and only because it had the connectors. :)

I had been looking at the WiSnap from serialio, but the prospect of paying OTT duty, meant I searched/looked at UK sources including sequoia & coolcomponents. There are other WiFi devices available in Europe, and a lot of CAN based stuff too in Germany, but all of these are more expensive than the Roving Networks, except the PIC based CAN bits.

I like the idea of a freestanding unit like the WiSnap, because you could adapt it or use it for other stuff too, but I must admit I'll be looking at integrating a comms board into my MIcroSquirt Module one day, and I'll be going down a small low cost module for that.
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
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: iPhone app

Post by racingmini_mtl »

DaveW wrote:I suspect, though I've not tried it, that either module could also be used on the CAN connection on an MS2.
How? There's no CAN port on that module. The only way you could connect this to the MS2 CAN bus would be through a microcontroller that has a CAN port and either a UART or an SPI port which are the 2 communication ports on that module. And then you'd have to implement the MS CAN protocol on that MCU together with the CAN passthrough code or some modification of it if you used the SPI port.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
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 »

Newb question, but I've been wondering it for awhile.. What does SPI stand for?
I like the idea of using the unit without a RS232 chip.. Would you just connect it directly to the RX and TX pins on the MS CPU? Remove the RS232 chip from the MS mainboard?
Brian
'84 Dodge Rampage
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: iPhone app

Post by racingmini_mtl »

UnaClocker wrote:Newb question, but I've been wondering it for awhile.. What does SPI stand for?
I like the idea of using the unit without a RS232 chip.. Would you just connect it directly to the RX and TX pins on the MS CPU? Remove the RS232 chip from the MS mainboard?
Have a look here: http://en.wikipedia.org/wiki/Serial_Per ... erface_Bus.

As for not using the RS232 chip, from my quick look at the module you'd have to use some sort of level converter because the module is a 3.3V device so the UART signals are also 3.3V. If you use the RS232 connection then there is no issue since this is actually doing a level conversion. But that also means that using the RN131 module would require a 3.3V supply and some level conversion.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
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 »

racingmini_mtl wrote:
DaveW wrote:I suspect, though I've not tried it, that either module could also be used on the CAN connection on an MS2.
How? There's no CAN port on that module. The only way you could connect this to the MS2 CAN bus would be through a microcontroller that has a CAN port and either a UART or an SPI port which are the 2 communication ports on that module. And then you'd have to implement the MS CAN protocol on that MCU together with the CAN passthrough code or some modification of it if you used the SPI port.

Jean
Sorry, a flight of fancy on my behalf, I tend to get carried away with that sort of thing :)
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 »

@Jean
I realise this is slightly off topic.

Could you not convert the RS232 from the MS2 to CAN?
I have seen RS232 to CAN converters and IIRC racepak do something similar with their interface modules. I think they only monitor 13 channels though.
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
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: iPhone app

Post by racingmini_mtl »

RS232 and CAN work in very different ways. RS232 is just a stream of bytes while CAN is formatted in packets with a header section and a data section. So unless you know how to convert the stream of bytes into the packets and fill correctly the header, there is no way to do the conversion. What you refer to must be for going from one specific serial protocol to another specific CAN protocol and there must be a device (CPU, FPGA, ASIC or something similar) to convert the data between the 2. Moreover, you don't have the same bit rates so there is a need to buffer data.

Again, since the MS CAN protocol and serial protocol are unique to MS, there is no other solution than having some MCU (or another programmable device) between the 2 which is programmed specifically for the task.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

RS232 to CAN

Post by 24c »

racingmini_mtl wrote:...
Again, since the MS CAN protocol and serial protocol are unique to MS, there is no other solution than having some MCU (or another programmable device) between the 2 which is programmed specifically for the task.
Something like this then, www.can232.com
It has a Atmel AVR ATMega162 & a Philips CAN controller built in.
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
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: iPhone app

Post by racingmini_mtl »

It might work if you can actually re-program the thing which I'm not sure from the quick look I had at the site. But I could produce a similar product for less than what they charge for theirs (but it might not have the nice package) and it would be targeted for an MS application.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
morris
MS/Extra Newbie
Posts: 16
Joined: Mon Sep 19, 2005 12:59 pm

Re: iPhone app

Post by morris »

Hey DaveW,

I am sure you already know about this, but Redpark has an Apple approved reference design for an iPhone serial cable. http://www.redpark.com/iphone.html

It's probably easier and cheaper for you to work with the wifi solution over the short term, but a front end investment with redpark could yield more customers for you in the long run. I think most MSers with an ipod/iphone/ipad would readily drop $75-80 for a serial cable and software... but there is something that happens to the human wallet once you get to the $100 mark: it tends to close.

In my own experimenting, I have been able to connect and communicate with MS via minicom and my own homemade serial cable. Of course, that is pretty much a dead end when it comes to the AppStore.

Just throwing all this out, do with it what you will.
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'll contact them and see what they have to say, having a choice of how you connect has got to be a bonus.
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 spoken to the serial cable developers and I'm not sure it's going to be practical in the long term for a number of reasons, the main one being that it will only support MS1 due to a limitation on it's baud rate (max 57600).
Post Reply