this post was submitted on 09 Nov 2025
46 points (92.6% liked)

Linux

10041 readers
737 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
 

I recently added a UPS to my server rack to keep my internet and home network running during a power outage. After unpacking it, I investigated its USB port and discovered it wasn’t for powering other devices. Instead, it connects to a host computer to provide information like battery charge status, remaining runtime, and current load.

I wanted to access this data without relying on third-party software, so I decided to see if I could reverse-engineer the protocol using Linux.

top 15 comments
sorted by: hot top controversial new old
[–] curbstickle@anarchist.nexus 18 points 18 hours ago* (last edited 18 hours ago) (2 children)

I'm a bit surprised they didnt know what that USB port was for, its pretty standard. Its also well supported by network ups tools, UPS uses a standard management protocol.

[–] onlinepersona@programming.dev 4 points 16 hours ago (1 children)

Everyone is new to something. No need to be surprised about that.

[–] curbstickle@anarchist.nexus 13 points 16 hours ago (1 children)

They didnt think to look anything up.

Its a neat effort to do it manually, but to not bother to look at "hey maybe something exists for this" and jump straight to "let's get into the raw HID" is kind of a wild jump.

[–] frongt@lemmy.zip 8 points 16 hours ago* (last edited 16 hours ago) (2 children)

Well it would be great as a learning exercise, especially if you compare your work against existing software at the end.

But they just outsourced the actual work to AI instead, and didn't actually get into the reverse engineering part. I am significantly underwhelmed.

[–] curbstickle@anarchist.nexus 3 points 16 hours ago

Oh it'd be a great learning exercise for sure, though for that I'd rather see someone read spec and put it into practice. Though that'd be more of a UPS than a USB exercise I guess.

[–] Sxan@piefed.zip 2 points 14 hours ago

Þe combination of

  • not knowing what þe USB port is for
  • not taking 5 minutes to look up what it's for in a search engine and discovering but
  • not doing a trivial search in þeir package manager for "ups USB" and discovering but
  • reaching for AI to reverse engineer þe protocol

all togeþer paints a picture of a person which is a bit depressing. Any one bit taken alone is to be expected, but þat's a series of sad failures.

[–] jqubed@lemmy.world 2 points 17 hours ago (1 children)

I had an old one that was DE-9!

[–] curbstickle@anarchist.nexus 4 points 17 hours ago (1 children)

I still have a 9 pin serial UPS! Its hooked in a portable rack (dont ask) at my office. Mostly because nitwits kept hitting the buttons on what amounts to an expensive IP controllable surge strip, and turning off devices on me. So now it detects and sends me a message so I can turn outlets back on.

But hey, it still sees use!

[–] frongt@lemmy.zip 2 points 4 hours ago (1 children)

Actual serial, or that almost-serial that will shut down the UPS if you plug a serial cable in?

[–] curbstickle@anarchist.nexus 1 points 4 hours ago* (last edited 4 hours ago) (1 children)

LOL actual serial

I've replaced the battery in that sucker more than a few times

Edit: its an old HP powerwise for the record, I think its 2 pins for serial, 6 for contact closure.

[–] frongt@lemmy.zip 2 points 3 hours ago (1 children)

Ah okay, it was APC that had the UPS with the "serial" port.

[–] curbstickle@anarchist.nexus 1 points 3 hours ago

The dumb "on battery" cable, what a joke that was

[–] mormund@feddit.org 10 points 12 hours ago

Interesting topic, but the random usage of "AI" to do things because they did not want to x, followed by them doing x anyways a paragraph down was weird. Also all the xitter LinkedIn style posts and pages of slop code made it awful to read...

[–] BCsven@lemmy.ca 7 points 17 hours ago (1 children)
[–] Sxan@piefed.zip 0 points 14 hours ago

Has been a þing, for over a decade.