UpdaterShell : bk w fails with large/long key
See original GitHub issueThanks for the new ‘bk’ commands. Testing with an AS100, it works with single byte values
>bk r 0x013e0003
01
>bk w 0x013e0003 0
Success
>bk r 0x013e0003
00
But fails when I try a multi-byte value
>bk w 0x013e0002 01000001054449524543542d444f4c303a524d2d4c565231000000000000000000000000000012767a602a1549522f4119572313180326434e052510195a2f46445b29134001211f1f00741e1c5177424e50264c4e06231f420e2e4146522a421a5c261d18050001
Error: byte must be in range(0, 256)
>bk w 0x013e0002 01 00 00 01 05 44 49 52 45 43 54 2d 44 4f 4c 30 3a 52 4d 2d 4c 56 52 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 76 7a 60 2a 15 49 52 2f 41 19 57 23 13 18 03 26 43 4e 05 25 10 19 5a 2f 46 44 5b 29 13 40 01 21 1f 1f 00 74 1e 1c 51 77 42 4e 50 26 4c 4e 06 23 1f 42 0e 2e 41 46 52 2a 42 1a 5c 26 1d 18 05 00 01
Error: Unknown error
Reading that particular key works, but I note that the key is a lot longer than the number of bytes I’m trying to write. Do I need to fill all the bytes? UpdaterShell should perhaps zero-fill the rest, as ‘bk.elf’ does.
From ‘fwtool.py -printbackup’
id=0x013e0002, size=0x05dc, attr=0x44:
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seems that a work around is:
And then the ‘bk w’ command succeeds
Oh Crap!.
Input() is returning a string of 4095 characters (plus the ‘\x00’ I guess), and silently truncating the block of data. https://stackoverflow.com/questions/30315957/string-from-input-is-limited
(I’m running on Xubuntu/Linux)