Syndicated actor for publishing Linux device events
Go to file
Emery Hemingway 0e25a32850 Build system refactor 2024-03-15 10:02:24 +00:00
src Rewrite syndev to uevent_dump 2024-03-15 09:56:40 +00:00
.envrc Initial commit 2023-07-02 15:23:12 +01:00
.gitignore Build system refactor 2024-03-15 10:02:24 +00:00
README.md Move SUBSYSTEM and DEVPATH to record fields 2023-07-04 13:34:40 +01:00
Tupfile Build system refactor 2024-03-15 10:02:24 +00:00
Tuprules.tup Build system refactor 2024-03-15 10:02:24 +00:00
default.nix Build system refactor 2024-03-15 10:02:24 +00:00
lock.json Build system refactor 2024-03-15 10:02:24 +00:00
syndev.nimble Rewrite syndev to uevent_dump 2024-03-15 09:56:40 +00:00
uevent.prs Move SUBSYSTEM and DEVPATH to record fields 2023-07-04 13:34:40 +01:00

README.md

Syndicated Device Event Broadcaster

An actor for broadcasting Linux Kernel uevents.

Intended as part of native a device manager for Synit. This is not a replacement for udev/eudev or mdev/mdevd.

Message Schema is at ./uevent.prs.

If you are looking for documentation on how to parse and handle Linux uevents, please let me know when you find it.

Example Syndicate server configuration:

? <machine-dataspace ?machine> [

  <require-service <daemon syndev>>

  <daemon syndev {
    argv: ["/bin/syndev"]
    protocol: application/syndicate
  }>

  ? <service-object <daemon syndev> ?cap> [
    $cap { machine: $machine }
  ]
]

Example message stream:

<uevent "power_supply" "/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:18/PNP0C09:01/PNP0C0A:03/power_supply/BAT0" change {POWER_SUPPLY_CAPACITY: 98, POWER_SUPPLY_CAPACITY_LEVEL: "Normal", POWER_SUPPLY_CYCLE_COUNT: 236, POWER_SUPPLY_ENERGY_FULL: 44672000, POWER_SUPPLY_ENERGY_FULL_DESIGN: 50464000, POWER_SUPPLY_ENERGY_NOW: 43821000, POWER_SUPPLY_MANUFACTURER: "ASUSTeK", POWER_SUPPLY_MODEL_NAME: "ASUS Battery", POWER_SUPPLY_NAME: "BAT0", POWER_SUPPLY_POWER_NOW: 7691000, POWER_SUPPLY_PRESENT: 1, POWER_SUPPLY_SERIAL_NUMBER: " ", POWER_SUPPLY_STATUS: "Charging", POWER_SUPPLY_TECHNOLOGY: "Li-ion", POWER_SUPPLY_TYPE: "Battery", POWER_SUPPLY_VOLTAGE_MIN_DESIGN: 15200000, POWER_SUPPLY_VOLTAGE_NOW: 15200000} 3916>
,uevent "hidraw" "/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:248A:5B2F.0011/hidraw/hidraw2" add {DEVNAME: "hidraw2", MAJOR: 247, MINOR: 2} 3980>
<uevent "hid" "/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:248A:5B2F.0011" bind {DRIVER: "hid-generic", HID_ID: "0003:0000248A:00005B2F", HID_NAME: "XCTECH Ninjutso Katana Superlight", HID_PHYS: "usb-0000:00:14.0-2/input2", HID_UNIQ: 0, MODALIAS: "hid:b0003g0001v0000248Ap00005B2F"} 3981>
<uevent "usb" "/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2" bind {DEVTYPE: "usb_interface", DRIVER: "usbhid", INTERFACE: "3/0/0", MODALIAS: "usb:v248Ap5B2Fd0116dc00dsc00dp00ic03isc00ip00in02", PRODUCT: "248a/5b2f/116", TYPE: "0/0/0"} 3982>