Classic Firmware update using Linux

Started by Rybren, June 17, 2014, 02:41:40 PM

Previous topic - Next topic

Rybren

I made it up to the camp yesterday and managed to attempt the WBJr install and firmware update this morning.

Using Debian, I managed to get the Classic Firmware updated (Latest prod, 1849); however, I couldn't get the MNGP to update.

I kept getting the following error message:

ord() expected a character, but string of length 0 found.

I tried the update at least 20 times, and got the same error each time.

I got this same error the first time I attempted to update the Classic (I think - but I didn't write it down), but it worked the second.

I then tried adding the -z 3 bit, but got this message:

No ACK byte received

Thoughts?  I am using the USB cable that came with the Classic (picked up from the Midnite garage sale)

Thanks

Jerry
4 x 210W PV, Classic 150, e-panel, Samlex PST-1500-24, 232AH 24V

Westbranch

Jerry, can you test that cable at home, just to ensure it works?
KID FW1811 560W >C&D 24V 900Ah AGM
CL150 29032 FW V.2126-NW2097-GP2133 175A E-Panel WBjr, 3Px4s 140W > 24V 900Ah AGM,
2 Cisco WRT54GL i/c DD-WRT Rtr, NetGr DS104Hub
Cotek ST1500 Inv  want a 24V  ROSIE Inverter
OmniCharge3024  Eu1/2/3000iGens
West Chilcotin 1680+W to come

Rybren

I left the cable at the camp.  However, it does work because I updated the Classic with it. I will try to grab a new and shorter cable before heading up again.
4 x 210W PV, Classic 150, e-panel, Samlex PST-1500-24, 232AH 24V

Rybren

#18
I went back to the camp today.  Tried the MNGP update using 4 different USB cables of varying lengths.  None worked.

What is interesting, is that this time, every attempt resulted in the "No ACK byte received" regardless of whether I used the -z 3 function.  In addition, I noticed that the top left of the MNGP would momentarily flash "No Communications" when I tried the update.  Also, during the attempted updates,  the Classic would show an alternating display of "Resting"  and "Got Comms?" (or something like that - I didn't write it down and my memory isn't as good as what it once was)

4 x 210W PV, Classic 150, e-panel, Samlex PST-1500-24, 232AH 24V

Rybren

Just thought I'd give this a bump.  I would like to head up to the camp this weekend and would dearly love to get the MNGP updated so I can start using the WB Jr.

Thanks
4 x 210W PV, Classic 150, e-panel, Samlex PST-1500-24, 232AH 24V

chris

  Wow...sounds like updating the Classic is waaaay more work then the Kid....I'd send a PM over to one of the MidNite guys so you can get an answer before you head out for the weekend.

  Good luck man  ;D
System 1
12 volt system,
280 AH DIY LifePO4 with 200amp JBD BMS
4x200 Watt 36volt panels 4P
MidNite Kid, WBjr
2000 watt Kisae SW inverter

System 2
Off Grid RV (parked and used as a cabin)
12 volt system,
4 X T-105+
6X100 watt array wired as 3 strings
MidNite Kid, WBjr & MNBTS
1500 watt Cotek SW

Westbranch

Yes , it is a very picky process  :-\ and needs kid (Pun intended) gloves :(

Not for the faint of heart
KID FW1811 560W >C&D 24V 900Ah AGM
CL150 29032 FW V.2126-NW2097-GP2133 175A E-Panel WBjr, 3Px4s 140W > 24V 900Ah AGM,
2 Cisco WRT54GL i/c DD-WRT Rtr, NetGr DS104Hub
Cotek ST1500 Inv  want a 24V  ROSIE Inverter
OmniCharge3024  Eu1/2/3000iGens
West Chilcotin 1680+W to come

Rybren

The Classic Firmware went relatively smoothly - it worked on the second attempt.  I probably tried the graphic panel at least 50 times.  :'(
4 x 210W PV, Classic 150, e-panel, Samlex PST-1500-24, 232AH 24V

Westbranch

Did you wait 2 minutes after each press of "the button".  That seems to be paramount, very slooooooow on communication I found, like watching paint dry.

glad it went in the end...
KID FW1811 560W >C&D 24V 900Ah AGM
CL150 29032 FW V.2126-NW2097-GP2133 175A E-Panel WBjr, 3Px4s 140W > 24V 900Ah AGM,
2 Cisco WRT54GL i/c DD-WRT Rtr, NetGr DS104Hub
Cotek ST1500 Inv  want a 24V  ROSIE Inverter
OmniCharge3024  Eu1/2/3000iGens
West Chilcotin 1680+W to come

Rybren

Not sure what you mean by waiting 2 minutes after each press of the button. I saw no mention of waiting in the Linux instructions.

Tthe Graphics panel never did get updated.
4 x 210W PV, Classic 150, e-panel, Samlex PST-1500-24, 232AH 24V

Westbranch

That is a W7 lesson I learned the frustrating way over 3 weekends, ie like "patience young Jedi",  that is: the CPU in the Classic is very small and takes a lot of time to process each command if you would..

The 'buttons' are in the screen for updating ( ie Classic model or MNGP)  that comes up in W7, maybe its not like that in Linux...
KID FW1811 560W >C&D 24V 900Ah AGM
CL150 29032 FW V.2126-NW2097-GP2133 175A E-Panel WBjr, 3Px4s 140W > 24V 900Ah AGM,
2 Cisco WRT54GL i/c DD-WRT Rtr, NetGr DS104Hub
Cotek ST1500 Inv  want a 24V  ROSIE Inverter
OmniCharge3024  Eu1/2/3000iGens
West Chilcotin 1680+W to come

Rybren

Ahh, got it.

In Linux, you execute a command like the old DOS stuff,  it runs through a script and then prompts you to turn the Classic on.
4 x 210W PV, Classic 150, e-panel, Samlex PST-1500-24, 232AH 24V

boB


You can't "brick" a classic as in, erase all of the flash so it can't do anything at all by being re-programmed.

But, you CAN get it to stop working if you start the upload and stop it before it is finished.

Normally what happens (or doesn't happen) is that it either updates or doesn't talk at all.
Sounds to me like the Linux box is not talking to the Classic at all here and so the flash
will not be erased.  If it DID get erased, that would mean there was hope !  (as weird as
that sounds)...

If you try a windows laptop and it still does not update, then we will just have to RMA the
Classic so you can get one that does update.

Which version of the Linux update software from our site are you trying ?

I am also wondering if this (copied below) TXT file is the same one that is in your instructions ?
boB



MidNite USB Firmware Update Utility
Copyright MidNite Solar Inc. 2012
Andrew Meares, andy@midnitesolar.com
12/7/2012

Mac OS X

Description:
The mnupdate utility is a Python script that uploads a MidNite firmware through
a USB COM port.  The script requires Python 2.7 and the pyserial
module.  Mac OSX comes with Python but you should check that you have version 2.7.
From the command line type

python

The response will be the version of Python installed.  Type control d to exit python.
If you need to upgrade Python go to:

www.python.org/download/releases/2.7/

The pyserial module is not included with python. If you do not have it you can get it
using Macports with:

sudo port install py27-serial

Alternatively it can be downloaded from:

pyserial.sourceforge.net/

Follow the online instructions for installation.  Note that you may have to update your
PATH to use pyserial if you use your Mac's version of python because pyserial is
installed in a different location and python might not be able to find it.  Try:

export PYTHONPATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
       site-packages:$PYTHONPATH

You can add this to the end of your profile by editing your .bash_profile

In order to function, the mnupdate.py script must have execute permissions and
have permissions to access the serial port device.  From Terminal, cd to the directory
with your Midnite Solar firmware and type:

chmod +x mnupdate.py

To find the device name in Mac OSX, type:

ls /dev/tty.*

Do this once with the USB from your Midnite device not plugged into the computer and then
with it plugged in type it again to figure out your device name.  For a Classic charge
controller it should be something like 'tty.usbmodemDEADC0D1'. Replace the 1 at the end in
the examples if yours differs.

Run the update script once for the Classic and then again for the MNGP.  After first
updating the Classic, turn off the power and run the script a second time to upgrade the
MNGP.


Instructions:
To update the firmware on your Classic Charge Controller use the following
procedure:
1. Switch off the Classic battery and PV inputs.  This turns your Classic off
   completely.
2. Plug your computer into the USB port on the Classic.
3. With the Classic off, run the mnupdate utility in your terminal with the
   proper options.  The options are described later in this document.
4. When "Waiting for serial device." is displayed, switch the battery breaker to
   turn on your Classic.  The Classic should boot and the mnupdate utility
   should connect and automatically begin uploading the firmware.
5. The firmware can take a few minutes to upload, so be patient.
6. Once the mnupdate utility has finished running, cycle the power on your
   Classic.

   
Command Line Options:
usage: mnupdate.py [-h] [-d DEVICE] [-b {9600,19200,57600}] [-t TIMEOUT]
                   [-m MESSAGE] [-z SLEEP] [-r] [-x REPEAT_SLEEP] [-s]
                   filename

A utility for updating firmware via a USB COM port.

positional arguments:
  filename              Firmware file path/name

optional arguments:
  -h, --help            show this help message and exit
  -d DEVICE, --device DEVICE
                        Device path/name
  -b {9600,19200,57600}, --baudrate {9600,19200,57600}
                        Device baudrate
  -t TIMEOUT, --timeout TIMEOUT
                        Device timeout in seconds
  -m MESSAGE, --message MESSAGE
                        Upload message
  -z SLEEP, --sleep SLEEP
                        Sleep time for serial port in seconds
  -r, --repeat          Repeat upload message?
  -x REPEAT_SLEEP, --repeat-sleep REPEAT_SLEEP
                        Repeat upload sleep time in seconds
  -s, --silent          Silent mode?


Examples: **Since this version is for MAC I have added "-d /dev/tty.usbmodemDEADC0D1" to all examples because it is required.**
For a basic Classic update simply use:
./mnupdate.py -d /dev/tty.usbmodemDEADC0D1 INSERT_FILENAME.ctl

In order to update your MNGP you must use the repeat option and a special message.
./mnupdate.py -d /dev/tty.usbmodemDEADC0D1 -r -m uPlDrEMaLLfl INSERT_FILENAME.rem

The '-d' option can be used to specify a device other than '/dev/ttyACM0' (ACM0 is for Linux). **required for MAC users**
./mnupdate.py -d /dev/tty.usbmodemDEADC0D1 INSERT_FILENAME.ctl

If for some reason the program tries to acquire the serial port too quickly, it
may work to increase the sleep time as follows.
./mnupdate.py -d /dev/tty.usbmodemDEADC0D1 -z 1.5 INSERT_FILENAME.ctl

If the firmware update fails on the MNGP try adding both -z and -x options:
./mnupdate.py -d /dev/tty.usbmodemDEADC0D1 -x 0.1 -z 1.5 -r -m uPlDrEMaLLfl FILENAME.rem


Choosing a Firmware Update File:
The proper file for your particular device must be chosen.  There are different
firmwares for different Classic voltages and for the MNGP.  The firmware files
have the extension '.ctl' or '.rem' and are available from the MidNite Solar
web page.


Resources:
http://www.midnitesolar.com/
http://pyserial.sourceforge.net/



K7IQ 🌛  He/She/Me

boB


Oh man !  I hear you on the chemo thing...  It's going around.  You and your wife are not alone  !

But then again, a trip to the cabin might be just what is needed !

boB
K7IQ 🌛  He/She/Me

Rybren

boB,

Thanks for the response.  Yeah, chemo is a real pain.  This last bout was particularly rough on her and we haven't been able to do much of anything.  It's particularly frustrating, because despite the fact that she has Stage 4 lung cancer, she'd have no symptoms if it weren't for the chemo.

The Classic itself updated fine to 1849.  The issue I've been having is with the 1821 Graphic panel update.  The file is in MNupdate_Linux_Mac_Rev1849_4-21-2014.zip  (latest production firmware)

The instructions are different from what you posted and have a more recent revision date of 2-20-2014 (boB)

When I get up to the camp, should I try the older instructions?

Thanks,

Jerry
4 x 210W PV, Classic 150, e-panel, Samlex PST-1500-24, 232AH 24V