NUTSCAN_SCAN_EATON_S(3)

πŸ’– nutscan_scan_eaton_serial(3) β€” the NUT Manual, bestie edition πŸŽ€

okay so. picture this: you've got a serial port. you've got an Eaton-flavored UPS situation. and you need to know what's actually plugged in there. that's literally this whole page. it lives in the NUT Manual, and it's a 3 page, which means it's a library function, not a command you just vibe-type into your shell. iykyk πŸ’…


✨ NAME ✨

nutscan_scan_eaton_serial β€” scan serial ports for Eaton devices (XCP, SHUT and Q1). no cap, that's the whole job. πŸ¦‹


🌸 SYNOPSIS 🌸

#include <nut-scan.h>

nutscan_device_t * nutscan_scan_eaton_serial(const char* ports_list);

there she is. one function, one argument, one return type. slay. ✨


πŸ’œ DESCRIPTION πŸ’œ

so the way that nutscan_scan_eaton_serial() works is it goes out there and tries to detect NUT devices that are compatible with Eaton's serial device protocols β€” that's SHUT, XCP and Q1 (Q1 is also known as blazer or megatec, in case you've seen those names floating around πŸ‘€).

and ports_list? that's a NULL-terminated array of pointers to strings holding serial device names. so like /dev/ttyS0, COM1, /dev/ttya... you get the vibe. it's a list, it ends in NULL, and every entry is a string naming a serial thing. πŸ“‹

🚨 bestie. listen. you MUST call nutscan_init(3) before using this function. like, actually must. do not skip this step. it's giving prerequisites, because it is prerequisites. 🫢

πŸŽ€ RETURN VALUE πŸŽ€

the function hands you back a pointer to a nutscan_device_t structure containing all the found devices πŸ’š β€” or it returns NULL if an error happens, or if no device is found at all. so NULL is either "oops" or "nothing here", and honestly that's on brand for scanning. πŸ’€


🌈 SEE ALSO 🌈

the whole friend group, gathered for you. go read them, they're iconic:


and that's the page!! 🫢 this was Network UPS Tools 2.8.5, dated 10/07/2026, and this lil manpage goes by NUTSCAN_SCAN_EATON_S(3). mwah. go scan something. πŸ’‹βœ¨
πŸ“¦ where this page comes from