How to get hardware information

Introduction

Use the Hardware call to retrieve hardware information of the IXrouter, for example the serial number or MAC addresses of the LAN or WAN interface.

Usage

Retrieving hardware information requires authentication, so make sure you obtain a valid session ID first, see How to authenticate to the API.

Use the get method of ixon.ui.hardware to retrieve the hardware information.

curl --request POST \
     --url "192.168.140.1/ubus" \
     --data '
     {
         "jsonrpc": "2.0",
         "id": 1,
         "method": "call",
         "params": [
             "0a3e1036df206a33fcd6573a524c1ef2",
             "ixon.ui.hardware",
             "get",
             {}
         ]
     }'
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
        0,
        {
            "devices": [
                {
                    "available": false,
                    "code": "-",
                    "model": "1.1roothub",
                    "vendor": "LinuxFoundation",
                    "usb": {
                        "vid": "1d6b",
                        "pid": "0001"
                    }
                },
                {
                    "available": true,
                    "code": "-",
                    "model": "2.0roothub",
                    "vendor": "LinuxFoundation",
                    "usb": {
                        "vid": "1d6b",
                        "pid": "0002"
                    }
                },
                {
                    "available": true,
                    "code": "-",
                    "model": "3.0roothub",
                    "vendor": "LinuxFoundation",
                    "usb": {
                        "vid": "1d6b",
                        "pid": "0003"
                    }
                },
                {
                    "available": false,
                    "code": "-",
                    "model": "USB2.0Hub",
                    "vendor": "StandardMicrosystemsCorp",
                    "usb": {
                        "vid": "0424",
                        "pid": "2512"
                    }
                },
                {
                    "available": true,
                    "code": "WU1",
                    "model": "Lili-W131",
                    "vendor": "Ublox",
                    "usb": {
                        "vid": "1286",
                        "pid": "204a"
                    }
                },
                {
                    "available": false,
                    "code": "3Q1",
                    "model": "UC20",
                    "vendor": "Quectel",
                    "usb": {
                        "vid": "05c6",
                        "pid": "9003"
                    }
                },
                {
                    "available": false,
                    "code": "4Q1",
                    "model": "EC20",
                    "vendor": "Quectel",
                    "usb": {
                        "vid": "05c6",
                        "pid": "9215"
                    }
                },
                {
                    "available": false,
                    "code": "4Q2",
                    "model": "EC21",
                    "vendor": "Quectel",
                    "usb": {
                        "vid": "2c7c",
                        "pid": "0121"
                    }
                },
                {
                    "available": true,
                    "code": "4Q3",
                    "model": "EC25",
                    "vendor": "Quectel",
                    "usb": {
                        "vid": "2c7c",
                        "pid": "0125"
                    }
                },
                {
                    "available": false,
                    "code": "WU2",
                    "model": "8274B-PR",
                    "vendor": "Fn-Link",
                    "usb": {
                        "vid": "168c",
                        "pid": "003e"
                    }
                }
            ],
            "capabilities": {
                "connectivity": {
                    "wifi": true,
                    "cellular": true,
                    "ethernet": true
                }
            },
            "firmware": {
                "version": "3.22"
            },
            "board": {
                "serial": "12345678",
                "revision": "3.0",
                "name": "IXrouter",
                "mac_address": {
                    "wan": "C0:D3:91:3A:BC:DE",
                    "lan": "C0:D3:91:3A:BC:DF"
                }
            }
        }
    ]
}