Plug Into USB, Learn Hostname And IP Handle

Editorial Team
2 Min Read


Ever wished to only plug one thing in and conveniently learn the hostname and IP addresses of a headless board like a Raspberry Pi? Chances are high, a free USB port is extra accessible than digging up a monitor and keyboard, and that’s the place [C4KEW4LK]’s rpi_usb_ip_display is available in. Plug it right into a free USB port, and some moments later, learn the built-in show. Helpful!

The gadget is an RP2350 board and a 1.47″ Waveshare LCD, with a easy 3D-printed enclosure. It shows hostname, WiFi interface, Ethernet interface, and no matter others it may possibly establish. There isn’t even a button to push; simply plug it in and let it run.

Right here’s the way it works: as soon as plugged in, the board identifies itself as a USB keyboard and a USB serial port. Then it launches a terminal with Ctrl-Alt-T, and from there it sorts and runs instructions to do the next:

  1. Discover the serial port that the RP2350 board simply created.
  2. Get the parsed outputs of hostname, ip -o -4 addr present dev wlan0, ip -o -4 addr present dev eth0, and ip -o -4 addr present to collect up knowledge on lively interfaces.
  3. Ship that info out the serial port to the RP2350 board.
  4. Show the knowledge on the LCD.
  5. Replace periodically.

The one catch is that the host system should be capable to reply to launching a brand new terminal with Ctrl-Alt-T, which generally means the host should have somebody logged in.

It’s a fairly nifty little device, and its operation may remind you, in idea, of how BadUSB assaults occur: a bit of {hardware}, as soon as plugged into a number, identifies itself to the host as one thing aside from what it seems to be. Then it proceeds to enter and execute actions. However on this case, it’s under no circumstances malicious, simply handy and awfully cute.

Share This Article