Hardware

The first major hurdle to get over when linking the iPhone to a MegaSquirt ECU is the means of connection. The MegaSquirt has an RS232 serial port it uses for all communication but the iPhone doesn’t have a serial port available. To provide a bridge from the iPhone to the MegaSquirt there were two obvious solutions, the first being a BlueTooth to serial adaptor, the second being a WiFi to serial adaptor.

When this project was first launched Bluetooth wasn’t an option for the iPhone without going through an expensive certification program. Apple, with iOS 6, introduced support for Bluetooth LE, allowing apps to connect to supported modules.

We now have a choice of two routes to connect, WiFi or Bluetooth. WiFi is significantly faster in tests, especially at higher baud rates (MS2 and later) although there’s little difference at MS1 and MS1/Extra speeds.

This is normally seen in the number of log entries per second. In the most extreme case, running against MS2/Extra, the WiFi adapter delivers around 45 per second whereas the Bluetooth adapter only delivers around 6 per second. The data rate is displayed at the top of the realtime data view for reference. For MS1/Extra both Bluetooth and WiFi deliver around 12 lines per second. 

Bluetooth is quicker to establish a connection as you don’t need to keep switching your WiFi over and can be found automatically without manual intervention after the initial connection has been made and the name of the adapter saved.

WiFi also has the potential advantage that it can be used with TunerStudio too. I have had some minor compatibility issues but, using the WiFi adapter I have connected with TunerStudio on my Mac. 

Details of suitable Bluetooth connectors can be found here.

Details of a home build cheap WiFi connector are available here.

If you have a “legacy” Roving Networks WiFi module, details of it’s use and setup can be found here.

 

14 thoughts on “Hardware”

    1. No, for an iPhone/iPad to talk to a USB device the USB device has to go through an approval process. For relatively small numbers this is cost prohibitive unfortunately. The MS3 also has a USB port but, again, a serial to WiFi adaptor is the only real option at the moment.
      The iPad camera connection kit is rumoured to support a number of USB devices and may be a sign that Apple may open up the USB connectivity at some point in the future but I suspect if/when it happens it won’t be any time soon.

  1. AWESOME!!

    So looking foward to this product/app being released. Ill be watching….

    Currently in process of restoring my mini which will include fitting a supercharger setup to the engine also going for a megajolt setup.

    Good luck in your progress!

    Gav

  2. Have you succeeded in connecting to TunerstudioMS with the RN134?
    I’m trying to, but the serial connection is unstable. Tried Trueport virtual com port and HW VSP3 virtual com port. Both with same issues.

    Frank

    1. I haven’t tried it myself but I can imagine it being unreliable to use with an application that isn’t expecting some of the delays/overheads introduced by using WiFi.
      You could try configuring the module to use UDP rather than TCP assuming the bridging software you are using supports it. UDP mode will remove many of the overheads and timing issues that the TCP stack introduces.

  3. Just downloaded the app!! Looks brilliant. I’ll be buying a serial/wifi module next week. The roving RN134, u mention the 4 wire setup. Could you tell me what wire would go where for an MS1 v3?
    I.e
    [IMG]http://i1222.photobucket.com/albums/dd485/churtz1/9f9ec0f7.jpg[/IMG]
    What pins on here to what pins on the serial?

    Thanks in advance

    Matt

    1. There’s no physical reason why it can’t fit inside the MS case, it is small enough. I haven’t tried this myself though for a couple of reasons. I deal with a number of different MS equipped vehicles so in my case I need to move the adaptor from vehicle to vehicle so having it so it just plugs in in place of the serial cable is more convenient.
      i also have some concerns about the WiFi transmitter being so close to an unshielded CPU in the MS unit – there is potential for the WiFi transmitter to cause noise/electrical interference leading to random problems.

      1. If you install it in the Megasquirt box can you still plug in your computer and use it or will it caulse an interaction problems problems between the two devices being the Wi-Fi and the computer connected to the same port at the same time

        1. No, even if you installed it inside the box it would still be connected to the serial port. It might work I suppose as long as you only tried using one of them at a time or maybe added a power switch for the module to turn it off when you aren’t using it.

  4. I’m currently trying a Tp-Link TL-MR3040 wifi access point with openwrt firmware along with the ser2net program. Coupled with a usb to serial adapter i should have a near off the shelf packaged solution. The access point is about the size of an iphone and has its own battery. Will be tested in the heat of battle soon.

    Since the access point runs linux, you should be able to plug in a 3g dongle and have 3g access as well as wifi. In fact, the access point is a 3g gateway/wifi access point as purchased but once we put in openwrt ( open firmware) the exact functionality depends on how you configure it.

    Cost? $59 Australian dollars and $4 for deal extreme usb to serial converter.

Leave a Reply

Your email address will not be published.