Backend API-support for Custom GET/SET RPC
This backend API-supported feature enables direct read and write operations on the custom memory pages of CMIS modules, completely bypassing the OcNOS database. The command can go directly to the protocol module without being processed by CMLD.
The following Transceivers are required:
| • | These two FOC FIM38950/100 and NEC OD-QD337SCLS00N transceivers are supported in this CMIS module. |
| • | The Custom CMIS pages supported are 1Eh, 1Fh and B0h~FFh. |
GET (Read) RPC
The NetConf RPC rpc transceiver-cmis-read instructs the Chassis Management Module Daemon (CMMd) to execute a low-level read command on the transceiver's physical memory bus (e.g., I2C/I3C), which fetches the raw data from the hardware, bypassing the OcNOS Database.
The following RPC is added to the ipi-platform-cmis YANG module:
rpc transceiver-cmis-read {
if-feature feature-list:HAVE_CMMD;
description "Use this RPC to make a netconf read operation that will fetch data from custom pages";
input {
leaf component-name {
type string;
mandatory true;
description "Component name";
}
leaf bank {
type uint8;
mandatory true;
description "Bank number";
}
leaf page {
type uint8;
mandatory true;
description "Memory page identifier";
}
leaf offset {
type uint8;
mandatory true;
description "Memory page offset";
}
leaf size {
type uint16;
mandatory true;
description "Memory page size";
range "1..256";
}
}
output {
leaf result {
type string;
mandatory true;
description "";
range "2..512";
}
}
}
To verify the module: FIM38950/100
yangcli ocnos@127.1> sget /components/component/transceiver/cmis-module/eeprom/state/part-number
RPC Data Reply 1 for session 1:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data>
<components xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-platform">
<component>
<name>CMIS-MODULE-1</name>
<transceiver>
<cmis-module>
<eeprom>
<state>
<part-number>FIM38950/100</part-number>
</state>
</eeprom>
</cmis-module>
</transceiver>
</component>
</components>
</data>
</rpc-reply>
yangcli ocnos@127.1>
Enable cmm debugging
ocnos#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
ocnos(config)#logging level cmm 7
ocnos(config)#logging console 7
ocnos(config)#debug cmm
ocnos(config)#commit
ocnos(config)#end
ocnos#
Send RPC command
yangcli ocnos@127.1> transceiver-cmis-read component-name=CMIS-MODULE-1 bank=0 page=0xc0 offset=0x80 size=16
2025 Mar 08 19:54:35.715 : ocnos : CMM : DEBUG : TESTING CUSTOM READ: ret: 0, fp-port: 1, bank: 0, page: 192, offset: 128, size: 16, result:
00: 03 3a e2 9f 00 00 19 d7 14 fb 00 00 00 00 00 00
2025 Mar 08 19:54:35.716 : ocnos : CMM : DEBUG : buff: "033ae29f000019d714fb000000000000"
RPC Data Reply 1 for session 2:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<result xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-platform">033ae29f000019d714fb000000000000</result>
</rpc-reply>
yangcli ocnos@127.1>
Debug output
ocnos(cmm-debug)#i2cutil dump xcvr 2 ddm page 0xc0
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 18 50 04 06 03 00 00 00 00 00 00 00 00 00 35 41 ?P???.........5A
10: 7c 40 f7 dd 32 00 00 00 00 00 40 00 00 00 00 00 |@??2.....@.....
20: 00 00 00 00 00 00 00 01 0d 00 00 00 00 00 00 00 .......??.......
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 02 11 3e 81 01 0f 3e 41 11 0d 3e .....??>???>A??>
60: 21 55 11 3e 81 01 0f 3e 41 11 0d 3e 21 55 11 46 !U?>???>A??>!U?F
70: 81 01 0f 46 41 11 00 00 00 00 00 00 00 00 00 c0 ???FA?.........?
80: 03 3a e2 9f 00 00 19 d7 14 fb 00 00 00 00 00 00 ?:??..????......
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
ocnos(cmm-debug)#
SET (Write) RPC
The NetConf RPC rpc transceiver-cmis-write similarly instructs the Chassis Management Module Daemon (CMMd) to execute a low-level write command on the transceiver's physical memory bus (e.g., I2C/I3C), which delivers new raw hexadecimal data to the targeted CMIS pages to change its operational parameters, entirely bypassing the OcNOS database.
The following RPC is added to the ipi-platform-cmis YANG module:
rpc transceiver-cmis-write {
if-feature feature-list:HAVE_CMMD;
description "Use this RPC to make a netconf write operation to set custom pages data";
input {
leaf component-name {
type string;
mandatory true;
description "Component name";
}
leaf bank {
type uint8;
mandatory true;
description "Bank number";
}
leaf page {
type uint8;
mandatory true;
description "Memory page identifier";
}
leaf offset {
type uint8;
mandatory true;
description "Memory page offset";
}
leaf size {
type uint16;
mandatory true;
description "Memory page size";
range "1..256";
}
leaf value {
type string;
mandatory true;
description "";
range "2..512";
}
}
}
Send RPC command
yangcli ocnos@127.1> transceiver-cmis-write component-name=CMIS-MODULE-1 bank=0 page=0xc0 offset=0x80 size=3 value=01A0F1
2025 Mar 08 19:54:35.715 : ocnos : CMM : DEBUG : TESTING CUSTOM READ: ret: 0, fp-port: 1, bank: 0, page: 192, offset: 128, size: 3, result:
80: 01 a0 f1
2025 Mar 08 19:54:35.716 : ocnos : CMM : DEBUG : buff: "01a0f1"
RPC Data Reply 1 for session 2:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<result xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-platform">01a0f1</result>
</rpc-reply>
yangcli ocnos@127.1>
Debug output
ocnos#cmm-debug
ocnos(cmm-debug)#i2cutil dump port qsfp1 ddm page 0xc0
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 18 50 04 06 03 00 00 00 01 00 00 00 00 00 34 98 ?P???...?.....4?
10: 7c 49 f8 08 32 00 00 00 00 00 40 00 00 00 00 00 |I??2.....@.....
20: 00 00 00 00 00 00 00 01 0d 00 00 00 00 00 00 00 .......??.......
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 02 11 3e 81 01 0f 3e 41 11 0d 3e .....??>???>A??>
60: 21 55 11 3e 81 01 0f 3e 41 11 0d 3e 21 55 11 46 !U?>???>A??>!U?F
70: 81 01 0f 46 41 11 00 00 00 00 00 00 00 00 00 c0 ???FA?.........?
80: 01 a0 f1 9f 00 00 19 d7 14 fb 00 00 00 00 00 00 ?:??..????......
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
ocnos(cmm-debug)#