# Firmware update

**URL:** <https://forums.balena.io/t/firmware-update/282951>\
**Category:** balenaFin\
**Created:** [April 5, 2021, 12:00pm UTC](https://forums.balena.io/t/firmware-update/282951 "2021-04-05T12:00:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ricardoosorio](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ricardoosorio/32/5675_2.png) [@ricardoosorio](https://forums.balena.io/u/ricardoosorio)\
**Post date:** [April 5, 2021, 12:00pm UTC](https://forums.balena.io/t/firmware-update/282951/1 "2021-04-05T12:00:31Z")

</div>

Hi. Already try different dockers ([GitHub - balena-io-hardware/balena-fin-firmata-flash: BalenaFin application to flash the on-board co-processor with the latest version of balenaFin Firmata](https://github.com/balena-io-hardware/balena-fin-firmata-flash) and [GitHub - balenablocks/finabler: A block for balenaFin devices, handling coprocessor firmware flashing and operations, and exposing helpful balenaCloud tags](https://github.com/balenablocks/finabler)) and both fail in the same place:  
cannot open /dev/ttyUSB0  
I’m able to see cannot open /dev/ttyS0 , but since balenaFin revision 09 , guess code will try to use ttyUSB0

Any fix?

Thanks

---

<div class="post-metadata">

**Author:** ![curcuz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/curcuz/32/137_2.png) [@curcuz](https://forums.balena.io/u/curcuz)\
**Post date:** [April 5, 2021, 6:01pm UTC](https://forums.balena.io/t/firmware-update/282951/6 "2021-04-05T18:01:08Z")

</div>

hi there, the tools for flashing the co-processor rely on reading the hw revision from an EEPROM onboard balenaFin. Can you please run the following instructions to see what value is stored there?

within the device (any container shell):

1. `curl -Ls https://github.com/balena-io/balena-fin-sdk/releases/download/v0.2.0/balena-fin-cli-v0.2.0.tar.gz | tar -xvz -C /usr/bin/`
2. `/usr/bin/fin eeprom`

---

<div class="post-metadata">

**Author:** ![ricardoosorio](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ricardoosorio/32/5675_2.png) [@ricardoosorio](https://forums.balena.io/u/ricardoosorio)\
**Post date:** [April 5, 2021, 6:48pm UTC](https://forums.balena.io/t/firmware-update/282951/8 "2021-04-05T18:48:49Z")

</div>

> [@curcuz](#):
>
> /usr/bin/fin eeprom

Hi,

no output:

root@99fa7a5:/usr/src/app# /usr/bin/fin eeprom  
root@99fa7a5:/usr/src/app# /usr/bin/fin revision  
09  
root@99fa7a5:/usr/src/app# /usr/bin/fin uid  
root@99fa7a5:/usr/src/app#

---

<div class="post-metadata">

**Author:** ![ricardoosorio](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ricardoosorio/32/5675_2.png) [@ricardoosorio](https://forums.balena.io/u/ricardoosorio)\
**Post date:** [April 5, 2021, 6:50pm UTC](https://forums.balena.io/t/firmware-update/282951/9 "2021-04-05T18:50:43Z")

</div>

I did it from scratch. Using the production image balenaOS 2.72.0+rev1, as well as the developer one. And also try the oldest one available (2.36 rev2). All with same behaviour: /dev/ttyUSB0 not found.

---

<div class="post-metadata">

**Author:** ![curcuz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/curcuz/32/137_2.png) [@curcuz](https://forums.balena.io/u/curcuz)\
**Post date:** [April 5, 2021, 6:53pm UTC](https://forums.balena.io/t/firmware-update/282951/10 "2021-04-05T18:53:05Z")

</div>

thanks for checking - it seems the device does not have a value that is supposed to be stored in the EEPROM. Do you have the device at hand or is it remote? I would like to do a last test if possible (manually addind the value to the EEPROM and running the flashing container again)

---

<div class="post-metadata">

**Author:** ![ricardoosorio](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ricardoosorio/32/5675_2.png) [@ricardoosorio](https://forums.balena.io/u/ricardoosorio)\
**Post date:** [April 5, 2021, 6:57pm UTC](https://forums.balena.io/t/firmware-update/282951/11 "2021-04-05T18:57:24Z")

</div>

> [@curcuz](#):
>
> king - it seems the device does not have a value that is supposed to be stored in the EEPROM. Do you have the device at hand or is it remote? I would like to do a last test if possible (manually addind the value to the EEPROM and run

Device is on. I’ve it on my hand. If needed its possible to do anything. I’m available anytime

---

<div class="post-metadata">

**Author:** ![curcuz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/curcuz/32/137_2.png) [@curcuz](https://forums.balena.io/u/curcuz)\
**Post date:** [April 5, 2021, 6:58pm UTC](https://forums.balena.io/t/firmware-update/282951/12 "2021-04-05T18:58:22Z")

</div>

If the device is at hand, can you please scan its QRcode (top side of the PCB) and flash that string onto the EEPROM via `/usr/bin/fin eeprom --set <STRING>` then read it back via `/usr/bin/fin eeprom` and then read revision via `/usr/bin/fin revision`

---

<div class="post-metadata">

**Author:** ![ricardoosorio](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ricardoosorio/32/5675_2.png) [@ricardoosorio](https://forums.balena.io/u/ricardoosorio)\
**Post date:** [April 5, 2021, 7:03pm UTC](https://forums.balena.io/t/firmware-update/282951/13 "2021-04-05T19:03:42Z")

</div>

> [@curcuz](#):
>
> /usr/bin/fin eeprom --set

root@99fa7a5:/usr/src/app# /usr/bin/fin eeprom --set 1909AG5T5S4  
Incorrect EEPROM value

---

<div class="post-metadata">

**Author:** ![curcuz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/curcuz/32/137_2.png) [@curcuz](https://forums.balena.io/u/curcuz)\
**Post date:** [April 5, 2021, 7:05pm UTC](https://forums.balena.io/t/firmware-update/282951/14 "2021-04-05T19:05:20Z")

</div>

That value does not seem to be a valid balenaFin serial - are you sure you are scanning the squared black ink on white background QRcode sticker situated on the top of the PCB?

---

<div class="post-metadata">

**Author:** ![ricardoosorio](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ricardoosorio/32/5675_2.png) [@ricardoosorio](https://forums.balena.io/u/ricardoosorio)\
**Post date:** [April 5, 2021, 7:10pm UTC](https://forums.balena.io/t/firmware-update/282951/17 "2021-04-05T19:10:44Z")

</div>

![MicrosoftTeams-image (28)](https://global.discourse-cdn.com/balena/original/2X/4/4e7c518b28d4508038f58d31b0b682394fb76372.jpeg)

---

<div class="post-metadata">

**Author:** ![ricardoosorio](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ricardoosorio/32/5675_2.png) [@ricardoosorio](https://forums.balena.io/u/ricardoosorio)\
**Post date:** [April 5, 2021, 7:13pm UTC](https://forums.balena.io/t/firmware-update/282951/18 "2021-04-05T19:13:39Z")

</div>

Sorry Curcuz. I rescanned again 4 times and the average gave 1110022240202019-1803  
And this one worked! So this step is done. What next?

---

<div class="post-metadata">

**Author:** ![curcuz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/curcuz/32/137_2.png) [@curcuz](https://forums.balena.io/u/curcuz)\
**Post date:** [April 5, 2021, 7:14pm UTC](https://forums.balena.io/t/firmware-update/282951/19 "2021-04-05T19:14:00Z")

</div>

That is indeed the correct sticker, but its value (just scanned your picture) is `1110022240202019-1803`

---

<div class="post-metadata">

**Author:** ![ricardoosorio](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ricardoosorio/32/5675_2.png) [@ricardoosorio](https://forums.balena.io/u/ricardoosorio)\
**Post date:** [April 5, 2021, 7:14pm UTC](https://forums.balena.io/t/firmware-update/282951/20 "2021-04-05T19:14:44Z")

</div>

> [@curcuz](#):
>
> /usr/bin/fin revision

/usr/bin/fin revision  
11

---

<div class="post-metadata">

**Author:** ![curcuz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/curcuz/32/137_2.png) [@curcuz](https://forums.balena.io/u/curcuz)\
**Post date:** [April 5, 2021, 7:14pm UTC](https://forums.balena.io/t/firmware-update/282951/21 "2021-04-05T19:14:52Z")

</div>

Ok, now to run [GitHub - balenablocks/finabler: A block for balenaFin devices, handling coprocessor firmware flashing and operations, and exposing helpful balenaCloud tags](https://github.com/balenablocks/finabler) again and see if it detects the hw revision correctly @ricardoosorio

---

<div class="post-metadata">

**Author:** ![ricardoosorio](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ricardoosorio/32/5675_2.png) [@ricardoosorio](https://forums.balena.io/u/ricardoosorio)\
**Post date:** [April 5, 2021, 7:19pm UTC](https://forums.balena.io/t/firmware-update/282951/23 "2021-04-05T19:19:26Z")

</div>

> [@curcuz](#):
>
> /usr/bin/fin eeprom --set

Almost there. It did try to update the firmware. All went few more steps until before reboot:  
05.04.21 20:16:17 (+0100) flash stdout: releasing lockfile…  
05.04.21 20:16:17 (+0100)  
05.04.21 20:16:17 (+0100) flash stdout: closing the openocd process…  
05.04.21 20:16:17 (+0100)  
05.04.21 20:16:17 (+0100) rebooting via supervisor…  
05.04.21 20:16:17 (+0100) setting fin-status tag to flashing…  
05.04.21 20:16:17 (+0100) supervisor idle.  
05.04.21 20:16:27 (+0100) failed to return firmware version, likely failed flashing.

And after reboot…the error:

05.04.21 20:17:41 (+0100) balenaFin revision 11  
05.04.21 20:17:41 (+0100) server listening on port 1337  
05.04.21 20:17:41 (+0100) setting fin-version tag to v1.1.1…  
05.04.21 20:17:41 (+0100) 2021-04-05T19:17:41.451Z - info: [request-promise-retry] Encountered error Error: connect ECONNREFUSED 127.0.0.1:48484 for GET request to [http://127.0.0.1:48484/v1/device?apikey=13338d31f99396bda56ed7c2417a2bfc](http://127.0.0.1:48484/v1/device?apikey=13338d31f99396bda56ed7c2417a2bfc), retry count 2  
05.04.21 20:17:43 (+0100) 2021-04-05T19:17:43.480Z - info: [request-promise-retry] Encountered error Error: connect ECONNREFUSED 127.0.0.1:48484 for GET request to [http://127.0.0.1:48484/v1/device?apikey=13338d31f99396bda56ed7c2417a2bfc](http://127.0.0.1:48484/v1/device?apikey=13338d31f99396bda56ed7c2417a2bfc), retry count 1  
05.04.21 20:17:43 (+0100) ReferenceError: error is not defined  
05.04.21 20:17:43 (+0100) at /usr/src/app/utils/supervisor.js:48:61  
05.04.21 20:17:43 (+0100) at tryCatcher (/usr/src/app/node\_modules/bluebird/js/release/util.js:16:23)  
05.04.21 20:17:43 (+0100) at /usr/src/app/node\_modules/bluebird/js/release/catch\_filter.js:17:41  
05.04.21 20:17:43 (+0100) at tryCatcher (/usr/src/app/node\_modules/bluebird/js/release/util.js:16:23)  
05.04.21 20:17:43 (+0100) at Promise.\_settlePromiseFromHandler (/usr/src/app/node\_modules/bluebird/js/release/promise.js:547:31)  
05.04.21 20:17:43 (+0100) at Promise.\_settlePromise (/usr/src/app/node\_modules/bluebird/js/release/promise.js:604:18)  
05.04.21 20:17:43 (+0100) at Promise.\_settlePromise0 (/usr/src/app/node\_modules/bluebird/js/release/promise.js:649:10)  
05.04.21 20:17:43 (+0100) at Promise.\_settlePromises (/usr/src/app/node\_modules/bluebird/js/release/promise.js:725:18)  
05.04.21 20:17:43 (+0100) at \_drainQueueStep (/usr/src/app/node\_modules/bluebird/js/release/async.js:93:12)  
05.04.21 20:17:43 (+0100) at \_drainQueue (/usr/src/app/node\_modules/bluebird/js/release/async.js:86:9)  
05.04.21 20:17:43 (+0100) at Async.\_drainQueues (/usr/src/app/node\_modules/bluebird/js/release/async.js:102:5)  
05.04.21 20:17:43 (+0100) at Immediate.Async.drainQueues [as \_onImmediate] (/usr/src/app/node\_modules/bluebird/js/release/async.js:15:14)  
05.04.21 20:17:43 (+0100) at processImmediate (internal/timers.js:461:21)

---

<div class="post-metadata">

**Author:** ![ricardoosorio](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ricardoosorio/32/5675_2.png) [@ricardoosorio](https://forums.balena.io/u/ricardoosorio)\
**Post date:** [April 5, 2021, 7:23pm UTC](https://forums.balena.io/t/firmware-update/282951/24 "2021-04-05T19:23:23Z")

</div>

Anycase: I try what I was looking for ( curl -X POST localhost:1337/sleep/10/60 ) and it did what was expected for the first time in 5 days! 🙂 . At least I’m happy with the power-off thing. I still do recommend a video/documentation about the firmware and how customers can check the version. I saw the code in firmware.js was checking the balena firmware version…but wouldn’t guess how to set the firmware! Thanks!

---

<div class="post-metadata">

**Author:** ![ricardoosorio](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ricardoosorio/32/5675_2.png) [@ricardoosorio](https://forums.balena.io/u/ricardoosorio)\
**Post date:** [April 5, 2021, 10:15pm UTC](https://forums.balena.io/t/firmware-update/282951/25 "2021-04-05T22:15:47Z")

</div>

Last update: I’ve went back to [GitHub - balena-io-hardware/balena-fin-firmata-flash: BalenaFin application to flash the on-board co-processor with the latest version of balenaFin Firmata](https://github.com/balena-io-hardware/balena-fin-firmata-flash) and it worked flowsly. Guess is a problem with finabler (seems that firmware there is older).

Still having issues how to turn it on after sleep using a power button switch. Can you help me with that? Is there any other thread where this is described? I can only trigger it on if using a push button between PC9 and 5V from gpio. But it also resets if push while powered-on.

Many thanks

---

<div class="post-metadata">

**Author:** ![ricardoosorio](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ricardoosorio/32/5675_2.png) [@ricardoosorio](https://forums.balena.io/u/ricardoosorio)\
**Post date:** [April 7, 2021, 3:43pm UTC](https://forums.balena.io/t/firmware-update/282951/27 "2021-04-07T15:43:17Z")

</div>

Sorry @curcuz , but the issue is still there. I format the eMMC with the production image…add the firmware flash from above…and again the error shows:

07.04.21 16:41:36 (+0100) Started service ‘co-processor sha256:b1e34aff0d54591ac2a904efc0a975f0fa9355eceb8261fc39d329b67866a7fd’  
07.04.21 16:41:39 (+0100) balenaFin revision 11  
07.04.21 16:41:39 (+0100) server listening on port 1337  
07.04.21 16:41:39 (+0100) (node:16) UnhandledPromiseRejectionWarning: Error: Error: No such file or directory, cannot open /dev/ttyS0  
07.04.21 16:41:39 (+0100) (node:16) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see [Command-line options | Node.js v15.14.0 Documentation](https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode)). (rejection id: 1)  
07.04.21 16:41:39 (+0100) (node:16) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

UPDATE: By some reason, the ttyS0 is not there…neither ttyUSB0

---

<div class="post-metadata">

**Author:** ![pranasziaukas](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/pranasziaukas/32/3917_2.png) [@pranasziaukas](https://forums.balena.io/u/pranasziaukas)\
**Post date:** [April 8, 2021, 2:53pm UTC](https://forums.balena.io/t/firmware-update/282951/32 "2021-04-08T14:53:13Z")

</div>

Hey. We have identified an incident in the manufacturing process related to this issue. It is going to be discussed internally (likely today), and further instructions will be provided. Stay tuned!

---

<div class="post-metadata">

**Author:** ![ntzovanis](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ntzovanis/32/1150_2.png) [@ntzovanis](https://forums.balena.io/u/ntzovanis)\
**Post date:** [April 8, 2021, 10:10pm UTC](https://forums.balena.io/t/firmware-update/282951/35 "2021-04-08T22:10:29Z")

</div>

Hello @ricardoosorio ,

To elaborate a bit on my colleague’s message, all balenaFins v1.1.x get the serial number (the one on the QR code) programmed on the EEPROM after manufacturing. This is how we identify them during the coprocessor flashing process. We’ve identified a problem in the programming process that caused a batch of balenaFins not to have the EEPROM correctly programmed.  
We’ve now fixed this and are working on a process to allow users to read the QR code and flash the EEPROM. This is what my colleague Carlo requested you to test.

In your last message, you mentioned that the device is failing to program the coprocessor again after an eMMC reflash. Is this the same device where you programmed the EEPROM? If so, we might have a different issue, as the EEPROM should not be affected at all by flashing/formating the eMMC.

Let me know so we can help you out.  
Cheers,  
Nico.

[Next page](https://forums.balena.io/t/firmware-update/282951.md?page=2)
