Linux based Midnite firmware updater

Started by TomW, December 11, 2012, 01:12:28 PM

Previous topic - Next topic

TomW

Folks;

Not sure if this is ready for general use yet, but I can confirm that it works.

A few "gotchas" were encountered but it works.

One thing I discovered is that the USB connection can go through a powered hub to update the firmware but it does not seem to work if another device, in my case a USB stick, is attached to the hub.

I have successfully installed both 1072 and 1181 to the Classic 150 I have and the MNGP using this tool.

I have to say thanks to Ryan, Andy and boB for seeing the need for this tool and putting the resources into developing it. It is a Python script and I think that makes it truly cross platform support.

So, for those of you that do not use Windows I think they may have this tool ready for prime time soon.

I used this tool with my Vaio laptop running Ubuntu 11.10 and my Raspberry Pi running Debian Raspbian "Wheezy". I also use the Pi to monitor the USB data dump feature on the Classic.

Both simply needed to have the python-serial package installed to use it which takes  a couple minutes to install using sudo apt-get install python-serial.

Thanks again for the tool and a chance to test it, Midnite guys!

Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

boB

Tom, can you really update a Classic and MNGP from a  Raspberry Pi  ???

If so, this might be useful for field updating for installers/dealers etc.

This is very cool and useful !

boB
K7IQ 🌛  He/She/Me

TomW

Quote from: boB on December 11, 2012, 03:01:16 PM
Tom, can you really update a Classic and MNGP from a  Raspberry Pi  ???

If so, this might be useful for field updating for installers/dealers etc.

This is very cool and useful !

boB

boB;

Absolutely!

tomw@raspberrypi ~ $ cat /proc/cpuinfo
Processor   : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS   : 697.95
Features   : swp half thumb fastmult vfp edsp java tls
CPU implementer   : 0x41
CPU architecture: 7
CPU variant   : 0x0
CPU part   : 0xb76
CPU revision   : 7

Hardware   : BCM2708
Revision   : 000f

running Raspbian: wheezy/sid

It does not have a display or keyboard but they make some cool gear to get past that. It has composite and HDMI video and usb keyboards work.

A real geek could set it up to do it headless.  Seems you could have it run a script on boot that uploads it on its own. Could even drive a GPIO pin to light an LED when its ready to power up the Classic and to indicate it is finished. Its Linux so it could do things nobody has even dreamed of yet.

You could make your own image that just has the bits you need. When things change just update the image and distriubute that so the installer can write it to an SD card.

Cheap, too!

Just spitballing there but ...

Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

TomW

Additionally, as long as we are dreaming.

Maybe could integrate it into your systems to handle logging / communications, maybe a web based programming GUI? @ $40 its a very versatile piece of kit.

Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

dgd

#4
Quote from: TomW on December 11, 2012, 01:12:28 PM

Not sure if this is ready for general use yet, but I can confirm that it works.

I have successfully installed both 1072 and 1181 to the Classic 150 I have and the MNGP using this tool.

OK so where is this linux updater program?

dgd
Classic 250, 150,  20 140w, 6 250w PVs, 2Kw turbine, MN ac Clipper, Epanel/MNdc, Trace SW3024E (1997), Century 1050Ah 24V FLA (1999). Arduino power monitoring and web server.  Off grid since 4/2000
West Auckland, New Zealand

TomW

Quote from: dgd on December 15, 2012, 06:20:54 AM

OK so where is this linux updater program?

dgd

dgd;

It was emailed to me but I am not sure I can pass it on. I didn't exactly sign an NDA but it is beta software so I will let Ryan,boB or Andy decide if it can go public.

They may release it  but it is not my decision to make.

Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

Halfcrazy

It is actually linked in each revision of beta firmware. This thread here:  http://midnitesolar.com/smf_forum/index.php?topic=913.0
Changing the way wind turbines operate one smoke filled box at a time

TomW

Quote from: Halfcrazy on December 15, 2012, 07:13:58 AM
It is actually linked in each revision of beta firmware. This thread here:  http://midnitesolar.com/smf_forum/index.php?topic=913.0

Great! I must have missed that or was having what I like to refer to as a Senior Moment.  :o
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

Westbranch

OK just tried to use my Linux based machine to use the most recent version of the updater,  BUT no go.  The above link does not work either???

Loaded just fiiiiiiine on the desktop with XP home
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

TomW

Quote from: Westbranch on February 24, 2013, 09:26:26 PM
The above link does not work either???

Yeah got this error:


The topic or board you are looking for appears to be either missing or off limits to you.


Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

dgd


Yes,  I get the same error, Who do you see about getting this problem resolved?

dgd
Classic 250, 150,  20 140w, 6 250w PVs, 2Kw turbine, MN ac Clipper, Epanel/MNdc, Trace SW3024E (1997), Century 1050Ah 24V FLA (1999). Arduino power monitoring and web server.  Off grid since 4/2000
West Auckland, New Zealand

boB


I get the error too.   If you are talking about the Linux updater to use with this latest beta code and
cannot wait, download the older one here     http://fusion.midnitesolar.com/MNupdateForLinux_12-1-2012.rar
and also the windows beta code, run the windows exe file (in windoze) to extract the files and copy the
.ctl an .rem  files over to the Linux install directory.   The actual files to update with (ctl and rem) are
the same.  The .rem (MNGP, remote) has not changed though.

boB

K7IQ 🌛  He/She/Me

Westbranch

Did some reading and Python 2.7 is needed. 
I assume that Py 2.73, the  latest version, is the one to use?
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

TomW

#13
Quote from: Westbranch on February 26, 2013, 01:33:24 PM
Did some reading and Python 2.7 is needed. 
I assume that Py 2.73, the  latest version, is the one to use?

mnupdate.py for sure works with:

python --version
Python 2.7.2+

Editted for clarity:

It does NOT work with:

[tomw@pi2 ~]$ python --version
Python 3.3.0

Tosses this error:

[tomw@pi2 ~]$ ./mnupdate.py
  File "./mnupdate.py", line 28
    print "Error: Unable to import python serial module (pyserial)."
                                                                   ^
SyntaxError: invalid syntax

Chokes on "import serial" Might be a diff syntax on 3.3.0

Thios is my lone ArchLinux version  Pi that I use for monitoring the Classics. and I am going to replace Arch with The Raspbian image when I get ambitious. It has the proper version for that script.



Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

Vern Faulkner

Returning from the build-off-grid-cabin-on-short-notice dormancy, i see a press to update the classics to the latest and greatest firmware.

Small problem: no windoze machine at hand.... just ubuntu and android around here.  Is there a linux updater, or, alternately, wine-based process I can use?