msDroid - Android application for MegaSquirt

Discussion in 'Throttle bodies & non-OEM ECUs' started by Trev16v, Jun 15, 2011.

  1. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    Yep that's exactly the module I am using! So try the idea with the text files.

    These modules do tend to be supplied with different firmwares depending on which Chinese supplier you get them from, but ideally it'll have the "Linvor" firmware. Because they have varying firmware, the command set will differ, so it's worth knowing the datasheet for the particular one you have got. However I think I have all the datasheets if you get stuck. To be honest I think there are just two baud rate commands I know of, depending on what firmware it has.

    But the main thing is that yes, you'll need to transfer a text file rather than type - that's what I have to do with those modules.

    Edit: Ah yep - the PDF you linked to there is one of the datasheets. For that particular module you use AT+UART=115200. However another module I have (the same PCB exactly, but different firmware) uses, I *think*, something like AT+BAUD=x where x is some index number from 0 upwards that represents a baud that you select from a table. But in the first instance try AT+UART=115200 in a .txt file (no characters after it) and see how you go. The default baud rate on your module is hightly likely to be 9600 so set Hyperterminal to that. Select no flow control.

    Edit2: Also, presumably you're attempting to communicate with this module via an RS232-TTL converter PCB? It can't be wired directly to a computer COM port because, aside from the RS232 voltage differences, the Tx / Rx lines are inverted.
     
  2. Joe C New Member

    Joined:
    Nov 28, 2011
    Likes Received:
    0
    the Baud on mine is definatly 9600 from doing the loopback, and its showing up as linvor so that looks promising.

    and yep ive got it going through a 232-ttl circuit that I built for somthing else.

    Ill have a fiddle with them after dinner :)
     
  3. Joe C New Member

    Joined:
    Nov 28, 2011
    Likes Received:
    0
    Ok! Success!

    the comands that worked for me were

    AT
    AT+VERSION
    AT+NAMEnewnamehere
    AT+BAUD8 (sets it to 115200)
    AT+PINnewpinhere

    I'll package it up tomorrow with a battery and a switch and try it on the MS

    Thanks for the pointers Trev!
     
  4. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    Awesome! You'll probably already know that your RS232/TTL interface will need its gender changed over (male DB9 instead of female DB9, Tx and Rx lines swapped, ground pin moved, etc.) to plug into the MS. Or you could wire your Bluetooth module directly inside the MS (perhaps with the antenna mounted adjacent to a large opening in the metal enclosure) by picking up the internal Tx / Rx lines prior to the MAX232 and add a toggle switch.

    The current test release is here:

    http://www.msdroid.com/testreleases/

    This version is extremely limited and buggy. It is already far out of date because I've since done lots of fixes, mainly based on feedback from Toyotec. But anyway it's enough to do a basic test with.

    Some info you'll need to use it:

    When you first try to connect to the Bluetooth module, you may be prompted to turn on Bluetooth. If this happens then when you turn on Bluetooth, you'll need to ask it to connect again. If it's not yet paired then it'll want you to choose the module to pair with. Then when that is done you'll need to select connect again. This is all since fixed and the Bluetooth connection stuff is no longer this cumbersome but that's how it is in the .APK that's currently on the server.

    Also I have personally not yet tested with MS2. I need to get an MS2 or MS3 controller.
     
  5. Joe C New Member

    Joined:
    Nov 28, 2011
    Likes Received:
    0
    Cool,

    right its on my android, I'll see how I get on with connecting to an ecu. :thumbup:

    yeah for the moment I'll just hang the adaptor off the D con, and eventually I'll stick it in the case,

    out of interest what functions do you have in mind for the "finished" version? obiously it will need to be a cut down, but I would like to see the ability to change the boost maps, output port values, idle speed, rev limiter.... the sort of stuff you might need to change at the strip.

    I think realistically if you want to change the fuel/ignition maps you should be feltching the laptop.


    my setup BTW is MS2extra running the 3.2.0alpha code, and the phone is one of these A5000 things that are available under several brands running 2.2.1 firmware.
     
  6. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    I've got one of those Bluetooth interfaces on its way to me now as well, so I can test it out.

    I'm planning to upload another test release at the weekend after doing lots of fixes.
     
  7. Joe C New Member

    Joined:
    Nov 28, 2011
    Likes Received:
    0
    Well...

    I can't get a connection... just get Paired but not connected in the phones bluetooth menu, and unabler to connect to device or similar in MSdroid, Shadowlogger, MS logger, Blueterm etc.

    I can conect fine from a laptop and do a loopback through the bluetooth adaptor, but my phone will only connect to the bluetooth adaptor with one program (link below) I can then do a loopback test from the phone.



    weird.

    https://market.android.com/details?...=W251bGwsMSwxLDEsImF0LmFicmF4YXMuYW1hcmlubyJd
     
  8. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    Joe,

    I've just successfully connected to my MS1 using my msDroid application via the BT-232B adapter.

    I initially configured it for 9K6 by switching it to DTE on the side and connecting via Hyperterminal and a USB/serial adapter. Then with that done, I switched it back to DCE(F) and connected it to the MS1 unit via DB9 male-male gender changer, and then connected from msDroid and data was polled from MS1 just fine.

    I have just realised however that the reason why msDroid didn't work for you could be something I have yet to do to specifically support MS2. I have an MS2 CPU on its way to me so I'll sort this out. Edit: Yep definitely is a fix I need to do for MS2, so I'll get that done.
     
  9. Joe C New Member

    Joined:
    Nov 28, 2011
    Likes Received:
    0
    I did suspect that MS droid wouldn't connect to MS2, but the other programs should...

    Ive done a bit more today and tried to get a connection from a laptop to the MS via blue tooth, I can interogate the ECU with the teminal program in tunerstudio with the "Q" command and get the software version back, but still cant get a connection.

    I'm thinking that it might be that the linor 1.5 fimware in my adaptors cant be set to master or slave, apparently alater firmware is needed.
     
  10. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    Got absolutely loads done. Far too busy and tired at the moment to do a proper update but can chuck some random images up. Bear with me. All coming together. Been doing loads of stuff like implementing settings and table editing dialogues, optimising the math evaluator, improving the dashboard gauge drag and drop / resize, bug fixing the graph view, switching over and getting used to Git version control software...

    Test screen showing gauges being repositioned and resized. Looks crappy because of lines and grid in place for debugging but gives an idea. Setting up your dashboard layout and adjusting the sizes of all your guages is nice and slick just like configuring your phone's launcher screens.

    [​IMG]

    The application now fully supports all settings dialogue screens as described by the respective MegaSquirt .ini file. This means absolutely all configuration settings shall be accessible. Will do screenshots of VE / spark tables when they, erm, look a bit less shonky.

    MS2 now properly supported.

    Examples of idle and codebase screens generated from the MS1 Extra .ini.

    [​IMG]

    [​IMG]
     
  11. blis Forum Member

    Joined:
    Dec 27, 2011
    Likes Received:
    617
    Location:
    New South Wales
    Really cool stuff, where can I get everything I need for an MK2/ABF ?
     
  12. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    Do you mean components for doing the actual MegaSquirt conversion, or just what's needed to use the app?
     
  13. Alisx New Member

    Joined:
    Jan 23, 2012
    Likes Received:
    0
    Ms2 support

    Helo Trev16v Im from Puerto Rico . I was reading your post and Im testing your program but I need the program's update to use on my MS2 and all the components if they change.

    Thanks
     
  14. gb1991gsx New Member

    Joined:
    Jan 31, 2012
    Likes Received:
    0
    Testing MSdroid

    I also do not have a gti but I am currently running ms2 extra in my 1991 eclipse gsx and would love to lend a hand in the developement of this software. I have been hoping someone would come up with this app.
     
  15. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    Thanks to Toyotec for the loan of his MS2 daughterboard.

    The application now works with MS1 and MS2. The version of MegaSquirt controller / firmware is automatically detected by the app.

    To use msDroid with MS2, a recent MS2 firmware should be used (the latest being 2.905). (Earlier versions of MS2 firmware (e.g. 2.6) have a nasty problem where the serial port will occasionally lock up due to the fact that I cannot control inter-write delay to a fine granularity over Bluetooth.)

    The application provides dashboard with drag / drop functionality, logging and powerful graphical log viewer, VE / spark table editing, and all of the settings menus as specified by the .ini file for the version of MS you're using. So, it's a full tuning application.

    I still haven't got an alpha version ready for testing but please bear with me.
     
  16. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    Version 0.1a1 (alpha build)

    This is an alpha build available if anyone would like to try it. The .APK file can be downloaded from here. Download the file directly on your Android device for ease of installation. Unless you have already done so, you'll want to allow your device to install apps from non-Market sources; instructions are found in many places including here.

    This is a development build that isn't anywhere near being feature-complete for beta yet and is provided for curiosity and initial go/no-go testing.

    If you have an Android device, but don't have MegaSquirt and / or Bluetooth dongle:

    You could go ahead and install it anyway, as it'll be useful to know that it installs and works okay on your device. When it's running, it will load a default MegaSquirt INI file and build up a default dashboard layout based on it. You can move the gauges around, add, delete, resize them etc.

    You can then also go to view datalogs, and you will find a single example datalog which you can then view in the graphical log viewer. This is a datalog taken from my 16V G60 running from a cold start on the driveway just before I removed it from the car last weekend! You can then also go into the settings for the graph viewer to get a feel of how you add and remove series, etc.

    Attempting to access tuning menus will probably cause a crash. As will various other things...

    Even if you don't have MegaSquirt and a Bluetooth dongle it's still useful to know what device you have and what success you had in playing with the dashboard and viewing the sample log. All this will prove that stuff like external memory / SD card access, SQL database creation, etc. all work as they should on your particular device.

    You can swipe between dashboard pages and drag gauges from one page to another. In the log viewer, you can drag and fling left / right, and pinch to zoom in and out.

    If you have an Android device and MegaSquirt together with a Bluetooth dongle

    For MS1, configure dongle to 9600baud. For MS2, 115200baud.

    MS2 is extremely fussy about the serial inter-write delay, which unfortunately I simply cannot accurately control over Bluetooth. Earlier versions of MS2 (say 2.6) will not work properly (the ECU's serial port will eventually stop responding). Later versions of MS2 (say 2.9xxx) are required.

    When you discover and connect to the ECU, msDroid should automatically detect the ECU type and then load in the appropriate INI file for you. Then the only configuration you have to do is go into 'config' and choose simple things like temperature units, MAP sensor type, etc.

    As well as recording datalogs and then viewing them, you can also look at various tuning settings screens. These are all configured from the INI file. However, they'll all be very broken at the moment. You can also look at the various table editors (e.g. the VE fuel map and spark maps). As you run the engine you'll see the correct cell being highlighted with rpm / MAP and so on. But again... all quite broken. :lol:

    Another current known bug is that if you swipe between dash pages or change the screen orientation between portrait and landscape, some gauges may show a 'stale' value until the data they show actually changes; and a newly-added gauge may state 'coolant' or something even though you intended to add another gauge - but it will correct itself later. This will be fixed ASAP, just pointing it out for now.


    [​IMG][​IMG][​IMG][​IMG]
     
  17. Stooza Forum Member

    Joined:
    Feb 18, 2012
    Likes Received:
    0
    Location:
    Sussex
    Gah! Just ordered a nokia lumia!!
     
  18. andipandi Paid Member Paid Member

    Joined:
    Jan 18, 2004
    Likes Received:
    0
    Location:
    United Kingdom
    I've just downloaded your program to test it on my phone for u it all works untill I attempt to go to tune section then phone locks

    This is on a Samsung s2

    Hope this helps you
     
  19. Trev16v

    Trev16v Paid Member Paid Member

    Joined:
    Oct 22, 2003
    Likes Received:
    451
    Location:
    Oxfordshireland
    Hi andipandi, many thanks for trying it! That's much appreciated. Did viewing the sample log file work for you?

    I'm currently working on sorting out the tuning menus, which will hopefully be more complete (and won't crash the phone!!) ready for 0.1a2. I'm also adding a GPS speedometer which can be added as a guage and logged.
     
  20. andipandi Paid Member Paid Member

    Joined:
    Jan 18, 2004
    Likes Received:
    0
    Location:
    United Kingdom
    Yes I can view the sample log file just fine,
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice