We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Any way to detect an Omega2+ when running with Omega2 FW?



  • I have a mixed fleet of Omega2S+ (more flash+RAM) and regular Omega2S devices out in the field.

    All of these were were flashed with the regular Omega2 firmware, so on the software level all identify as Omega2, as the information about RAM and flash sizes come from the device tree included in the firmware.

    Now I am looking for a low-level way to somehow probe the hardware to reliably detect if it is a Omega2 or an Omega2+. Maybe some RAM R/W test with devmem to detect mirrored upper 64M vs real RAM?

    Any ideas welcome!



  • @luz try ubus call system board

        "system": "MediaTek MT7688 ver:1 eco:2",
        "model": "Onion Omega2+",
        "board_name": "omega2p",
    

    I use /proc/cpuinfo to identify Omega2S vs Omega2S+ in my software.



  • @crispyoz ubus just pulls the info from the firmware, which was built for the Omega2 and so reports Omega2 despite running on the 2+...



  • @luz Yes of course. Maybe dmidecode can help.

    I track my device configurations using my serial number generator.



  • @crispyoz Having Omega2s in some and Omega2s+ in other devices is something that happened in production out of a supply problem, but the FW flashed and used in the testing and serial number provisioning process was the same (Omega2s) FW for all devices, so there‘s no way to tell from the serial number if its a 2s+ or not.

    This was an acceptable workaround back then, and all devices (hundreds) run fine.

    But now I‘d like to make use of the extra RAM in those units that have a 2s+, so I need a detection method that only relies on the actual hardware differences in my firmware updater, so it can request a 2s+ FW once it detects a 2s+...


  • administrators

    @luz It should be possible to use the bootloader command-line to read the version + device info of the SPI flash chip.



  • @luz
    How to detect... "locally"?

    It is fairly easy since there is an Onion Omega2+ / Onion Omega2 sticker on the device 😉

    If you don't believe the sticker a reboot command and the bootloader messages on the Serial Console can help.
    For example - please watch the 'find flash: ' line:

    # HW Omega2+
    # FW v0.3.2 b240
    # http://repo.onioniot.com.s3.amazonaws.com/omega2/images/omega2-v0.3.2-b240.bin
    # U-Boot 1.1.3 (Oct 18 2016 - 17:29:05)
    
    root@Omega-5BE1:/# reboot
    
       ____       _             ____
      / __ \___  (_)__  ___    / __ \__ _  ___ ___ ____ _
     / /_/ / _ \/ / _ \/ _ \  / /_/ /  ' \/ -_) _ `/ _ `/
     \____/_//_/_/\___/_//_/  \____/_/_/_/\__/\_, /\_,_/
     W H A T  W I L L  Y O U  I N V E N T ? /___/"
    
    Board: Onion Omega2 APSoC DRAM:  128 MB
    relocate_code Pointer at: 87f60000
    ******************************
    Software System Reset Occurred
    ******************************
    flash manufacture id: c2, device id 20 19
    find flash: MX25L25635E
    ============================================ 
    Onion Omega2 UBoot Version: 4.3.0.3
     ---
    
    root@Omega-5BE1:/# ubus call system board
    {
    	"kernel": "4.14.81",
    	"hostname": "Omega-5BE1",
    	"system": "MediaTek MT7688 ver:1 eco:2",
    	"model": "Onion Omega2",
    	"board_name": "omega2",
    	"release": {
    		"distribution": "OpenWrt",
    		"version": "18.06-SNAPSHOT",
    		"revision": "r0+7471-90181760c3",
    		"target": "ramips\/mt76x8",
    		"description": "OpenWrt 18.06-SNAPSHOT r0+7471-90181760c3"
    	}
    }
    
    # HW Omega2+
    # FW v0.3.2 b240
    # http://repo.onioniot.com.s3.amazonaws.com/omega2/images/omega2p-v0.3.2-b240.bin
    # U-Boot 1.1.3 (Oct 18 2016 - 17:29:05)
    
    root@Omega-5BE1:/# reboot
    
       ____       _             ____
      / __ \___  (_)__  ___    / __ \__ _  ___ ___ ____ _
     / /_/ / _ \/ / _ \/ _ \  / /_/ /  ' \/ -_) _ `/ _ `/
     \____/_//_/_/\___/_//_/  \____/_/_/_/\__/\_, /\_,_/
     W H A T  W I L L  Y O U  I N V E N T ? /___/"
    
    Board: Onion Omega2 APSoC DRAM:  128 MB
    relocate_code Pointer at: 87f60000
    ******************************
    Software System Reset Occurred
    ******************************
    flash manufacture id: c2, device id 20 19
    find flash: MX25L25635E
    ============================================ 
    Onion Omega2 UBoot Version: 4.3.0.3
     ---
    
    root@Omega-5BE1:/# ubus call system board
    {
    	"kernel": "4.14.81",
    	"hostname": "Omega-5BE1",
    	"system": "MediaTek MT7688 ver:1 eco:2",
    	"model": "Onion Omega2+",
    	"board_name": "omega2p",
    	"release": {
    		"distribution": "OpenWrt",
    		"version": "18.06-SNAPSHOT",
    		"revision": "r0+7471-90181760c3",
    		"target": "ramips\/mt76x8",
    		"description": "OpenWrt 18.06-SNAPSHOT r0+7471-90181760c3"
    	}
    }
    
    #  HW Omega2
    # FW v0.3.2 b240
    # http://repo.onioniot.com.s3.amazonaws.com/omega2/images/omega2-v0.3.2-b240.bin
    # U-Boot 1.1.3 (Oct 18 2016 - 17:30:55)
    
    root@Omega-5533:/# reboot
    
       ____       _             ____
      / __ \___  (_)__  ___    / __ \__ _  ___ ___ ____ _
     / /_/ / _ \/ / _ \/ _ \  / /_/ /  ' \/ -_) _ `/ _ `/
     \____/_//_/_/\___/_//_/  \____/_/_/_/\__/\_, /\_,_/
     W H A T  W I L L  Y O U  I N V E N T ? /___/"
    
    Board: Onion Omega2 APSoC DRAM:  64 MB
    relocate_code Pointer at: 83f60000
    flash manufacture id: ef, device id 40 18
    find flash: W25Q128BV
    ============================================ 
    Onion Omega2 UBoot Version: 4.3.0.3
     ---
    
    root@Omega-5533:/# ubus call system board
    {
    	"kernel": "4.14.81",
    	"hostname": "Omega-5533",
    	"system": "MediaTek MT7688 ver:1 eco:2",
    	"model": "Onion Omega2",
    	"board_name": "omega2",
    	"release": {
    		"distribution": "OpenWrt",
    		"version": "18.06-SNAPSHOT",
    		"revision": "r0+7471-90181760c3",
    		"target": "ramips\/mt76x8",
    		"description": "OpenWrt 18.06-SNAPSHOT r0+7471-90181760c3"
    	}
    }
    

    How to detect... "remotely"?
    That is the question.



Looks like your connection to Community was lost, please wait while we try to reconnect.