GEM firmware upgrade seems to have failed, what now?

Ask questions about the GEM here.
vilord
Posts: 32
Joined: Fri Aug 23, 2019 10:54 am

GEM firmware upgrade seems to have failed, what now?

Post by vilord » Sat Dec 24, 2022 11:55 pm

So, over the years I've had this problem where every time the power goes out, the gem resets into this state where i have to turn it off, pull the battery, then turn it on and it will boot as if nothing had been wrong to begin with.

I was comparing numbers against another energy monitor I have and noticed that the values seemed way off, so I checked the settings and found that all the CTs were set to micro-40, instead of the split 60 I had on the channel that was wrong, so I changed it to what it should be. After hitting save, I noticed that about a third of the channels had flipped from X2 off to on, though they weren't monitoring 240v circuits, so I set them back correctly too.
I saw on the website that there was a new firmware available, so I figured maybe I should just try giving that a try to start fresh, so to speak. It was accessible at this point, green lights with the occasional flash as data went through, etc.
I was on COM firmware ver: 4.36 and ENG firmware ver: 1.49. As a mac user, I pulled up the java firmware updater, pointed it to dashbox port 8001, loaded up the 5.42 firmware and hit go. System LED flashed like crazy as it was uploading, dots going across the tiny window.
Then it stopped. Red system LED. Great, I thought. should've just left it alone.

So, now what can I do? I see other posts mentioning recovery mode, but didn't see where that was actually documented. Even the firmware upgrading steps I was sort of just guessing, there isn't an obvious firmware upgrade guide and no readme comes with the firmware files. Did I do something wrong? Or is this just a thing that happens? Before I started I did check that I have the correct 5V 2 amp power Adapt*er*
vilord
Posts: 32
Joined: Fri Aug 23, 2019 10:54 am

Re: GEM firmware upgrade seems to have failed, what now?

Post by vilord » Sun Dec 25, 2022 8:13 am

I poked around some more in the documentation, and I found that a much older version of the install guide talks about flashing with a jar-based setup tool.
The newer guides say to refer to the separate communication books, and the communication book for a non-ethernet / non-xbee / non-wifi model only talks about the windows application for updates, and for the java tool it says that other instructions are required, but not to be found anywhere :/
vilord
Posts: 32
Joined: Fri Aug 23, 2019 10:54 am

Re: GEM firmware upgrade seems to have failed, what now?

Post by vilord » Sun Dec 25, 2022 3:53 pm

Whelp... borrowed my daughter's windows laptop with v8 of the recovery tool and hooked up a usb to serial adapter to the com port. tried com1, tried com2. tried flipping tx and rx. tried connecting a different usb serial adapter. tried starting the firmware flash then powering up, or powering up first then flashing. tried keeping the button held while flashing, tried holding the button while powering up then letting go, then flashing. tried at 19200, tried at 115200.

It is impressive how all the under $20 DIY electronics systems (esp, arduino, teensy, etc) have such reliable firmware flash/recovery procedures, with simple command line tools that run on any operating system (python!) and tell you exactly what to do, what settings to use, etc. Not so much on this $600 energy monitor, even through a decade of iterations.

Reading back through forum posts and blog posts it sounds like the initial problem was that my com1 port (through the dashbox) was set to 115200 during the flash, and i guess that's doesn't work. Why does it let you do this if it results in a failed flash pretty much every time?

And, what do I do now?
ben
Site Admin
Posts: 4265
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM firmware upgrade seems to have failed, what now?

Post by ben » Mon Dec 26, 2022 4:09 am

Sorry, the documentation on this is pretty lacking.

- Keep the battery removed and unplug the unit.
- Hold the button at the bottom and plug it back in. (Recovery Mode). The SYS LED will remain solid red.
- On the Windows laptop you borrowed, use the GEM Network Utility, Under the Firmware tab select Recovery Mode and the most recent F/W and click Start.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
vilord
Posts: 32
Joined: Fri Aug 23, 2019 10:54 am

Re: GEM firmware upgrade seems to have failed, what now?

Post by vilord » Mon Dec 26, 2022 7:52 am

Battery out. When I power up without touching anything the right side light comes up green immediately. The left light comes up green for a quarter of a second then switches to solid red.
If I power it up holding down the button, the right led comes up green and the left led stays off until I let go of the button.
Am I supposed to keep the button held down while flashing? The left light turns red as soon as I let go, so I'm just sort of assuming that's what you meant.

I tried sending a flash to it with four different usb to serial interfaces with the windows laptop.
One of the USB-rs232 adapters nothing happened at all no matter how it was hooked up.
One of them the progress bar would go from 0-100, but only if I had the wires hooked up seemingly backwards, TX to TX and RX to RX instead of TX to RX.
The lights on the GEM did not change while the firmware is getting sent... should they be blinking like they did as it was flashed through the dashbox?
When it got to 100% the network utility said it was successful, but nothing else would happen, lights stay red and green.

