# Need to know when USB is connected to host PC

**URL:** <https://forum.legato.io/t/need-to-know-when-usb-is-connected-to-host-pc/6227>\
**Category:** Legato Application Framework\
**Created:** [June 14, 2022, 3:54pm UTC](https://forum.legato.io/t/need-to-know-when-usb-is-connected-to-host-pc/6227 "2022-06-14T15:54:20Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [June 14, 2022, 4:03pm UTC](https://forum.legato.io/t/need-to-know-when-usb-is-connected-to-host-pc/6227/2 "2022-06-14T16:03:42Z")

</div>

you can use unsandboxed application to read  
/sys/devices/78d9000.usb/power\_supply/usb/online:

> [@USB link to the board](https://forum.legato.io/t/usb-link-to-the-board/5872/2):
>
> how about this? root@swi-mdm9x28-wp:/sys/bus/platform/drivers# cat /sys/devices/78d9000.usb/power\_supply/usb/online 1 root@swi-mdm9x28-wp:/sys/bus/platform/drivers# cat /sys/devices/78d9000.usb/power\_supply/usb/online 0

---

_[View the full topic](https://forum.legato.io/t/need-to-know-when-usb-is-connected-to-host-pc/6227)._
