New MS3 firmware loader

Testing and development of Megasquirt 3

Moderators: muythaibxr, jsmcortina

New MS3 firmware loader

Postby jsmcortina » Tue Jan 17, 2012 3:36 pm

Ken and I have been working on a new version of the firmware loader for MS2/3.

Presently we have experimental versions that run under Linux or Windows.
(There is a Mac binary, but it isn't working correctly yet.)

For Windows:
http://www.msextra.com/doc/general/file ... _win32.exe

For Linux
Download and save the this file into your MS3 firmware directory:
http://www.msextra.com/doc/general/file ... inux32bits
Make it executable
either by chmod a+x ms3loader-new_linux32bits or through your file manager programme.

The programme aims to give a more helpful step by step approach through the firmware loading process with better error reporting than previous versions.

Please try it!

James
EDIT: updated 11 Apr
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 25960
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: New MS3 firmware loader

Postby UnaClocker » Fri Jan 20, 2012 6:02 pm

Will the OSX loader get updated, or are the updates already in it?
UnaClocker
Super MS/Extra'er
 
Posts: 1932
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA

Re: New MS3 firmware loader

Postby muythaibxr » Fri Jan 20, 2012 6:22 pm

The loader is the same in all cases (except some special code for windows), so the updates are already there. I just need to test on the mac.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.

:msq:
muythaibxr
Site Admin
 
Posts: 7312
Joined: Thu Oct 14, 2004 12:48 pm

Re: New MS3 firmware loader

Postby jsmcortina » Tue Jan 24, 2012 4:32 pm

Posted an updated version. (Linux and xxxxxxx only.) (EDIT, remove Cygwin)

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 25960
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: New MS3 firmware loader

Postby jsmcortina » Tue Jan 31, 2012 7:13 am

The alpha18 firmware contains the Linux and Windows versions.

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 25960
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: New MS3 firmware loader

Postby UnaClocker » Fri Feb 10, 2012 1:00 pm

What happend with the windows version? What licensing is getting in the way?
UnaClocker
Super MS/Extra'er
 
Posts: 1932
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA

Re: New MS3 firmware loader

Postby muythaibxr » Fri Feb 10, 2012 1:31 pm

A new windows version was already released.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.

:msq:
muythaibxr
Site Admin
 
Posts: 7312
Joined: Thu Oct 14, 2004 12:48 pm

Re: New MS3 firmware loader

Postby bojane-1 » Fri Feb 10, 2012 2:07 pm

Linux version works great.
bojane-1
Experienced MS/Extra'er
 
Posts: 157
Joined: Sun Jun 13, 2010 1:40 pm

Re: New MS3 firmware loader

Postby jsmcortina » Fri Apr 06, 2012 8:24 am

MacOS version at:
http://www.msextra.com/doc/general/files/ms3loader_macos

Right-click->SaveAs and then either chmod a+x ms3loader_macos or make executable through your file manager.

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 25960
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: New MS3 firmware loader

Postby shauer » Sat Apr 07, 2012 9:23 am

I tried using the new loader with my new blue tooth serial adapter from EFI Analytics. The blue tooth serial port on my laptop ends up being COM40. I cannot change this COM setting.

The loader does not appear to allow a selection of COM40 (too high a number?). Manually entering COM40 for the port does not work and auto-detect does not find it.

This is on a new Toshiba ultrabook with built-in blue tooth.

The loader works great with USB.
Steve Hauer
http://www.77e21.info
1977 BMW 320i with ITBs, MAF tuning, COP, IAC, Sequential fuel and spark, MS3 knock sensing
MS3 / MS3X / V3 mainboard, MS3 pre-V1.3 alpha 8
Tuner Studio 2.3.21
shauer
Experienced MS/Extra'er
 
Posts: 335
Joined: Wed Oct 05, 2005 10:39 am
Location: Rochester, NY USA

Re: New MS3 firmware loader

Postby OliverH » Sat Apr 07, 2012 11:27 am

# I'm having problems with the new one (didn't let me choose the serial/ USB) and no connection:
Olivers-MacBook-Pro:ms3-pre1.1beta20 Oliver$ ./ms3loader_macos
MegaSquirt-3 Firmware Loader 3.15 2012-04-06

Remove the fuse powering your ignition coils.
(Spark outputs may be undefined until you re-load your settings.)
Press enter to continue...

Ensure that your Megasquirt/Microsquirt/ECU is
-connected to your computer
-has fused 12V power connected.
Press enter to continue...

Ensure that no tuning software is running.
Be sure to Quit the software, not just minimise it..
Press enter to continue...

Debug message Level:
1: Normal
2: More detail
3: + serial comms
4: + the s19 file as parsed
Selection (default: 1):

Do you want to scan your serial ports automatically? (y/n default y)

Scanning serial device: /dev/ttyS0 ....
Scanning serial device: /dev/ttyS1 ....
Scanning serial device: /dev/ttyS2 ....
Scanning serial device: /dev/ttyS3 ....
/dev/ttyS3 :

WARNING!!!
No valid ports or ECUs found. Cannot load firmware without communications.

Common problems:

- Something is hogging the serial port.
e.g. TunerStudio, modem or mobile phone cable software.
Be sure to close/exit those applications.

- USB-serial cable on high COM port number, use Device Manager to re-assign
it to say COM1.

- ECU not powered up, be sure there is fused power applied. Use a mains
adapter or vehicle battery. PP9 batteries are too feeble.

- Serial cable not connected correctly

- Software driver problems

Check the above. Do you want to try probing again? (y/n default = y) n

Without serial comms, loading cannot continue. Exiting.
Wrote 0 bytes
Press enter to continue...
Olivers-MacBook-Pro:ms3-pre1.1beta20 Oliver$

# Tryed than the old one:
Olivers-MacBook-Pro:ms3-pre1.1beta20 Oliver$ ./ms3loader_mac32bit
MegaSquirt-3 Firmware Loader 3.05 2011-07-14

Serial device:
1: /dev/ttyS0
2: /dev/ttyUSB0
Or type a device path (default: /dev/ttyS0): 2

File to upload (default: ms3.s19):

Debug Level:
0: quiet
1: Some progress
2: Full progress
3: + serial comms
4: + the s19 file as parsed
5: + comments
Selection (default: 1):

First time loading firmware (or using boot jumper) (y/n, default: n)?

Preserve sensor calibrations,
and I/O pin states (y/n, default: y)?
Attempt to preserve msq settings (y/n, default: y)?
========================================================
Settings selected:
Serial port: /dev/ttyUSB0
S19 File: ms3.s19
Debug level: 1
Jumperless reflash enabled
Preserving sensors calibrations, I/O pin states
Will try to preserve MSQ (settings)
========================================================
Press enter to continue...
Could not open serial port: /dev/ttyUSB0... exiting...
Olivers-MacBook-Pro:ms3-pre1.1beta20 Oliver$

# Settings
The MS3 works perfect with TunerStudio, settings are:
Driver: RS232 Serial (Default)
Port: /dev/cu.usbserial-A5002tst
Baud Rate: 115200

The MS3 was flashed via RS232 on a Win XP PC (MS3 pre 1.1 beta 19). So it's the first time for me to flash the MS3.
Mac Book Pro 13'', Mid 2009, Lion (Mac OS 10.7.3)

This two lines from above are the problem:
MS3 loader looks for an port assignment /dev/ttyUSB0 which normally looks complete different in each setup on OSX Lion.
Could not open serial port: /dev/ttyUSB0... exiting...
Port: /dev/cu.usbserial-A5002tst

Solution:
Look for the correct USB port with:
ls -l /dev/*usb* /dev/*USB*
Olivers-MacBook-Pro:dev Oliver$ ls -l /dev/*usb* /dev/*USB*ls: /dev/*usb*: No such file or directory
lrwxr-xr-x 1 root wheel 0 8 Apr 11:11 /dev/ttyUSB0 -> /dev/cu.usbserial-A5002tst

Create a symbolic link on the console
sudo ln -s /dev/cu.usbserial-A5002tst /dev/ttyUSB0
that doesn't help, so i tried the -c switch to define the serial port

# New version doesn't like it:
Olivers-MacBook-Pro:ms3-pre1.1beta20 Oliver$ ./ms3loader_macos -c /dev/cu.usbserial-A5002tst
MegaSquirt-3 Firmware Loader 3.15 2012-04-06
Scanning serial device: /dev/cu.usbserial-A5002tst ..
ECU is in normal mode, cannot reflash. Try jumperless, or interactive mode.
Exiting.
Olivers-MacBook-Pro:ms3-pre1.1beta20 Oliver$

or

Olivers-MacBook-Pro:ms3-pre1.1beta20 Oliver$ ./ms3loader_macos -j -c /dev/cu.usbserial-A5002tst
MegaSquirt-3 Firmware Loader 3.15 2012-04-06
Scanning serial device: /dev/cu.usbserial-A5002tst ..
No ECU found, cannot load firmware.
Exiting.
Olivers-MacBook-Pro:ms3-pre1.1beta20 Oliver$

# Old version worked fine:
Olivers-MacBook-Pro:ms3-pre1.1beta20 Oliver$ ./ms3loader_mac32bit -j -c /dev/cu.usbserial-A5002tst
MegaSquirt-3 Firmware Loader 3.05 2011-07-14
Fetching format
Checked serial format
New serial format 001 detected
Sending jumperless flash command
Attempting Wakeup...
Status code 0x08
Got Prompt, continuing...
Fetching port states
Fetching : sensor calibrations : tuning settings
Checking flash status.
Status ok.
Erasing main flash!
Erased.
Sending record 0
Skipping block 0000
Sending record 100000
Sending record 102000
Sending record 104000
Sending record 106000
Sending record 7cc000
Sending record 7ce000
Sending record 7d0000
Sending record 7d2000
Sending record 7d4000
Sending record 7d6000
Sending record 7d8000
Sending record 7da000
Sending record 7dc000
Sending record 7de000
Sending record 7e0000
Sending record 7e2000
Sending record 7e4000
Sending record 7e6000
Sending record 7e8000
Sending record 7ea000
Sending record 7ec000
Sending record 7ee000
Sending record 7f0000
Sending record 7f2000
Sending record 7f4000
Sending record 7f8000
Sending record 7fa000
Sending record 7fc000
Sending record 7fe000
Sending record c000
Sending port states
Sending : sensor calibrations : tuning settings
Wrote 209261 bytes
Settings preserved ok, but please double check.
Olivers-MacBook-Pro:ms3-pre1.1beta20 Oliver$

new ini loaded in TS and it worked with beta 20.
MS V3.00 DIY, MS3, MS3X, JimStim & StimX.
OliverH
Helpful MS/Extra'er
 
Posts: 47
Joined: Mon Oct 11, 2010 10:24 am

Re: New MS3 firmware loader

Postby UnaClocker » Tue Apr 10, 2012 8:52 pm

Gave the new MacOS loader a whirl this evening. This is a late 2010 MacBook Air, running the latest OS, 10.7.3, Lion, with the latest Java update.
The latest beta TunerStudio talks to the MS just fine, but I get this error message with the new firmware flasher:
Code: Select all
Or type a device path (default: /dev/ttyS0): /dev/tty.usbserial
Scanning serial device: /dev/tty.usbserial ..

WARNING!!!
No valid ports or ECUs found. Cannot load firmware without communications.

For what it's worth, the onboard MS3 USB port refuses to initialize on either of my Mac's, even tried removing the daughterboard, I get an error in the system log file about "AppleUSBCDC: start - initDevice failed" each time I plug it in, and it never enumerates in /dev.. Strange.. Worked a month ago when I worked on the truck last.
And the old Mac firmware loader doesn't want to work either, which is really odd, since it worked before, and TS works fine. Wish I could give more definitive results. I'll plug away at this again tomorrow and try to get past my problems.
BTW, wouldn't it be best if TunerStudio handled the firmware flashing? It'd be in a GUI environment, one app to handle the whole thing....
UnaClocker
Super MS/Extra'er
 
Posts: 1932
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA

Re: New MS3 firmware loader

Postby jsmcortina » Wed Apr 11, 2012 4:34 am

Back to square one on the Mac loader then...

Yes it would be better built into TS, but that's up to Phil.

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 25960
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: New MS3 firmware loader

Postby shauer » Wed Apr 11, 2012 6:26 am

Any insight into my problem descrtibed above with the BlueTooth communications with the Windows loader?

The Windows loader did not like COM40 for a serial port.
Steve Hauer
http://www.77e21.info
1977 BMW 320i with ITBs, MAF tuning, COP, IAC, Sequential fuel and spark, MS3 knock sensing
MS3 / MS3X / V3 mainboard, MS3 pre-V1.3 alpha 8
Tuner Studio 2.3.21
shauer
Experienced MS/Extra'er
 
Posts: 335
Joined: Wed Oct 05, 2005 10:39 am
Location: Rochester, NY USA

Re: New MS3 firmware loader

Postby jsmcortina » Wed Apr 11, 2012 7:14 am

shauer wrote:Any insight into my problem descrtibed above with the BlueTooth communications with the Windows loader?

The Windows loader did not like COM40 for a serial port.

Best to renumber to a low com port number - use device manager.
EDIT: Just re-read your post where you say you cannot change the com port number. Why is that?

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 25960
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: New MS3 firmware loader

Postby jsmcortina » Wed Apr 11, 2012 7:28 am

What happens when you manually type in 40 as the COM port ?
Please post a snippet of the output with debug level 3 enabled.

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 25960
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: New MS3 firmware loader

Postby shauer » Wed Apr 11, 2012 10:58 am

What happens when you manually type in 40 as the COM port ?
Please post a snippet of the output with debug level 3 enabled.


I will post this information this evening.

I appear to not be able to re-assign the COM port number for the Bluetooth port. I have checked the device driver and device manager settings in Windows 7 for the port in question and cannot see anywhere that it allows me to re-assign the port number. I'm wondering if it is a limitation of the Bluetooth software that came with my computer. It has built-in Bluetooth with OEM (Toshiba) supplied management software.

Its a Toshiba Portege Z835-370 Ultrabook
Steve Hauer
http://www.77e21.info
1977 BMW 320i with ITBs, MAF tuning, COP, IAC, Sequential fuel and spark, MS3 knock sensing
MS3 / MS3X / V3 mainboard, MS3 pre-V1.3 alpha 8
Tuner Studio 2.3.21
shauer
Experienced MS/Extra'er
 
Posts: 335
Joined: Wed Oct 05, 2005 10:39 am
Location: Rochester, NY USA

Re: New MS3 firmware loader

Postby OliverH » Wed Apr 11, 2012 11:39 am

Shouldn't we split the ms3loader thread into the platforms/ OSs? That would help to follow the parts of the threads. A Mac user has no understanding of legacy junk like COM (virtual) ports :yeah!: (OK this Unix/Linux /dev/.. isn't easy in the first step but direct and no distortion on the virtual to hardware layer)
I appreciate an integration into TunerStudio.
MS V3.00 DIY, MS3, MS3X, JimStim & StimX.
OliverH
Helpful MS/Extra'er
 
Posts: 47
Joined: Mon Oct 11, 2010 10:24 am

Re: New MS3 firmware loader

Postby shauer » Wed Apr 11, 2012 4:36 pm

Here is a screen shot of the failed connection to COM40 on the Windows loader. I double checked and the device driver for my Bluetooth does not offer the option of manually setting COM port numbers and there is no updated driver available. :(

FWIW, TunerStudio also does not offer COM40 on the pull-down but does accept it as a value if I type it in and it has no problems connecting. I'm not sure if Phil needed to do anything special to handle such a high COM port number, or he added something specific to handle detecting the Bluetooth connection.

The USB connection is solid but I'm just lazy and would like the wireless to work in all modes... :roll:
Steve Hauer
http://www.77e21.info
1977 BMW 320i with ITBs, MAF tuning, COP, IAC, Sequential fuel and spark, MS3 knock sensing
MS3 / MS3X / V3 mainboard, MS3 pre-V1.3 alpha 8
Tuner Studio 2.3.21
shauer
Experienced MS/Extra'er
 
Posts: 335
Joined: Wed Oct 05, 2005 10:39 am
Location: Rochester, NY USA

Re: New MS3 firmware loader

Postby jsmcortina » Wed Apr 11, 2012 5:08 pm

Loading firmware over bluetooth sounds like a recipe for problems though.

I think I've found the program fix for > COM9. It is an oddity in Microsoft C++ it seems - COM10 doesn't work and we have to specify it internally as \\\\.\\COM10

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 25960
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Next

Return to MS3 Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron