DUMP_USB(1p)

πŸ“¦
version 0.38 Β· 2 versions
, in ubuntu jammy

πŸ’– DUMP_USB β€” like, the whole manual, but make it make sense πŸ’–

okay bestie, pull up a chair because this is dump_usb.pl from the User Contributed Perl Documentation section, and it's honestly giving "quick hack that got promoted." No cap. Let's get into it. πŸ¦‹


✨ NAME ✨

dump_usb.pl β€” the lil script that uses Device::USB to list your USB devices. That's it. That's the whole job. πŸ’…


πŸŽ€ VERSION πŸŽ€

Version 0.37. Iconic, vintage, beloved. ✨


🌸 SYNOPSIS 🌸

dump_usb.pl

So the dump_usb.pl program gives you a relatively crude dump of the info that's available from any USB devices installed on your system. Like, she's not polished, but she shows up and she tells you things. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the lore. This module provides a Perl interface to the C library libusb. That library supports a relatively full set of functionality to access a USB device. And on top of all that libusb functionality, Device::USB throws in a few convenience features that are intended to produce a more Perl-ish interface. Because obviously. πŸ’œ

Now, the behaviour depends on how you call her:

  • No arguments at all? She lists all installed USB devices on all busses. Just so you know β€” this is literally a Data::Dumper dump of the structures, so it is not the most user friendly output in the world. Not even close, bestie. 😭 But listen β€” the program was only ever intended as a quick hack to verify that Device::USB was working. So, vibe check: it's doing exactly what it was born to do.
  • Called with arguments? Then those arguments are expected to be a vendor id and a product id. Pro tip: those arguments can be in hex if you precede them with 0x. She searches for a device that matches that vendor id and product id. If she finds one, the device filename gets printed, along with the vendor and product ids. Periodt. πŸ’…
  • And if the program can open the device? Then she'll also print the manufacture name and product name as reported by the device. She's thorough like that. πŸ‘‘

πŸ”₯ DEPENDENCIES πŸ”₯

This module depends on the Device::USB and Data::Dumper modules, plus the strict and warnings pragmas. And obviously β€” and I mean obviously β€” libusb must be available for Device::USB to function at all. No libusb, no party. πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

G. Wade Johnson (wade at anomaly dot org) Paul Archer (paul at paularcher dot org)

Houston Perl Mongers Group β€” represent. 🌈


πŸ™ˆ BUGS πŸ™ˆ

Okay, the receipts:

  • The output format is extremely non-friendly. She said it, not me. πŸ’€
  • The program only returns the first matching USB device. One match, that's all you get, don't ask for seconds.

Please report any bugs or feature requests to bug-maze-svg1@rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Device::USB>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. Teamwork, fr fr. 🫢


πŸ’œ ACKNOWLEDGEMENTS πŸ’œ

Thanks go to various members of the Houston Perl Mongers group for input on the module. But thanks mostly go to Paul Archer, who proposed the project and helped with the development. Main character energy, honestly. πŸ‘‘


Copyright 2006 Houston Perl Mongers.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Slay. ✨


lowkey the whole thing is a Data::Dumper dump and highkey that's the point. it's giving "quick hack that works," and we respect her for it. πŸ’–

and that's the tea, bestie β€” this was dump_usb.pl, documented under perl v5.34.0 and dated 2022-02-06. go forth and list your USB devices. πŸ¦‹πŸ’…πŸŒΈ

πŸ“¦ where this page comes from