@@ -26,6 +26,8 @@ OS management group defines following commands:
2626 +-------------------+-----------------------------------------------+
2727 | ``6 `` | MCUMGR parameters |
2828 +-------------------+-----------------------------------------------+
29+ | ``7 `` | OS/Application info |
30+ +-------------------+-----------------------------------------------+
2931
3032Echo command
3133************
@@ -542,3 +544,95 @@ where:
542544 | "rc" | :ref: `mcumgr_smp_protocol_status_codes `; |
543545 | | may not appear if 0 |
544546 +-----------------------+---------------------------------------------------+
547+
548+ .. _mcumgr_os_application_info :
549+
550+ OS/Application Info
551+ *******************
552+
553+ Used to obtain information on running image, similar functionality to the linux
554+ uname command, allowing details such as kernel name, kernel version, build
555+ date/time, processor type and application-defined details to be returned. This
556+ functionality can be enabled with :kconfig:option: `CONFIG_MCUMGR_GRP_OS_INFO `.
557+
558+ OS/Application Info Request
559+ ===========================
560+
561+ OS/Application info request header fields:
562+
563+ .. table ::
564+ :align: center
565+
566+ +--------+--------------+----------------+
567+ | ``OP `` | ``Group ID `` | ``Command ID `` |
568+ +========+==============+================+
569+ | ``0 `` | ``0 `` | ``7 `` |
570+ +--------+--------------+----------------+
571+
572+ CBOR data of request:
573+
574+ .. code-block :: none
575+
576+ {
577+ (str,opt)"format" : (str)
578+ }
579+
580+ where:
581+
582+ .. table ::
583+ :align: center
584+
585+ +----------+-------------------------------------------------------------------+
586+ | "format" | Format specifier of returned response, fields are appended in |
587+ | | their natural ascending index order, not the order of |
588+ | | characters that are received by the command. Format |
589+ | | specifiers: |br | |
590+ | | * ``s `` Kernel name |br | |
591+ | | * ``n `` Node name |br | |
592+ | | * ``r `` Kernel release |br | |
593+ | | * ``v `` Kernel version |br | |
594+ | | * ``b `` Build date and time (requires |
595+ | | :kconfig:option: `CONFIG_MCUMGR_GRP_OS_INFO_BUILD_DATE_TIME `) |br | |
596+ | | * ``m `` Machine |br | |
597+ | | * ``p `` Processor |br | |
598+ | | * ``i `` Hardware platform |br | |
599+ | | * ``o `` Operating system |br | |
600+ | | * ``a `` All fields (shorthand for all above options) |br | |
601+ | | If this option is not provided, the ``s `` Kernel name option |
602+ | | will be used. |
603+ +----------+-------------------------------------------------------------------+
604+
605+ OS/Application Info Response
606+ ============================
607+
608+ OS/Application info response header fields
609+
610+ .. table ::
611+ :align: center
612+
613+ +--------+--------------+----------------+
614+ | ``OP `` | ``Group ID `` | ``Command ID `` |
615+ +========+==============+================+
616+ | ``2 `` | ``0 `` | ``7 `` |
617+ +--------+--------------+----------------+
618+
619+ CBOR data of response:
620+
621+ .. code-block :: none
622+
623+ {
624+ (str)"output" : (str)
625+ (opt,str)"rc" : (int)
626+ }
627+
628+ where:
629+
630+ .. table ::
631+ :align: center
632+
633+ +--------------+------------------------------------------------------------+
634+ | "output" | Text response including requested parameters |
635+ +--------------+------------------------------------------------------------+
636+ | "rc" | :ref: `mcumgr_smp_protocol_status_codes `; will not appear |
637+ | | if 0 |
638+ +--------------+------------------------------------------------------------+
0 commit comments