Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pico C 'Failed Update' Error #354

Open
RoundRockBrewer opened this issue Jun 23, 2022 · 118 comments
Open

Pico C 'Failed Update' Error #354

RoundRockBrewer opened this issue Jun 23, 2022 · 118 comments
Assignees
Labels
bug Something isn't working

Comments

@RoundRockBrewer
Copy link

Have a brand-new Pico C connected to my Picobrew server. It connects goes to update and gives a 'failed update' error message. I can't proceed past this error. I have looked everywhere online I can think of for a solution, for two days, and can't find anything about it. Can someone please help me out with this?

@BuckoWA
Copy link
Contributor

BuckoWA commented Jun 23, 2022

I believe you need to add the machine UID to the config.yaml (/devices) since the server has no way to know whether the device is a C or a Pro/S (which have different firmware).

@RoundRockBrewer
Copy link
Author

Makes sense. Where do I find the config.yaml to add the machine UID? And where do I find the machine's UID?

Thank You Bucko!

@BuckoWA
Copy link
Contributor

BuckoWA commented Jun 23, 2022

The machine ID can be found by starting the machine in Service Menu. To do that, press and hold the dial knob on the front and then power on the machine. Press the knob once and the machine ID will show up.

The easiest way to add the machine ID to the config file is through the server's devices page. In the upper right hand corner, under System, pull down and select Devices. Then press the green + Add Device. Select Pico C, add the machine ID, and give it a name you'd like and press Save. This will add to the file. You can also manually add to the config.yaml file in the picobrew_pico directory, but that requires using a linux text editor to add it. Much easier through the server itself.

Good luck.

@RoundRockBrewer
Copy link
Author

Well that worked for the update. Showed updating, restarting, showed garbage on the display then went blank. That's all it does now. Is my machine now bricked? Any suggestions?

@BuckoWA
Copy link
Contributor

BuckoWA commented Jun 23, 2022

Hmmm... Haven't seen that occur. Are you able to boot the machine into the Service mode again? If so, you can factory reset in that menu. Exit Service menu and try again.?

@RoundRockBrewer
Copy link
Author

I can't see anything but garbage on the screen at startup then the screen goes black and never comes back. Would upload a video, but don't think it will help beyond my explanation. If the control knob/button are still working but I just can't see what it's displaying, can you walk me through it 'in the blind'? Worth a shot I guess, otherwise I think I've probably got an expensive brand-new boat anchor.

@BuckoWA
Copy link
Contributor

BuckoWA commented Jun 23, 2022

Here's how to do the Factory reset, although I'm a little skeptical about this working in the blind as you say.

Power up in the Service menu by pressing and holding the knob and then pressing the power switch. Wait 5-10 seconds.
Press the knob 3 times.
Scroll knob right 5 times.
Press the button.
Scroll knob right 1 time.
Press the button.

Hope this works.

@RoundRockBrewer
Copy link
Author

Well that did something. It makes some crazy loud noises like an arm is rotating for 10-15 seconds then just hums continuously like a pump motor or something is running. Wonder how a firmware update could cause this to happen and what the solution is to fix it?

@BuckoWA
Copy link
Contributor

BuckoWA commented Jun 23, 2022

Maybe the file was corrupted during the download. Let's see if anybody else chimes in here. Otherwise, I may be able to salvage a PCB from one of my units I'm using for parts and send it to you.

@chiefwigms
Copy link
Owner

You can program the firmware via USB serial if you take the LCD off, if needed.. not near a PC at the moment

@RoundRockBrewer
Copy link
Author

I can certainly do that if I have the correct firmware and know where to plug the USB in. I'm in no rush at this point. Just want to get her up and running. Thank you!

@tmack8001
Copy link
Collaborator

Here's how to do the Factory reset, although I'm a little skeptical about this working in the blind as you say.

Power up in the Service menu by pressing and holding the knob and then pressing the power switch. Wait 5-10 seconds.
Press the knob 3 times.
Scroll knob 5 times.
Press the button.
Scroll knob 1 time.
Press the button.

Hope this works.

I believe scroll knob left vs scroll knob right might end the prompt at a different utility. The pumping and sounds heard sound like there was a test session, rinse or other recirculation utility triggered perhaps?

@tmack8001
Copy link
Collaborator

tmack8001 commented Jun 24, 2022

Wonder how a firmware update could cause this to happen and what the solution is to fix it?

