erotundo87
Posts: 6
Joined: Wed Nov 08, 2017 10:18 am

Detect if the usb port has connected to computer

Sat Feb 10, 2018 3:00 pm

Hi!

This time i came to see if it's possible detect if the USB port of pizero w it's connected to laptop or desktop

this is possible to see into raspberry without using lsusb commad?

Thanks!!
Regards,

Eduardo

User avatar
DougieLawson
Posts: 39296
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Detect if the usb port has connected to computer

Sat Feb 10, 2018 8:13 pm

You'll get a udev event when the kernel detects the new device. You'll get another when it has loaded the kernel driver.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Raspberry Pi OS”