Hello,
So I’m trying to add a MFC-J5945DW and a MFC-J6520DW however the ink levels are always reported as 50%.
After digging a little bit I found this article that explains how it’s possible to get exact readings:
http://2tazasdelinux.blogspot.com/2021/05/
It’s in spanish but it basically says that you can get the correct readings from:
iso.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.8
snmpwalk -v 2c -c public 172.a.b.c iso.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.8
iso.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.8.0 = Hex-STRING: 76 01 04 00 00 00 01 77 01 04 00 00 00 01 78 01
04 00 00 00 01 7F 01 04 00 00 00 01 68 01 04 00
00 00 01 55 01 04 00 00 00 01 31 01 04 00 00 00
01 32 01 04 00 00 00 02 33 01 04 00 00 00 01 34
01 04 00 00 00 01 70 01 04 00 00 01 F4 82 01 04
00 00 00 0A 71 01 04 00 00 22 60 83 01 04 00 00
00 5A 72 01 04 00 00 19 64 84 01 04 00 00 00 46
6F 01 04 00 00 25 1C 81 01 04 00 00 00 64 79 01
04 00 00 0C 1C 7A 01 04 00 00 0C 1C 7B 01 04 00
00 0C 1C 80 01 04 00 00 0C 1C 69 01 04 00 00 25
E4 73 01 04 00 00 28 FA 74 01 04 00 00 28 FA 75
01 04 00 00 28 FA 7E 01 04 00 00 28 FA 54 01 04
00 00 00 01 35 01 04 00 00 00 01 6A 01 04 00 00
21 34 6D 01 04 00 00 26 AC FF
You should group these in groups of 7 values:
# snmpwalk -v 2c -c public 172.a.b.c iso.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.8.0 | tr -d "\n" | cut -c54- | fold -w 21
76 01 04 00 00 00 01
77 01 04 00 00 00 01
78 01 04 00 00 00 01
7F 01 04 00 00 00 01
68 01 04 00 00 00 01
55 01 04 00 00 00 01
31 01 04 00 00 00 01
32 01 04 00 00 00 02
33 01 04 00 00 00 01
34 01 04 00 00 00 01
70 01 04 00 00 01 F4
82 01 04 00 00 00 0A
71 01 04 00 00 22 60
83 01 04 00 00 00 5A
72 01 04 00 00 19 64
84 01 04 00 00 00 46
6F 01 04 00 00 25 1C
81 01 04 00 00 00 64
79 01 04 00 00 0C 1C
7A 01 04 00 00 0C 1C
7B 01 04 00 00 0C 1C
80 01 04 00 00 0C 1C
69 01 04 00 00 25 E4
73 01 04 00 00 28 FA
74 01 04 00 00 28 FA
75 01 04 00 00 28 FA
7E 01 04 00 00 28 FA
54 01 04 00 00 00 01
35 01 04 00 00 00 01
6A 01 04 00 00 21 34
6D 01 04 00 00 26 AC
FF
Now this is what matters:
"6f": VAL_BLACK_TONER_REMAIN
"70": VAL_CYAN_TONER_REMAIN
"71": VAL_MAGENTA_TONER_REMAIN
"72": VAL_YELLOW_TONER_REMAIN
Where, for instance:
71 01 04 00 00 23 F0
The “71” is VAL_MAGENTA_TONER_REMAIN, magenta remaining toner. The “01 04” we ignore. And the “00 00 23 F0” is the hexadecimal number 0x23F0, which in decimal is 9200. That 9200 must be divided by 100 and gives us the percentage of magenta toner remaining: 9200/100=92% toner.
Some additional info:
Is this something that can be introduced in librenms?
Maybe something doable on librenms/LibreNMS/Modules/PrinterSupplies.php at master · librenms/librenms · GitHub ?