Are you sure you have a Pico C vs Pico S/Pro? I ask cause it has been reported that if the wrong device type firmware is loaded the device has either an oversized or undersized display. Maybe you have the oversized display where you can't really read or see what is intended to be shown due to the bevel of the display board?

@RoundRockBrewer
Copy link
Author

Yes. Here's a pic of the back placard.

Pico C
.

@BuckoWA
Copy link
Contributor

BuckoWA commented Jun 24, 2022 via email

@tmack8001
Copy link
Collaborator

@RoundRockBrewer figured you knew, just wanted to double check 😉

@RoundRockBrewer
Copy link
Author

Going into the service menu
Pressing the knob 3 times.
Scrolling left 5 times.
Pressing the button.
Scrolling left 1 time &
Pressing the button doesn't do anything.

That is what you meant right?

I will wait for Chief to get me the firmware to flash. Guessing I will need the flash utility too.

Thank you to all for lending a helping hand.

@chiefwigms
Copy link
Owner

Going into the service menu Pressing the knob 3 times. Scrolling left 5 times. Pressing the button. Scrolling left 1 time & Pressing the button doesn't do anything.

That is what you meant right?

I will wait for Chief to get me the firmware to flash. Guessing I will need the flash utility too.

Thank you to all for lending a helping hand.

All the firmware for Pico devices is here
You'd need to get a usb -> serial breakout
Then you'd need to use a CC3200 programming tool (you can download one from TI, or there's a open source tool

Attach the programmer to the port (make sure the pins match, labeled on the board) I have circled below when you remove your LCD/rotary knob:
0531181927

@RoundRockBrewer
Copy link
Author

Found a SparkFun USB to Serial, cable and adapter on Amazon I can get tomorrow. Will these work?
Amazon

And Thanks!

@chiefwigms
Copy link
Owner

You should only need one of those

@RoundRockBrewer
Copy link
Author

I do need the cable right? SparkFun is USB-C(Don't see a USB on Amazon) so I need a converter to accommodate the USB cable.

@chiefwigms
Copy link
Owner

if you dont have a usb a to usb c cable yeah, but i'm saying, you don't need the $14.99 usb->serial (first item in your cart)

@RoundRockBrewer
Copy link
Author

I do have a usb a to usb c cable, but I guess I'm confused about how to connect to the board w/o the USB->serial cable. Looks like 6 pins to connect to the board from your pic. Haven't opened unit up yet.

@RoundRockBrewer
Copy link
Author

I get it now. The SparkFun attaches straight to the board? Sorry about that. I see the connector now.

@chiefwigms
Copy link
Owner

chiefwigms commented Jun 24, 2022

Tada...
image
image
The black thing on the bottom of the adapter is a header that connects to the pico board

@RoundRockBrewer
Copy link
Author

I saw that and it finally sank in. It's ordered. Thanks again!

@RoundRockBrewer
Copy link
Author

I've looked at both CC3200 programming tools for the last 3+ hours and am at a complete loss. I have no clue how to use TI's CC3200-SDK tool, which I downloaded. And the other one requires Python which I know absolutely zero about, other than I can download it too but wouldn't know how to use it either. Any step by step instructions on how to use either one of them to flash the Pico C firmware? Thanks again for all of your help!

@chiefwigms
Copy link
Owner

I've looked at both CC3200 programming tools for the last 3+ hours and am at a complete loss. I have no clue how to use TI's CC3200-SDK tool, which I downloaded. And the other one requires Python which I know absolutely zero about, other than I can download it too but wouldn't know how to use it either. Any step by step instructions on how to use either one of them to flash the Pico C firmware? Thanks again for all of your help!

For the github tool, you'll need python (>3.6) and have to follow the installation/usage for the CC3200 tool that's on github - its really not complicated - just follow the guide they have. Once you have the usb->serial tool, you'll have to figure out what port it's on (you may need FTDI drivers), then you'll just issue this command cc3200tool -p COM# write_file pico_c_0_1_34.bin /sys/mcuimg2.bin (assuming that you have that pico_c_0_1_34.bin, from the firmware area i linked above, in the working directory that you issue that command from), and COM# is whatever COM port the usb-serial is on (i.e. COM6). I've refreshed the PC i'm on since doing this like 4 years ago, so I don't have the TI SDK installed anymore

@RoundRockBrewer
Copy link
Author

Ok. I've got Python installed and the correct bin file downloaded. Will see what happens tomorrow when the programming dongle arrives. I'll let you know if I'm successful. Have a great weekend Sir.

@chiefwigms
Copy link
Owner

ok - if you're on windows, if you haven't installed the cc3200 tool, do this pip3 install git+https://github.com/mon/cc3200tool.git (you can do this before you have the usb->serial dongle)
If that completes, you should be able to just run cc3200tool and see output like below:
image

Then you can cd to whatever folder you have the firmware bin file and paste the write command I linked a few posts above and you should be back in business

@tmack8001
Copy link
Collaborator

If you have a Z or Zymatic I honestly wouldn't mess with the headache of a C or S/Pro especially if you don't have a reusable step filter like the PicoFree. Maybe as a temp controller for the PicoStill, but even that you need to continue to add water to the top res... With the Zymatic or Z just make sure the glycol loop is full and use it as a heat source.

@tmack8001
Copy link
Collaborator

You can override the firmware we force to the C by editing the firmware section of the config.yaml on the server (file share, ssh into the server, or local keyboard+monitor). Set the desired firmware to what your machine has.

@RoundRockBrewer
Copy link
Author

RoundRockBrewer commented Jun 26, 2022 via email

@BuckoWA
Copy link
Contributor

BuckoWA commented Jun 26, 2022

All - just took one of my Cs and performed a factory reset on it. Once it rebooted (I preserved the PICOBREW WiFi credentials), it connected to the server and updated the firmware OTA without a hitch, so I believe the firmware files in the repository are fine at least for the C. Running the latest code on here.

@RoundRockBrewer
Copy link
Author

RoundRockBrewer commented Jun 26, 2022 via email

@chiefwigms
Copy link
Owner

Maybe try programming again and pushing the reset button on the back a few times🤷‍♂️

@RoundRockBrewer
Copy link
Author

I let it OTA update firmware from the Pi server and it's back to garbage on the screen. I tried the cc3200tool commands
cc3200tool -p COM4 read_file /sys/mcuimg1.bin blah.bin
then
cc3200tool -p COM4 write_file blah.bin /sys/mcuimg2.bin)
you sent to try to get back to factory, but they are not working now. Can you get me back to factory firmware again?

