Page 1 of 1

Detect if the usb port has connected to computer

Posted: Sat Feb 10, 2018 3:00 pm
by erotundo87
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!!

Re: Detect if the usb port has connected to computer

Posted: Sat Feb 10, 2018 8:13 pm
by DougieLawson
You'll get a udev event when the kernel detects the new device. You'll get another when it has loaded the kernel driver.