Всем привет. В общем последнее время наблюдается следующая картина. Начал переодически отваливатся USB. Может отработать от суток до трех.
syslog показует следующее
Sep 15 15:19:34 viris42 kernel: [97755.228552] hub 2-0:1.0: port 8 disabled by hub (EMI?), re-enabling...
Sep 15 15:19:34 viris42 kernel: [97755.228696] usb 2-8: USB disconnect, device number 3
Sep 15 15:19:34 viris42 kernel: [97755.229630] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
Sep 15 15:19:34 viris42 kernel: [97755.229774] pl2303 2-8:1.0: device disconnected
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_reconnect.c:(70) Failed to reconnect DS9097U bus master!
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 kernel: [97755.536034] usb 2-8: new full-speed USB device number 4 using ohci_hcd
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_reconnect.c:(70) Failed to reconnect DS9097U bus master!
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
Sep 15 15:19:34 viris42 kernel: [97755.748529] usb 2-8: New USB device found, idVendor=067b, idProduct=2303
Sep 15 15:19:34 viris42 kernel: [97755.748698] usb 2-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Sep 15 15:19:34 viris42 kernel: [97755.748850] usb 2-8: Product: USB-Serial Controller
Sep 15 15:19:34 viris42 kernel: [97755.749004] usb 2-8: Manufacturer: Prolific Technology Inc.
Sep 15 15:19:34 viris42 kernel: [97755.751593] pl2303 2-8:1.0: pl2303 converter detected
Sep 15 15:19:34 viris42 kernel: [97755.784624] usb 2-8: pl2303 converter now attached to ttyUSB1
Sep 15 15:19:34 viris42 mtp-probe: checking bus 2, device 4: "/sys/devices/pci0000:00/0000:00:02.0/usb2/2-8"
Sep 15 15:19:34 viris42 mtp-probe: bus: 2, device: 4 was not an MTP device
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_reconnect.c:(70) Failed to reconnect DS9097U bus master!
Sep 15 15:19:34 viris42 OWFS[5107]: DEFAULT: ow_serial_open.c:(38) [No such file or directory] Cannot open port: /dev/ttyUSB0 Permissions problem?
В OWFS прописан ttyUSB0 но после происходящего описанного выше в системе появляется /dev/ttyUSB1
А по команде lsusb после глюка выдает
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0ac8:3450 Z-Star Microelectronics Corp.
Bus 002 Device 002: ID 041e:4028 Creative Technology, Ltd Vista Plus cam [VF0090]
Bus 002 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
После ребута lsusb выдает но порт теперь как и должен быть /dev/ttyUSB0
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0ac8:3450 Z-Star Microelectronics Corp.
Bus 002 Device 002: ID 041e:4028 Creative Technology, Ltd Vista Plus cam [VF0090]
Bus 002 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Как найти того, кто дергает порт он меняет свой адресс в системе. Хотя вебка даже после глюка продолжает работать.
Непонятки с USB (Debian)
Модератор: immortal
- viris
- Сообщения: 89
- Зарегистрирован: Вс янв 20, 2013 5:24 pm
- Откуда: РФ Горловка ДНР
- Контактная информация:
Непонятки с USB (Debian)
http://viris42.hldns.ru http://narodmon.ru/3052
Linux Debian7 Arduino UNO-R3, BMP085, DS18B20
http://connect.smartliving.ru/profile/50
Linux Debian7 Arduino UNO-R3, BMP085, DS18B20
http://connect.smartliving.ru/profile/50
- viris
- Сообщения: 89
- Зарегистрирован: Вс янв 20, 2013 5:24 pm
- Откуда: РФ Горловка ДНР
- Контактная информация:
Re: Непонятки с USB (Debian)
Сам задал вопрос сам отвечаю. Нарыл на просторах всемирной паутины.
Выполните несколько команд:
echo KERNEL==\"ttyUSB*\", MODE=\"0666\" > 51-usb-uart-mode.rules
sudo mv 51-usb-uart-mode.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
Здесь создается файл 51-usb-uart-mode.rules с содержимым:
KERNEL=="ttyUSB*", MODE="0666"
Затем файл копируется в каталог /etc/udev/rules.d/
Таким образом создается правило для udev. А udev управляет устройствами в Линукс.
Последняя команда говорит udev перезагрузить правила.
от себя ещё добавил следующую строку которая при любом переключении назначает для PL2303 ttyUSB100
и этот же порт ttyUSB100 прописал в owfs.conf
Содержимое 51-usb-uart-mode.rules
KERNEL=="ttyUSB*", MODE="0666"
# Описание переименования конвертера USB
ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", ATTR{name}=="Prolific Technology, Inc. PL2303 Serial Port", NAME="ttyUSB100"
--------------------------------------------------------------------------------------------------------------------------------------------------------------
ATTRS{idVendor}
ATTRS{idProduct}
ATTR{name}
Эти данные извлекаются командой lsusb и имеют вот такой вид
~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0ac8:3450 Z-Star Microelectronics Corp.
Bus 002 Device 002: ID 041e:4028 Creative Technology, Ltd Vista Plus cam [VF0090]
Bus 002 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
~#
Выполните несколько команд:
echo KERNEL==\"ttyUSB*\", MODE=\"0666\" > 51-usb-uart-mode.rules
sudo mv 51-usb-uart-mode.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
Здесь создается файл 51-usb-uart-mode.rules с содержимым:
KERNEL=="ttyUSB*", MODE="0666"
Затем файл копируется в каталог /etc/udev/rules.d/
Таким образом создается правило для udev. А udev управляет устройствами в Линукс.
Последняя команда говорит udev перезагрузить правила.
от себя ещё добавил следующую строку которая при любом переключении назначает для PL2303 ttyUSB100
и этот же порт ttyUSB100 прописал в owfs.conf
Содержимое 51-usb-uart-mode.rules
KERNEL=="ttyUSB*", MODE="0666"
# Описание переименования конвертера USB
ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", ATTR{name}=="Prolific Technology, Inc. PL2303 Serial Port", NAME="ttyUSB100"
--------------------------------------------------------------------------------------------------------------------------------------------------------------
ATTRS{idVendor}
ATTRS{idProduct}
ATTR{name}
Эти данные извлекаются командой lsusb и имеют вот такой вид
~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0ac8:3450 Z-Star Microelectronics Corp.
Bus 002 Device 002: ID 041e:4028 Creative Technology, Ltd Vista Plus cam [VF0090]
Bus 002 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
~#
http://viris42.hldns.ru http://narodmon.ru/3052
Linux Debian7 Arduino UNO-R3, BMP085, DS18B20
http://connect.smartliving.ru/profile/50
Linux Debian7 Arduino UNO-R3, BMP085, DS18B20
http://connect.smartliving.ru/profile/50