@chiefwigms
Copy link
Owner

I'd try rebooting/resetting (completely remove power from the Pico) and trying again. If that doesn't do it, I think you may be out of luck

@chiefwigms
Copy link
Owner

pico_c_test.zip
try this:
cc3200tool -p COM4 write_file pico_c_test.bin /sys/mcuimg2.bin

@RoundRockBrewer
Copy link
Author

Still garbage with scrolling garbage then blank.

@chiefwigms
Copy link
Owner

That's what picobrew says is the latest for your uid so 🤷‍♂️. Did you try the reset button a few times & a hard (remove power cord) cycle?

@RoundRockBrewer
Copy link
Author

I did. Should the factory firmware restore commands work every time? Was the only reason I tried the OTA from Pi server because I thought if it didn't work I could just do those again. Am talking with Kevin(SBC facebook group) as well. Trying everything we can think of to get it back to working even if crippled. He thinks he can take it from there.

@tmack8001
Copy link
Collaborator

Issue is the firmware in "both solutions" are all the same so... If both manually flashing and forcing a http firmware load aren't working I doubt "Kevin's solution" will work unless my hypothesis of http instability was true. All the firmware sources are identically copied from PB and/or each other 🤷‍♂️

@chiefwigms
Copy link
Owner

Unless you pushed a bin file to /sys/mcuimg1.bin, it should always restore - note that you don't need to read /sys/mcuimg1.bin again - you already had the bin file saved to blah.bin. You would only have to write blah.bin to /sys/mcuimg2.bin

@RoundRockBrewer
Copy link
Author

Just looked back through all the command lines since we started yesterday going back to -certutil hashfile to look for me making a /sys/mcuimg1.bin typo, but I didn't. I'm guessing the mcuimg1.bin is corrupt now and my good blah.bin got overwritten.

@chiefwigms
Copy link
Owner

the only thing i can recommend is go back through do one command, hard power, reboot, then the next and try see if that works, otherwise you're SOL

@mbouchar91
Copy link

Hey all - I am receiving the same "Failed Update Error." After reading this post, I am a little nervous to add my machine UID (I have a Pico C with F0.0.3). I do not want to end up in the same situation as RRB but I am probably going to have to roll the dice. Is there any additional insight anyone can provide before I add the UID in the server device page? Thanks in advance!

