mobiSQUIRT iPhone app for MegaSquirt and MegaJolt

3Sep/160

WiFi adaptor update

Breadboard prototype of a very cheap WiFi to RS232 adaptor.

Breadboard prototype of a very cheap WiFi to RS232 adaptor.

I now have a functioning WiFi to serial adaptor built from three components that are freely available as ready made modules. All that is required are a few wires to connect them together and to load the software onto the WiFi module using a USB cable and the Arduino IDE. I'll be putting together a complete description and a list of the components once I put the Arduino sketch on github.

The adaptor uses a NodeMCU WiFi development kit to supply the WiFi access point and to run the sketch that provides the connectivity. This is then connected to the MegaSquirt ECU via an UART to RS232 adaptor module. In order for the complete module to run from the 5V supply from the MegaSquirt serial port, it needs to use a 5v to 3.3v dropper module in the TX line from the RS232 module to the NodeMCU.

There are a number of advantages to using this unit over the RN and WiFly devices in addition to the obvious price advantage (a fraction of the price of those modules)...

  • The module (via the firmware) provides a web interface to allow it to be configured for MS1 or MS2 (change baud rates).
  • You can define the WiFi Access point name and also secure it with your own password.
  • You can continue to use the internet via 3G while connected to the access point.
  • The open source firmware will allow those who want to to add their own functionality to the link.
  • Total cost for the complete module is around £12 GBP from Amazon
2Aug/160

v1.2 Update and WiFi status

Things are moving on gradually...

I've fixed all the problems with the architecture of the app and it's now working as fast as a PC connected via a serial cable when it comes to creating log files, in the region of 16 lines per second on an MS1/Extra. I have 2 more screens to update to iOS7+ compatible and I'll be looking, finally, at a release. The new architecture has opened up a number of possibilities as well as removing many of the stumbling blocks that were limiting it's performance.

One of the more recent problems being experienced is a practical one since MicroChip bought out Roving Networks and pulled the rug out from underneath the simplest and cheapest connection option. Obviously one solution to this has been to start looking at BlueTooth interfaces but in tandem to that I've also been looking at a much lower cost WiFi option that uses a couple of "off the shelf" modules hooked together. Initial results have been good and it would bring the cost of a WiFi adaptor down to less than £12 ($15USD) but it will need to be flashed with some simple custom code that I'm going to release as an open source project. The software to compile and upload the software to the module is free and you just need a USB cable to flash the module.

This is actually a much better solution than the RN134 as it offers a secure, password protected, connection and a customisable web interface to configure it and, being so much cheaper, will be a good option.

I may be adding banner advertising to the app in an attempt to help it pay for itself. Although the donation model worked initially it's not covered the costs of developing the app or hosting this web site, let alone the cost of MegaSquirt ECUs to test against. Banner advertising has proved reasonably successful in my other apps as a way of generating a small but steady revenue that might, at least, help offset some of the costs.

25Sep/152

Bluetooth revisited

IMG_1934For a while (since the beginning of this project) the option for connecting via bluetooth has been one of the most common requests I've had.

When Apple started supporting Bluetooth LE in iOS 5, giving the possibility for apps to use bluetooth devices without the need to be tested and approved before it could be used with an app (along with the associated costs of that), it offered the first glimpses of a Bluetooth solution. The downside was that, getting it working, required a custom "stack" to be embedded in the Bluetooth device, limiting the real world availability.

Since that time however Bluetooth LE devices have matured and it has become possible to buy an "off the shelf" module with an embedded stack that will allow the app to communicate with it. I'm currently evaluating one such device for use with the app and, if it works as documented, will offer this as an option within the app and add the steps required to configure the module to the manual pages.

The two items in the picture are the Bluefruit LE UART Friend and a generic RS232 to UART convertor which should just need a few interconnecting wires between them to connect a MegaSquirt ECU to Bluetooth LE. Total cost for the two was just under £27 delivered. Thanks to Christian for the "heads-up" regarding this module as it's cheaper and more widely available than the ones I'd previously been evaluating.

28Jul/110

Version 0.1r2 and Security

The second test version of MobiSquirt has been made available to testers with fixes for a couple of bugs that were found.

A couple of things came out of a request on the forum, one of which resulted in the addition of an email facility so that log files can be emailed directly from the app to make it more convenient to transfer the log files. As this was a comparatively minor amount of work this was implemented in the new test version.

Another aspect of the post was the question of security of the MegaSquirt once you have a WiFi connection to it, particularly as the WiFly unit doesn't offer support for encryption for Ad Hoc connections. It does, however, offer a password option of up to 32 characters long which you can enter into the module. Any connection to the module is then dropped if the host doesn't supply that password immediately on connecting. This actually tied quite neatly into another development I've been working for both testing and app approval reasons - a demo server. Having a similar password requirement for that should minimise the amount of spurious connections the server would have to handle.

To that end the next test version will support the WiFly modules' password option as I can then build the same password function into the demo server. the bulk of the development required in MobiSquirt for this has now been done and been tested locally.

Thanks to those who have volunteered to test the app and given feedback, keep those ideas coming !