Page 1 of 3

How to install new firmware from Linux/OS-X systems

Posted: Mon May 07, 2007 5:52 pm
by djandruczyk
Here's the method I use to install new firmware.

1. install minicom (on ubuntu/debian "apt-get install minicom", "yum install minicom" for fedora, port install minicom for OS-X using darwin/macports)

2. Configure minicom to talk to your ECU. Run "sudo minicom -s" or "minicom -s" to enter setup mode. select "Serial Port Setup" set the serial device using the "A" key to be the same as what you use in megatunix. Set the Bps/Par/Bits (choice "E" to 9600 8N1. Set HW and SW flow control to No ("F" and "G" Settings) Hit escape to get out of this menu.
Select "Modem and Dialing". Set the Init and Reset Strings ("A", and "B") to ^M (carat is "shift-6" on most U.S. english qwerty keyboards). Hit escape to return to the main menu, Move to "Save setup as dfl" and hit enter. Exit

3. make SURE you are in the dir where your NEW .s19 file is, run "minicom", If you have only stock B&G firmware, you will need to jumper the boot jumper and power cycle your ECU, if you have extra firmware, or some other firmware typing !! should get your a "Boot>" prompt. Proceed to step 4 once u get a boot prompt

4. Type "W" to wipe, then "U" to upgrade/update. It'll respond with "waiting ...." Hit Control-A S (Hold down control while hitting A followed by S) to initiate a "send file" in minicom. Select "ASCII" from the choice, next pops up a file browser, which tends to default to the wrong place. Use the arrows and navigate the highlight bar at the bottom to "prev" and hit enter. the list should update with the contents of the dir you started minicom from (which should contain the .s19 file if you followed step 3 correctly). Scroll down to the .s19 file hit Spacebar to select it and select "Okay" and it'll send the file to the ecu.
Wait till it completes and returns you to the boot prompt. remove the boot jumper if u used it, enter "X" or power cycle the ecu and exit minicom. you're done.

Re: How to install new firmware from Linux/OS-X systems

Posted: Sat May 03, 2008 9:49 pm
by squirrelgripper
Thanks Dave! I had wondered how to do this.
djandruczyk wrote:Here's the method I use to install new firmware.

1. install minicom (on ubuntu/debian "apt-get install minicom", "yum install minicom" for fedora, port install minicom for OS-X using darwin/macports)

.
TO simplify Step 1, here's how I installed minicom on ubuntu:

System>>>Administration>>>Synaptic Package Manager
[enter admin. password]
Seach for "minicom"
Check "Apply"

To enter the text in Step 2:

Applications>>>Accessories>>>Terminal
2. Configure minicom to talk to your ECU. Run "sudo minicom -s" or "minicom -s" to enter setup mode. select "Serial Port Setup" set the serial device using the "A" key to be the same as what you use in megatunix. Set the Bps/Par/Bits (choice "E" to 9600 8N1. Set HW and SW flow control to No ("F" and "G" Settings) Hit escape to get out of this menu.
Should choice "E" be set to 115200 for the MSII family of code?

Re: How to install new firmware from Linux/OS-X systems

Posted: Mon Jun 02, 2008 8:17 am
by woza
Hmm. Okay. Just tried to upgrade my firmware following the above instructions.

All went well until I got to the flashing part. Selected the .s19 file, hit enter and now the term just says

Code: Select all

Boot>u - waiting ...
Left it for 30 mins but still the same.

Powered down MS, pulled boot jumper, powered up MS, tried to talk to it with Megatunix but reports there is no firmware.

Tried procedure again but same thing... Any ideas?

Using OS X 10.4.11 & USB to Serial adapter...

Thanks
Alex

Re: How to install new firmware from Linux/OS-X systems

Posted: Mon Jun 02, 2008 6:38 pm
by djandruczyk
woza wrote:Hmm. Okay. Just tried to upgrade my firmware following the above instructions.

All went well until I got to the flashing part. Selected the .s19 file, hit enter and now the term just says

Code: Select all

Boot>u - waiting ...
Left it for 30 mins but still the same.

Powered down MS, pulled boot jumper, powered up MS, tried to talk to it with Megatunix but reports there is no firmware.

Tried procedure again but same thing... Any ideas?

Using OS X 10.4.11 & USB to Serial adapter...

Thanks
Alex
Once you got the "waiting prompt" you were supposed to upload the file "Control A-S" select the file wiht the spacebar and hit enter to send it.
You should see a progress window, and wen done it should return to a boot prompt.

Re: How to install new firmware from Linux/OS-X systems

Posted: Tue Jun 03, 2008 2:30 am
by woza
Yes, that is what I did. A page flashed up really quickly (too quick to see what it said) then it dropped back to the boot> waiting... prompt and stayed there... Perhaps the .s19 file isn't right? It's the one from the megatune download from extraefi.co.uk 029y4.

Re: How to install new firmware from Linux/OS-X systems

Posted: Tue Jun 03, 2008 3:12 pm
by djandruczyk
woza wrote:Yes, that is what I did. A page flashed up really quickly (too quick to see what it said) then it dropped back to the boot> waiting... prompt and stayed there... Perhaps the .s19 file isn't right? It's the one from the megatune download from extraefi.co.uk 029y4.
it should have taken a while. so, odds are you didn't get the file selected..

Re: How to install new firmware from Linux/OS-X systems

Posted: Tue Jun 03, 2008 11:53 pm
by woza
OK. I'll try with a different file when I get the chance. I'm sure it selected the correct file (highlighted in black)...

Re: How to install new firmware from Linux/OS-X systems

Posted: Wed Jun 04, 2008 4:45 am
by woza
Ok. So I tried using win98se & virtualpc on the mac.

Followed instructions, got to downloading the firmware but received the following error

Code: Select all

This should count up to 1750+ lines
.
src/download.exe -c3 msns-extra.s19
MS Download 1.10

Boot>w Complete
Download failed:
     Expected response "w Complete
Boot>",
     but received this "
".ot>w Complete
Press any key to continue . . .
Tried again with minicom and it just flashes up a screen that says press ctrl-q to quit for about 2 seconds then drops back to the waiting prompt and beeps 3 times...

Do you think it could be because I am using a serial-to-usb converter? It worked fine for communicating with Megatunix before I tried this flashing...

Thanks for your input so far...

Re: How to install new firmware from Linux/OS-X systems

Posted: Wed Jun 04, 2008 5:13 am
by djandruczyk
woza wrote:Ok. So I tried using win98se & virtualpc on the mac.

Followed instructions, got to downloading the firmware but received the following error

Code: Select all

This should count up to 1750+ lines
.
src/download.exe -c3 msns-extra.s19
MS Download 1.10

Boot>w Complete
Download failed:
     Expected response "w Complete
Boot>",
     but received this "
".ot>w Complete
Press any key to continue . . .
Tried again with minicom and it just flashes up a screen that says press ctrl-q to quit for about 2 seconds then drops back to the waiting prompt and beeps 3 times...

Do you think it could be because I am using a serial-to-usb converter? It worked fine for communicating with Megatunix before I tried this flashing...

Thanks for your input so far...
I'm not sure..
Did you make sure you have minicom configured correctly for the proper serial port, speed, flow control? You should be able to hit "w" and get responses from the BootLoader. If you don't get any responses, then u have other issues.

Re: How to install new firmware from Linux/OS-X systems

Posted: Wed Jun 04, 2008 5:31 am
by woza
Okay so I figured it was the .bat file causing problems in windows so I followed the instructions here to do it manually and it worked fine.

Still don't know what the issue with minicom and OS X is though. At least I now have the latest msnse firmware installed.

Thanks
Alex

Re: How to install new firmware from Linux/OS-X systems

Posted: Sun Dec 28, 2008 10:02 am
by sportage4x4
Has anyone successfully flashed an MS2 setup in linux?

Using minicom (ubuntu 8.10) i get nothing. if i jump the tx/rx pins i get echo, but once connected to the MS i get nothing. 'Q' and 'S' get me a response with version and string info. i have minicom set for 115200 8N1

the laptop has a real serial port (/dev/ttyS0) and megatunix communicates with no problems.

to flash ms2/extra i need to flash the bootstrap.s19 first and then the ms2-extra.s19 i'm assuming. flashing the bootstrap is where i'm stuck.

i managed to get it all flashed and working under Wine, using the supplied download batch file.

any ideas?

Re: How to install new firmware from Linux/OS-X systems

Posted: Sun Dec 28, 2008 5:32 pm
by djandruczyk
sportage4x4 wrote:Has anyone successfully flashed an MS2 setup in linux?

Using minicom (ubuntu 8.10) i get nothing. if i jump the tx/rx pins i get echo, but once connected to the MS i get nothing. 'Q' and 'S' get me a response with version and string info. i have minicom set for 115200 8N1

the laptop has a real serial port (/dev/ttyS0) and megatunix communicates with no problems.

to flash ms2/extra i need to flash the bootstrap.s19 first and then the ms2-extra.s19 i'm assuming. flashing the bootstrap is where i'm stuck.

i managed to get it all flashed and working under Wine, using the supplied download batch file.

any ideas?

I haven't written an MS-2 loader yet. (I did get a MS-I loader written, but it doesn't handle MS-2 files, or the ms-2 loading protocol yet)

Re: How to install new firmware from Linux/OS-X systems

Posted: Mon Jun 15, 2009 3:00 pm
by pologtijaune
Hi, I'm trying to upload a firmware in my MSv2 with the msloader from MegaTunix-0.9.18

Here is the result

Code: Select all

msloader /dev/ttyUSB0 Monitor_v2.890.abs.s19 
Port successfully opened
Firmware file successfully opened
Detected signature: "�"
Ecu detected in live mode, trying to get to bootloader mode
Detected signature: "��"
Couldn't attain bootloader mode
Please jump the boot jumper on the ECU and power cycle it
Press any key to continue

Detected signature: "�"
unable to get to the bootloader, exiting!
Any ideas ?

Re: How to install new firmware from Linux/OS-X systems

Posted: Tue Jun 16, 2009 4:10 am
by Peter Florance

Re: How to install new firmware from Linux/OS-X systems

Posted: Tue Jun 16, 2009 2:40 pm
by djandruczyk
pologtijaune wrote:Hi, I'm trying to upload a firmware in my MSv2 with the msloader from MegaTunix-0.9.18

Here is the result

Code: Select all

msloader /dev/ttyUSB0 Monitor_v2.890.abs.s19 
Port successfully opened
Firmware file successfully opened
Detected signature: "�"
Ecu detected in live mode, trying to get to bootloader mode
Detected signature: "��"
Couldn't attain bootloader mode
Please jump the boot jumper on the ECU and power cycle it
Press any key to continue

Detected signature: "�"
unable to get to the bootloader, exiting!
Any ideas ?
Do you really have an MS2? of just a V2 mainboard with an MS-I chip? An MS2 is a plugin card that replaces the main MS-I cpu, and can be pluggin into an MS mainboard model (except the SMT v3.57 version)

What firmware is on your ecu now?, what does megatunix detect it as?

Re: How to install new firmware from Linux/OS-X systems

Posted: Tue Jun 16, 2009 4:18 pm
by pologtijaune
Thanks, I'll take a look at that.

Re: How to install new firmware from Linux/OS-X systems

Posted: Tue Jun 16, 2009 4:30 pm
by pologtijaune
Yes djandruczyk

I have a MS2 with a PCB v3

But i have'nt put any firmware yet, that's where my problem is.

Megatunix says :

Code: Select all

Initiating background ECU interrogation...
Firmware NOT DETECTED, Enable Interrogation debugging, retry interrogation,
close megatunix, and send ~/MTXlog.txt to the author for analysis with a note
describing which firmware you are attempting to talk to.
USER Initiated ECU interrogation...
Firmware NOT DETECTED, Enable Interrogation debugging, retry interrogation,
close megatunix, and send ~/MTXlog.txt to the author for analysis with a note
describing which firmware you are attempting to talk to.]
When i use minicom to connect to the ECU, here is the output whatever i type :

Code: Select all

Welcome to minicom 2.3

OPTIONS: I18n 
Compiled on Oct 24 2008, 06:37:44.
Port /dev/ttyUSB0

                 Press CTRL-A Z for help on special keys
                                                     
�>�>�>�>�>�>�>�>�>     
I've compiled the bootstrap.s19 and uploaded it to the ECU :

Code: Select all

./lin_ms2dl -f ../bootstrap_src/bootstrap.s19 -c /dev/ttyUSB0 
Attempting Wakeup...
Error code 0xe1
Got Prompt, continuing...
Erasing main flash!
Erased.
Sending record 0:     0
Sending record 1:  4000
Sending record 2:  4010
[snipped]
Sending record 214:  c000
Wrote 3405 bytes
Poweroff and back in minicom, the output is the same as above.

If I try then to upload the ms2_extra.s19 it freeze :

Code: Select all

./lin_ms2dl -j -f ../ms2_extra.s19 -c /dev/ttyUSB0 
Sending jumperless flash command
Attempting Wakeup...
Error code 0xe1
Got Prompt, continuing...
Erasing main flash!
Erased.
Sending record 0:     0
Sending record 1:  4000
[snipped]
Sending record 1749:  ffe0
Sending record 1750:  fff0
Sending record 1751:3b8000
Setting page to 0x3b:
erasing page 0x3b:
Erased.
Again the result is the same.

Where am I wrong ?

Re: How to install new firmware from Linux/OS-X systems

Posted: Tue Jun 16, 2009 5:08 pm
by djandruczyk
I'm not to familiar on the extra boy's tool lin_ms2dl, but megatunix PRE-0.9.19 (CVS branch PRE_0_9_19-branch), has a pair of loading tools that should be able to do it. msloader (cli), or mtxloader (gui). I've successfully installed ms2 stock, ms2-extra and gone back and forth betwen versions. MS2-0extra is a wee bit tricky, but from a clean chip, it should be:

jumper jumper, power cycle ecu
load bootstrap.s19
poweroff, remove jumper, power on
load ms2-extra.s19
reboot and you should be good to go.

Try the CVS release for the better/revised loaders. (the installing on ubuntu thread has CVS instructions)

Re: How to install new firmware from Linux/OS-X systems

Posted: Tue Jun 16, 2009 5:44 pm
by pologtijaune
I'm unable to upload the booloader with msloader :

Code: Select all

./msloader /dev/ttyUSB0 ../../../ms2extra_2.0.1_release/bootstrap.s19 
Port successfully opened
Firmware file successfully opened
Detected signature: "�"
Ecu detected in live mode, trying to get to bootloader mode
Detected signature: "��"
Couldn't attain bootloader mode
Please jump the boot jumper on the ECU and power cycle it
Press any key to continue

Detected signature: "�"
unable to get to the bootloader, exiting!
The jumper is on the B/LD.

Re: How to install new firmware from Linux/OS-X systems

Posted: Wed Jun 17, 2009 3:17 pm
by pologtijaune
Hi all,

Tryed with mtxloader from CVS branch PRE_0_9_19-branch and it worked like a charm.
Thanks for your support.