@chiefwigms
Copy link
Owner

chiefwigms commented Jul 8, 2022

Hey all - I am receiving the same "Failed Update Error." After reading this post, I am a little nervous to add my machine UID (I have a Pico C with F0.0.3). I do not want to end up in the same situation as RRB but I am probably going to have to roll the dice. Is there any additional insight anyone can provide before I add the UID in the server device page? Thanks in advance!

You can either:

  1. Edit config.yaml and set a firmware version that matches what you have
  2. Edit https://github.com/chiefwigms/picobrew_pico/blob/master/app/main/routes_pico_api.py, and modify process_check_firmware to always return #F#
  3. In a web-browser, go to http://picobrew.com/API/pico/getFirmware?uid=, and save the corresponding text to your own bin in *picobrew_pico\app\firmware\pico_c* and modify the source accordingly to pull the correct firmware for your machine

@tmack8001
Copy link
Collaborator

To be extra clear those are options and not a sequential set of steps to perform.

Don't think anyone really knows yet why these machines are doing something different than other C's in the group.

@RoundRockBrewer
Copy link
Author

I would highly recommend contacting Kevin on the Facebook Small Brew Companion group. He is the creator and wrote the software. He has helped many, many people with issues similar to ours. I'm currently working with him to attempt to resolve my ongoing issue. I don't recommend going down the same rabbit hole I went down. I'm still in it - 2 weeks later. Good luck!

@tmack8001
Copy link
Collaborator

@RoundRockBrewer just FYI we are all "creators and writters of this software" and have also "helped hundreds in similar situations". Your Pico was the first we have heard doesn't load the firmware that is included here... if you and Kevin can get your machine loaded over the network to a Windows computer with firmware... he and/or you should work with the community to get that fixed here as well.

Just saying...

@RoundRockBrewer
Copy link
Author

tmack - I apologize. Complete misunderstanding on my part. No disrespect to all creators/programmers intended.

If we do manage to get it fixed, I will definitely post here how we went about it.

@chiefwigms
Copy link
Owner

chiefwigms commented Jul 8, 2022

tmack - I apologize. Complete misunderstanding on my part. No disrespect to all creators/programmers intended.

If we do manage to get it fixed, I will definitely post here how we went about it.

TBH there's nothing Kevin will help you with - I got you the exact firmware that Picobrew said your device was using (unless you gave the wrong UID), and had you program it with CC3200 - if that doesn't work, your pico is toast. You can see if this mcuimg1.bin works (from my Pico S) to get you back to F0.0.3 (don't flash mcu1 at all, just mcu2), and then flash the custom C firmware I gave you before, but nothing Kevin does via his windows program will help.
mcuimg1_pico_s.zip

@mbouchar91
Copy link

Thanks guys, appreciate the help. I am not super technical but I will give it a go. I think I can get my brother to help me if I need it. I will let you know how it goes. Thanks again!

@RoundRockBrewer
Copy link
Author

Problem finally resolved. Here's how:

Using Small Brew Companion(SBC) and Windows Mobile Hotspot, I changed the ssid and wifi password .txt files to match what I had setup for the Mobile Hotspot. Wrote them to the Pico C using cc3200tool, powered on the Pico C and made sure it was
running by allowing it to connect to SBC, powered off the Pico C, closed
SBC, ran the Windows firmware updater that was supplied by (SBC Kevin) that was created for my Pico C, allowed the machine to update and then powered the Pico C down.
Closed the firmware updater, ran SBC, powered on the Pico C and it was
back up and running with firmware version 0.1.34.

@tmack8001
Copy link
Collaborator

@RoundRockBrewer do you have the ASCII firmware file that was loaded by this application? How does that differ from the ones provided here which were direct copies from Picobrew servers (I'm sure they were the same source).

@RoundRockBrewer
Copy link
Author

Here is the .dat file used
PicoC.zip
.

@tmack8001
Copy link
Collaborator

There isn't a publicly known way to tell which firmware one would need to load to their Pico C, so instead of trying to detect which to load I've went with an option to toggle which you want to load.

image

After merging #363 and a future change to force a firmware to be loaded to the device (overriding the logic of /API/pico/checkFirmware which today just checks versions) should be able to fix this issue and allow for either firmware to be chosen by the brewer to install to their local Pico C.

@tmack8001 tmack8001 self-assigned this Feb 3, 2023
@tmack8001 tmack8001 added the bug Something isn't working label Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants