usb口旁边有个usb port resett的是什么

4618人阅读
电路(39)
一、为何示波器上显示有两次chirp K而CATC却只抓到了一次chirp K信号
包1、2、3分别对应下图示波器抓到的1、2、3处的波形,3个包发送结束后主机再一次进行RESET,与device进行发送chirp K握手。
然而在示波器上显示两次chirp K信号,但是在CATC上却只抓到了B处的chirp K信号,
原因是在CATC只录取high speed信号的情况下,CATC以sof帧作为判断high speed条件,而在示波器上显示的第一次chirp K之前,
主机还没有向device发送sof从而CAT无法判断A处chirp K信号是否属于high speed信号,从而选择不记录第一个chirp K。
二、为何有两次chirp K信号
第一次chirp K信号是在suspend之后的,此时属于硬件枚举阶段,主机想要了解device的速度因而进行的reset,
而第二次的chirp K可由上图看到是在get device descriptor的3个包之后的,这个是根据不同的主机的行为,USB2.0规范并没有要求这里的复位动作,
复位是一个谨慎的动作,有的主机为了确保复位结束后设备处在一个已知的状态。C - how can i reset the USB Bus under linux? - Stack Overflow
Join Stack Overflow to learn, share knowledge, and build your career.
or sign in with
Daily--about 5 to 10 times--my USB camera disappears from the system. It's been happening from day 1 because the manufacturer driver is not compatible with Linux. lsusb and dmesg show it correctly at first, but after a longer period of time sometimes it disappears. The best solution to fix it is to reset the USB interface for that camera to get it back. I did it a few times manually using the C source code and it worked, but when I am doing it in a Bash loop it seems it's failing over and over. Any idea?
How can I make both programs work, so that I get my
/dev/video0 or 1 or 2 always available?
Step 1: Resetting the USB bus under Linux using this code:
/* few times it's resetting but when I use it in a Bash loop it's not doing it */
#include &stdio.h&
#include &usb.h&
int main(int argc, char *argv[]) {
struct usb_bus *
usb_init();
usb_find_busses();
usb_find_devices();
busses = usb_get_busses();
struct usb_bus *
for (bus = bus = bus-&next) {
struct usb_device *
usb_dev_handle *
for (dev = bus-& dev = dev-&next) {
char buf[1024];
junk = usb_open ( dev );
usb_get_string_simple(junk,2,buf,1023);
switch(argc) {
if ( junk == NULL ) {
printf("Can't open %p (%s)\n", dev, buf );
} else if (strcmp(buf,"HD Pro Webcam C920")==0) {
val = usb_reset(junk);
printf( "reset %p %d (%s)\n", dev, val, buf );
if ( junk == NULL ){
printf("Can't open %p (%s)\n", dev, buf );
val = usb_reset(junk);
printf( "reset %p %d (%s)\n", dev, val, buf );
usb_close(junk);
Step 2: Running as scanner - to make sure video0 or 1 or 2 is available, if not available resetting the USB bus
#!/bin/bash
for i in 0 1 2
tmp="/dev/video$i"
if [ -e $tmp ]
echo "/dev/video$i"
echo "NO - camera found - restarting the USB $i"
echo ROOT_PASSWORD_TO_EXECUTE | sudo -S /var/tmp/c-restartusb/restartusb
echo "Camera - logic ended, expecting the camera is available now"
Step 3: Still it's not available?
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
NO - camera found - restart the USB 2
NO - camera found - restart the USB 0
NO - camera found - restart the USB 1
8,44933148280
Don't sure your reset usb code right...
Can you find the usb device ?
If you can, try below:
BTW, This code is from . should be work if you can find the usb node:
/* usbreset -- send a USB port reset to a USB device */
#include &stdio.h&
#include &unistd.h&
#include &fcntl.h&
#include &errno.h&
#include &sys/ioctl.h&
#include &linux/usbdevice_fs.h&
int main(int argc, char **argv)
const char *
if (argc != 2) {
fprintf(stderr, "Usage: usbreset device-filename\n");
filename = argv[1];
fd = open(filename, O_WRONLY);
if (fd & 0) {
perror("Error opening output file");
printf("Resetting USB device %s\n", filename);
rc = ioctl(fd, USBDEVFS_RESET, 0);
if (rc & 0) {
perror("Error in ioctl");
printf("Reset successful\n");
close(fd);
If you can't, you maybe want to rescan to find the usb device like this:
echo 1 & /sys/dev/block/8:16/device/rescan
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Upcoming Events
Stack Overflow works best with JavaScript enabled当前位置:&&技术问答>
对于linux下的usb蓝牙适配器驱动hci_usb.c中的一些宏(如HCI_RESET)是什么意思?
&&&&来源:&互联网& 发布时间:
&&&&本文导语:&
以下这些宏是什么意思,有何用途?
#define HCI_IGNORE
#define HCI_RESET
#define HCI_DIGIANSWER
#define HCI_SNIFFER
#define HCI_BROKEN_ISOC
#define HCI_BCM9
应该和该driver对各个BT厂...
以下这些宏是什么意思,有何用途?
#define HCI_IGNORE
#define HCI_RESET
#define HCI_DIGIANSWER
#define HCI_SNIFFER
#define HCI_BROKEN_ISOC
#define HCI_BCM9
应该和该driver对各个BT厂家的usb dongle 所需要的特殊操作有关.
因为只要是BT的usb dongle,该driver就会支持(只要满足该id table),但是各个厂家的设备之间差别比较大,所以有些特殊操作而已.
您可能感兴趣的文章:
本站(WWW.169IT.COM)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。本站(WWW.169IT.COM)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
相关文章推荐
特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!
(C)9IT.COM,E-mail:www_169it_com#163.com(请将#改为@)当前位置: &
求翻译:usb mass storage reset delay 20sec是什么意思?
usb mass storage reset delay 20sec
问题补充:
USB大容量存储复位延迟20秒
usb大容量存储复位延迟20秒
usb大容量存储器重新设置延迟20sec
usb 大容量存储重置延迟 20 秒
usb 大量存储重置耽搁时间的 20sec
我来回答:
参考资料:
* 验证码:
登录后回答可以获得积分奖励,并可以查看和管理所有的回答。 |
我要翻译和提问
请输入您需要翻译的文本!Access denied | www.archivum.info used Cloudflare to restrict access
Please enable cookies.
What happened?
The owner of this website (www.archivum.info) has banned your access based on your browser's signature (3feeacf4-ua98).

我要回帖

更多关于 ubuntu reset usb 的文章

 

随机推荐