mobiSQUIRT iPhone app for MegaSquirt and MegaJolt


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.

Although Bluetooth is generally a cheaper option the iPhone doesn't currently support using serial Bluetooth devices, it only supports audio based Bluetooth devices.

By a process of elimination that left WiFi as the most practical solution. There are a few devices available and the first one I bought didn't work at all and the company I bought it from and the manufacturer had never heard of the concept of support, I'm still waiting for a refund and it set the app development back by a month or so.

RN-134 WiFi to RS232 serial adaptor

Having given up on the first module I opted to go for a similar looking module from a different manufacturer. This second module was an RN-134 manufactured by Roving Networks. This module was actually cheaper than the first one I bought and worked straight out of the box. All I had to do was make up a simple cable with 4 wires from the module header connection to a DB-9. There are a number of US and European suppliers listed on the Roving Networks web site. It's $99 at DigiKey.

SerialIO produce a more consumer based solution that uses the RN-134 supplied in a plastic case and with the necessary cables - the WiSnap. It is significantly more expensive that the module on it's own though.

The RN-134 is also available in a kit, designated RN-134K, which includes a ready made serial cable and power lead.

The module can be powered directly from the MegaSquirt serial port, just bear in mind that the older v2.2 MegaSquirt PCB supplies power to pin 1 only so if you need to use it with a v2.2 board use that pin instead of pin 9. v3 boards supply power on both pin 1 and pin 9 so using pin 1 allows it to work on any PCB.

The only problem I had initially was when using the module with an MS2, if the module was connected when I powered up the MS2 the MS2 would go into bootloader mode. Roving Networks support resolved the problem within a few hours though so I was very impressed with that. Anyone having similar problems, you need to solder a 22k resistor between hole 1(v3) and hole 4(tx) on the module pcb. This resistor will force the serial output low while the module initialises and since fitting this the module has worked flawlessly with all MS versions.

I'll build a utility into the app to configure the RN-134 and WiSnap automatically for either MS1 or MS2 but if you want to do it manually it's just a case of setting the baud rate and turning off anything that causes the module to send notifications to the serial port. You run the module in Ad-Hoc mode and then connect to it in the WiFi section of your iPhones settings.

More details for setting up and configuring the RN-134 module are available here

At some point since I bought my RN-134, Roving networks have released their RN-174 which I've not tested myself however it seems to be retailing at a lower price that the RN-134 and, as far as I can see, will do everything the RN-134 can other than having to specify the antenna type. If anyone tries this module and can confirm it works I'll add more details. The configuration and connection details should be similar to the RN-134 module instructions. Note that if you do order the RN-174 make sure it's the RN-174-P that has the PCB trace antenna or you'll need an external antenna. The RN-174-K evaluation kit includes an RN-174-P according to the datasheet.

Comments (14) Trackbacks (0)
  1. Hi,

    The KDFI board ( basically an MS clone: ) has a built in USB port. Would that eliminate the use of a wifi adapter?
    Keep up the good work: I’m very interested in this:)

    best regards

    • 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.

  2. 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!


  3. 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.


    • 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.

  4. 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?
    What pins on here to what pins on the serial?

    Thanks in advance


  5. does the wifi module fits inside the megasquirt aluminium case , or does it hangs outside ? do you have any picture ?

    • 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.

      • 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

        • 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.

  6. Roving seems to have a BT to iOS data module too.

  7. 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.

  8. Roving aren’t listing the rn134 anymore. Are there any other uk suppliers that you know of?


Leave a comment

No trackbacks yet.