My other two adapters are USB-TTL, not USB-RS232, so I'm guessing that's why those didn't do anything at all.

Maybe I need different/better adapters? Is there a TTL level location on the board I could try this with using the TTL adapters?
I've ordered an RS232-TTL MAX3232 interface in case that might help out...
vilord
Posts: 32
Joined: Fri Aug 23, 2019 10:54 am

Re: GEM firmware upgrade seems to have failed, what now?

Post by vilord » Mon Dec 26, 2022 9:26 am

Additional information that may help: I have a GEM ver2.06 according to the board. It's black, not blue, but doesn't have ethernet so I hadn't been following the Ethernet only board instructions. Serial number starts 01021
ben
Site Admin
Posts: 4265
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM firmware upgrade seems to have failed, what now?

Post by ben » Mon Dec 26, 2022 12:22 pm

vilord wrote:
Mon Dec 26, 2022 7:52 am
Battery out. When I power up without touching anything the right side light comes up green immediately. The left light comes up green for a quarter of a second then switches to solid red.
If I power it up holding down the button, the right led comes up green and the left led stays off until I let go of the button.
Am I supposed to keep the button held down while flashing? The left light turns red as soon as I let go, so I'm just sort of assuming that's what you meant.

I tried sending a flash to it with four different usb to serial interfaces with the windows laptop.
One of the USB-rs232 adapters nothing happened at all no matter how it was hooked up.
One of them the progress bar would go from 0-100, but only if I had the wires hooked up seemingly backwards, TX to TX and RX to RX instead of TX to RX.
The lights on the GEM did not change while the firmware is getting sent... should they be blinking like they did as it was flashed through the dashbox?
When it got to 100% the network utility said it was successful, but nothing else would happen, lights stay red and green.

My other two adapters are USB-TTL, not USB-RS232, so I'm guessing that's why those didn't do anything at all.

Maybe I need different/better adapters? Is there a TTL level location on the board I could try this with using the TTL adapters?
I've ordered an RS232-TTL MAX3232 interface in case that might help out...
Release when plugged in.

The Tx/Rx/GND ports are RS232. They're labelled as you plug them in, Tx to Tx, Rx to Rx, GND to GND.

The port to the left of the LEDs is a Zigbee socket. There should be TTL access there. It runs on COM2 though.

I've seen some weirdness with the WiFi/Ethernet before when connected via Ethernet and trying to program firmware. For some reason it would catch a byte or two causing the F/W process to freeze. Any chance you have an Ethernet cable connected?
Ben
Brultech Research Inc.
E: ben(at)brultech.com
vilord
Posts: 32
Joined: Fri Aug 23, 2019 10:54 am

Re: GEM firmware upgrade seems to have failed, what now?

Post by vilord » Mon Dec 26, 2022 12:36 pm

It's a serial-only board, so no interference should be coming from ethernet. I actually deinstalled it at this point, so it's just the board in the case on my desk and the 5vdc power supply. I'm hoping there's something wrong with my rs232 adapters... I haven't worked with rs232 in so many years. I think I have an old dell laptop with an actual serial port, though i don't have any db9 cables. Will see if it still needs a new hard drive or if it will boot up.
Last edited by vilord on Mon Dec 26, 2022 1:47 pm, edited 1 time in total.
ben
Site Admin
Posts: 4265
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM firmware upgrade seems to have failed, what now?

Post by ben » Mon Dec 26, 2022 1:19 pm

vilord wrote:
Mon Dec 26, 2022 12:36 pm
It's an Serial-only board, so no interference should be coming from ethernet. I actually deinstalled it at this point, so it's just the board in the case on my desk and the 5vdc power supply. I'm hoping there's something wrong with my rs232 adapters... I haven't worked with rs232 in so many years. I think I have an old dell laptop with an actual serial port, though i don't have any db9 cables. Will see if it still needs a new hard drive or if it will boot up.
Ahh, ok.

Any chance the RS232 cables are a Prolific chipset? We've had a ton of issues with adapters with counterfeit chips. The driver will scramble bits at random.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
vilord
Posts: 32
Joined: Fri Aug 23, 2019 10:54 am

Re: GEM firmware upgrade seems to have failed, what now?

Post by vilord » Mon Dec 26, 2022 1:40 pm

The usb-rs232 cable i was using is an old counterfeit prolific cable, yes.

I found an old dell d630 in the garage (nearly 16 years old!) found a power cord that will fit it. Powered it up and it has an on-chipset intel RS232 port. Hooked up some wires from pins 2, 3, and 5 to rx, tx, and GND respectively.
Powered up the GEM with the button pressed, let go, sys led turns red, comm led is still green as before. kicked off the firmware flash... error 222 / timeout
Tried swapping the RX/TX... same error.
This is all I've gotten from the prolific cable today as well.
Post Reply