<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to detect a USB device/host is attached to the USB port in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1402895#M186105</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are using iMX6DL. In our design, we need to do some settings based on whether there is a USB device is attached to the USB OTG port.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to find out that any USB device/host is currently attached to the USB OTG port?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Winston&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jan 2022 22:44:17 GMT</pubDate>
    <dc:creator>yangao</dc:creator>
    <dc:date>2022-01-20T22:44:17Z</dc:date>
    <item>
      <title>How to detect a USB device/host is attached to the USB port</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1402895#M186105</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are using iMX6DL. In our design, we need to do some settings based on whether there is a USB device is attached to the USB OTG port.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to find out that any USB device/host is currently attached to the USB OTG port?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Winston&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 22:44:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1402895#M186105</guid>
      <dc:creator>yangao</dc:creator>
      <dc:date>2022-01-20T22:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect a USB device/host is attached to the USB port</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1403864#M186185</link>
      <description>&lt;P&gt;Have you get your board now?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 09:05:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1403864#M186185</guid>
      <dc:creator>Rita_Wang</dc:creator>
      <dc:date>2022-01-24T09:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect a USB device/host is attached to the USB port</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1404073#M186209</link>
      <description>&lt;P&gt;Yes.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 16:28:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1404073#M186209</guid>
      <dc:creator>yangao</dc:creator>
      <dc:date>2022-01-24T16:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect a USB device/host is attached to the USB port</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1404977#M186316</link>
      <description>&lt;P&gt;You can run your board to see the host/device mode, when download images to your board, the board will work on device mode, and when system boot up, you can test the usb host mode.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 07:35:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1404977#M186316</guid>
      <dc:creator>Rita_Wang</dc:creator>
      <dc:date>2022-01-26T07:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect a USB device/host is attached to the USB port</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1405749#M186371</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Would you please elaborate more? from embedded Linux, what command should I use? or any /sys file I should check?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Winston&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 06:09:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1405749#M186371</guid>
      <dc:creator>yangao</dc:creator>
      <dc:date>2022-01-27T06:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect a USB device/host is attached to the USB port</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1405759#M186372</link>
      <description>&lt;P&gt;Which version of BSP are you using? Have you board boot up?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 06:22:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1405759#M186372</guid>
      <dc:creator>Rita_Wang</dc:creator>
      <dc:date>2022-01-27T06:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect a USB device/host is attached to the USB port</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1406155#M186406</link>
      <description>&lt;P&gt;We use BSP 3.14*.&lt;/P&gt;&lt;P&gt;The board boots up without any problem - it is already a product for years. Now we want to add some new feature - do something when a USB device/host is connected to the OTG port. But we need to way to detect that a USB device/host is connected.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 16:48:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1406155#M186406</guid>
      <dc:creator>yangao</dc:creator>
      <dc:date>2022-01-27T16:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect a USB device/host is attached to the USB port</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1406365#M186419</link>
      <description>&lt;P&gt;You want the usb to work as host? If yes, you need to connect one otg usb line&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 03:35:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1406365#M186419</guid>
      <dc:creator>Rita_Wang</dc:creator>
      <dc:date>2022-01-28T03:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect a USB device/host is attached to the USB port</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1406383#M186421</link>
      <description>&lt;P&gt;I want to set USB as host or device only when a USB host/device is connected - that goes back to my original question: How to detect that there is a USB device/host currently connected. It does not make sense to set anything if nothing is connected, right?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 04:25:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1406383#M186421</guid>
      <dc:creator>yangao</dc:creator>
      <dc:date>2022-01-28T04:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect a USB device/host is attached to the USB port</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1410241#M186749</link>
      <description>&lt;P&gt;udev knows by netlink to mount such as usb disk and knows to invoke usb garget as device.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How udev know that is the way you know that and the answer for your question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The basic knowledge is netlink of linux.&amp;nbsp; the dmesg is also by netlink link udev. if you write down a netlink program you will get such as usb disk add remove message as udev does.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the sysfs&amp;nbsp; /sys/class, it also can know the usb role.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is linux question not a question for&amp;nbsp;i.MX Processors&amp;nbsp; community.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is too big topic, suggest you to learn the netlink, udev mechanism first.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 11:28:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-detect-a-USB-device-host-is-attached-to-the-USB-port/m-p/1410241#M186749</guid>
      <dc:creator>BiyongSUN</dc:creator>
      <dc:date>2022-02-08T11:28:01Z</dc:date>
    </item>
  </channel>
</rss>

