After Update to 1.8, my EEPROM SN is wiped and OS assumes it to be a KiwiSDRv2 [fixed with override]

Hey everyone!

So, this is on the odder side of the spectrum of issues, given what I've seen after searching around on the forum... and believe me, I've been searching high and low!

TL;DR; I have a KiwiSDR (v.1) that's paired with a BBG, purchased back in the Sept. 2018 Massdrop era, so it's definitely a v1 unit, (w/ SN #3561). When I updated it to OS 1.80 (on Debian 11.11) I noticed from the Console Log that it fails to recognize it as a v.1 unit, assumes it's a v.2 and proceeds from there. What I'm worried about is the v.1 H/W being misidentified as a v.2 and certain (settings/parameter) assumptions that might go along with that assumption. I've tried repeatedly using the /mfg portal to flash the (kiwi) EEPROM with the original SN and board version, but it's failing.

I'll attach logs for everything in a sec, but what I'm looking for is guidance on whether this is gonna be an issue (misidentified HW). I already know the SN isn't really needed, but the identification of the HW probably is important, so I wonder (if I can't reset the SN and board version in the EEPROM) if I can FORCE the OS to treat it like a v.1 HW board? I haven't seen any settings in config files, etc... (yet)

Full boot log (SANITIZED of MAC/IP/GPS info) will be attached. Not trying to be rude in sanitizing stuff, just like my privacy ;-)

pertinent bit in the boot log where it's failing to read the EEPROM properly:

Sun Dec 15 17:38:26 00:00:00.926  L KiwiSDR v1.800 --------------------------------------------------------------------

Sun Dec 15 17:38:26 00:00:00.944  L compiled: Nov 28 2024 20:07:59 on kiwisdr

Sun Dec 15 17:38:26 00:00:00.945  L /etc/debian_version 11.11

Sun Dec 15 17:38:26 00:00:00.945  L Mongoose 5.6

Sun Dec 15 17:38:26 00:00:00.950   TASK MAX_TASKS 217(198|17|2), stack memory 17.6 MB, stack size 8|32|64 k so(u64_t)

Sun Dec 15 17:38:26 00:00:01.445  L reading configuration from file /root/kiwi.config/kiwi.json: 655 tokens (8.5k bytes)

Sun Dec 15 17:38:26 00:00:01.449  L reading configuration from file /root/kiwi.config/admin.json: 141 tokens (3.7k bytes)

Sun Dec 15 17:38:26 00:00:01.466  L EEPROM check: open /sys/bus/i2c/devices/2-0054/eeprom No such file or directory

Sun Dec 15 17:38:26 00:00:01.467  L can't read serial number from EEPROM and no configuration override

Sun Dec 15 17:38:26 00:00:01.467  L can't read Kiwi model from EEPROM and no configuration override

Sun Dec 15 17:38:26 00:00:01.467  L assuming model: KiwiSDR 2

Sun Dec 15 17:38:26 00:00:01.467  L reading configuration from file /root/kiwi.config/dx_config.json

Sun Dec 15 17:38:26 00:00:01.481  L reading configuration from file /root/kiwi.config/dx.json



I assume from the log that there IS a possibility of a configuration override (otherwise why log it like that?) but I don't know which .config files to adjust, nor what to put in it. If anyone can share that info, I'd be much obliged!!

Ideally I'd love to re-Write the EEPROM with the correct info, but if it's squawking that it can't find /sys/bus/i2c/devices/2-0054/eeprom (and I checked & confirmed the same when SSH'd in w/ root permissions), then it might be a bad EEPROM (chip) and there's nothing to be done.


The log when attempting to use the /mfg portal is as follows:

MFG interface

EEPROM check: open /sys/bus/i2c/devices/2-0054/eeprom No such file or directory

EEPROM next: new seq serno = 3561

EEPROM check: open /sys/bus/i2c/devices/2-0054/eeprom No such file or directory

EEPROM next: new seq serno = 3561

EEPROM write: EE_SERNO_ALLOC serno=3561

EEPROM write: open /sys/bus/i2c/devices/2-0054/eeprom No such file or directory

EEPROM check: open /sys/bus/i2c/devices/2-0054/eeprom No such file or directory


which again tells me that the "normal" ways of writing to the EEPROM aren't working, so I wanted to check here first before attempting some "deeper" eeprom-fu. I'm no stranger to board development stuff, but it's always nice to check with project originators first before making anything worse...


If I need to share a picture of the (kiwi) HW board itself, with the SN, I can do so. I may have to reduce the JPG size though 'cause the forum attachment system keeps failing (400 error) on attaching a 2.3MB JPG file :-|


Thanks in advance for any help anyone might offer!

Cheers!

Comments

  • jksjks
    edited December 2024

    This should have nothing to do with v1.800. Failed EEPROMs do happen from time to time.

    Try completely power cycling your Kiwi and see if the Linux device for the EEPROM becomes readable. If not, then you can manually set a serial number & Kiwi model override in the configuration file.

    But this is a bit tricky. I can talk you through this if a power cycle doesn't clear the issue. You need ssh access to do this.

  • understood on v1.8 not being the root cause and apologies to anyone if my posting in this category implied that. I just noticed it (failed EEPROM) after making the "big" update, and scrutinizing the logs to confirm success on the update... that's when I noticed the misidentification so it's more like a correlation than a causation thing. Lord knows I've seen more than a few EEPROMS die to glitchy PSU's, but this PSU has been rock-solid all of this kiwisdr's life.


    Power cycling (a few times) hasn't seemed to rediscover the EEPROM device (it's just not mapping into /sys/bus/i2c/devices/... correctly


    Some ls -a output for those /sys/bus/i2c/devices (in case you're curious what IS being found & mapped):

    root@kiwisdr:/home/debian# ls -al /sys/bus/i2c/devices/2-0054

    lrwxrwxrwx 1 root root 0 Dec 15 17:38 /sys/bus/i2c/devices/2-0054 -> ../../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/4819c000.target-module/4819c000.i2c/i2c-2/2-0054

    root@kiwisdr:/home/debian# ls -al /sys/bus/i2c/devices/    

    total 0

    drwxr-xr-x 2 root root 0 Dec 15 17:38 .

    drwxr-xr-x 4 root root 0 Dec 15 17:38 ..

    lrwxrwxrwx 1 root root 0 Dec 15 17:38 0-0024 -> ../../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e0b000.target-module/44e0b000.i2c/i2c-0/0-0024

    lrwxrwxrwx 1 root root 0 Dec 15 17:38 0-0050 -> ../../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e0b000.target-module/44e0b000.i2c/i2c-0/0-0050

    lrwxrwxrwx 1 root root 0 Dec 15 17:38 2-0054 -> ../../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/4819c000.target-module/4819c000.i2c/i2c-2/2-0054

    lrwxrwxrwx 1 root root 0 Dec 15 17:38 2-0055 -> ../../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/4819c000.target-module/4819c000.i2c/i2c-2/2-0055

    lrwxrwxrwx 1 root root 0 Dec 15 17:38 2-0056 -> ../../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/4819c000.target-module/4819c000.i2c/i2c-2/2-0056

    lrwxrwxrwx 1 root root 0 Dec 15 17:38 2-0057 -> ../../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/4819c000.target-module/4819c000.i2c/i2c-2/2-0057

    lrwxrwxrwx 1 root root 0 Dec 15 17:38 i2c-0 -> ../../../devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e0b000.target-module/44e0b000.i2c/i2c-0

    lrwxrwxrwx 1 root root 0 Dec 15 17:38 i2c-1 -> ../../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@0/4802a000.target-module/4802a000.i2c/i2c-1

    lrwxrwxrwx 1 root root 0 Dec 15 17:38 i2c-2 -> ../../../devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@100000/4819c000.target-module/4819c000.i2c/i2c-2



    I've can SSH into the box easily enough, and root access beyond that, so if you walk me through some of the config-fu stuff, hopefully it forces the correct ID on things. I know my way around Linux, Bash, and the CLI, so no need to dive into explaining how to edit files, etc...

    Cheers!

  • jksjks
    edited December 2024

    Okay. Try this from a root shell:

    cdp

    msd (stops Kiwi server)

    cdk (goes to /root/kiwi.config)

    nano kiwi.json

    Add on the second line: "serial_number": 3561,

    nano admin.json

    Add on the second line: "kiwi_model": 1,

    cdp

    ku (starts Kiwi server)


  • done. worked beautifully!!

    log snippet:

    Sun Dec 15 22:46:22 00:00:00.921   L EEPROM check: open /sys/bus/i2c/devices/2-0054/eeprom No such file or directory
    Sun Dec 15 22:46:22 00:00:00.924   L serial number override from configuration: 3561
    Sun Dec 15 22:46:22 00:00:00.924   L Kiwi model override from configuration: KiwiSDR 1
    

    so I guess my EEPROM is done, not that it matters a whole lot if the config json files let me override what was stashed in there. In hindsight I guess I could have dropped into the source to find where you look for "serial_number" and "kiwi_model" in the json, but appreciate your quick response!!

    I'll add those .json config changes to a personal repo I keep for personalized tweaks... I know I'll forget the settings otherwise by the time I need to apply a new stock image. ;-)

    ...also love all the aliases you created for root's .bashrc to make those {cdp, msd, cdk, ku, etc...} steps as painless as possible!! Gotta remember that for my next embedded proj. Bake 'em into the image and support over forums is suuuuuuper simplified!!

    Much appreciated, and awesome project BTW if I haven't said it elsewhere!!

    Cheers!

  • Hi

    I just noticed that my Kiwi 1.800 also shows up as model 2 and its serial number has been deleted exactly like in this thread. A week ago we had a transformer trip here, they turned the power on and off several times but the intervals were long and the UPS couldn't handle it. When they finally fixed it, one receiver wouldn't start up even though two other Kiwis were working under that power supply, so I restored it from a backup. It's been online for almost 8 days and everything works normally, only that deleted epprom looks strange. Should I worry about it and fix it because I'll lose the ability to update or leave it as it is? I checked and I can't access any of them via ssh like on the old Debian.

    best regards Artur

  • Updates won't be affected by not having any serial number or a correct model number.

    I just looked at another Kiwi-1 that had the same issue of the Kiwi code not being able to open the Debian/Linux EEPROM device. But after a Kiwi restart it worked. Also worked after a full Beagle reboot.

    So try restarting/rebooting. And try the command m dump_eeprom in the admin console.


    I checked and I can't access any of them via ssh like on the old Debian.

    What does that mean exactly? By old Debian do you mean Debian 8? Is this simply the "no more root logins" issue with Debian 9+ (unless you take steps to allow root logins). Or are you ssh'ing using the "debian" account?

  • edited December 2024

    Yes, I mean that I currently don't have root access because Debian 11 has limitations

    after entering the commend I get this

    root@kiwisdr:~/KiwiSDR# m dump_eeprom
    KiwiSDR cape EEPROM:
    hexdump -C /sys/bus/i2c/devices/2-0054/eeprom
    hexdump: /sys/bus/i2c/devices/2-0054/eeprom: No such file or directory
    hexdump: all input file arguments failed
    make: [Makefile:1796: dump_eeprom] Error 1 (ignored)
    root@kiwisdr:~/KiwiSDR#  
    


  • After several failed attempts as described and today's planned restart, the serial number returned spontaneously in the NETWORK tab, the model field remained empty but in the STATUS tab there was still Kiwisdr 2, I went to Console and cdk again and then nano kiwi.json above the line "serial_number": mynumber, I added the line "kiwi_model": 1, I saved the file, exited it and started Beagle again. The model in Status is displayed correctly, in the Network tab it also returned to its place. The m dump_eeprom command also works

    root@kiwisdr:~/KiwiSDR# m dump_eeprom KiwiSDR cape EEPROM: root@kiwisdr:~/KiwiSDR# m dump_eeprom KiwiSDR cape EEPROM: hexdump -C /sys/bus/i2c/devices/2-0054/eeprom

    00000000  aa 55 33 ee 41 31 4b 69  77 69 53 44 52 20 20 20  |.U3.A1KiwiSDR   |
    00000010  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
    00000020  20 20 20 20 20 20 76 31  2e 31 53 65 65 65 64 2e  |      v1.1Seeed.|
    00000030  63 63 20 20 20 20 20 20  20 20 4b 49 57 49 53 44  |cc        KIWISD|
    00000040  52 31 30 20 20 20 20 20  20 20 31 35 32 30 30 30  |R10       152000|
    00000050  30 31 34 37 31 38 00 34  00 00 00 00 00 00 00 00  |01hide.4........|
    00000060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 e0 2f  |.............../|
    00000070  e0 2f 00 00 e0 2f e0 2f  e0 2f e0 2f e0 2f 00 00  |./.../././././..|
    00000080  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    00000090  e0 2f e0 2f e0 2f e0 2f  e0 2f e0 2f e0 37 c0 27  |././././././.7.'|
    000000a0  c0 17 e0 2f 00 00 00 00  e0 2f e0 2f e0 2f e0 2f  |.../....././././|
    000000b0  e0 2f 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |./..............|
    000000c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    000000e0  00 00 00 00 00 00 00 00  00 00 00 00 00 fa 00 00  |................|
    000000f0  00 00 05 dc 00 ff ff ff  ff ff ff ff ff ff ff ff  |................|
    00000100  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
    *
    00008000
    


Sign In or Register to comment.