/dev/ttyUSB0,1,2 force a device
/dev/ttyUSB0,1,2 force a device
I have some trouble with the ttyUSB ports. If I do a reboot or sometimes I poweroff, the ttyUSB ports are different, the ttyusb for rfxcom, heyu, and 1-wire are than different. Can you force it like for example in a modprobe.conf???
- Snelvuur
- Forum Moderator
- Posts: 3156
- Joined: Fri Apr 06, 2007 11:01 pm
- Location: Netherlands
- Contact:
/dev/ttyUSB0,1,2 force a device
Good question, although i never had this issue. Do you have an usb in between? or just all on a different port?
// Erik (binkey.nl)
// Erik (binkey.nl)
/dev/ttyUSB0,1,2 force a device
Have three use on lapotp, 2 on docking and one not. But als busy with more ports, so with usbhub, and that#347; also terribl, so it should be nice to define them so it works always ok.
- Snelvuur
- Forum Moderator
- Posts: 3156
- Joined: Fri Apr 06, 2007 11:01 pm
- Location: Netherlands
- Contact:
/dev/ttyUSB0,1,2 force a device
Did you take a look at "hotplug" ? Also, i know you can for instance for a usb device to come up always the same if its storage like:
UUID=ca982c63-6358-4a57-a6ae-2686768997f1 / ext3 defaults,errors=
So there is bound a way to do it, but dont know how to search it on google.. "usb/reboot/device" etc gives too much hits hehe.
// Erik (binkey.nl)
UUID=ca982c63-6358-4a57-a6ae-2686768997f1 / ext3 defaults,errors=
So there is bound a way to do it, but dont know how to search it on google.. "usb/reboot/device" etc gives too much hits hehe.
// Erik (binkey.nl)
/dev/ttyUSB0,1,2 force a device
it should be done with udev, in /etc/udev dir. it is not easy, but i searching for it
/dev/ttyUSB0,1,2 force a device
I created a file /etc/udev/rules.d/50-ttyUSB.rules which contains lines like these two:
BUS=="usb",SYSFS{idProduct}=="6001",SYSFS{idVendor}=="0403",SYSFS{serial}=="A4001XXX",SYMLINK="rfxcom-rx"
BUS=="usb",SYSFS{idProduct}=="6001",SYSFS{idVendor}=="0403",SYSFS{serial}=="A5001YYY",SYMLINK="rfxcom-tx"
where the SYSFS{*} values are taken from the output of commands like:
udevinfo -a -p `udevinfo -q path -n /dev/ttyUSB0`
This causes udev to create symlinks in /dev for rfxcom-rx and rfxcom-tx pointing to the dynamically assigned devices.
BUS=="usb",SYSFS{idProduct}=="6001",SYSFS{idVendor}=="0403",SYSFS{serial}=="A4001XXX",SYMLINK="rfxcom-rx"
BUS=="usb",SYSFS{idProduct}=="6001",SYSFS{idVendor}=="0403",SYSFS{serial}=="A5001YYY",SYMLINK="rfxcom-tx"
where the SYSFS{*} values are taken from the output of commands like:
udevinfo -a -p `udevinfo -q path -n /dev/ttyUSB0`
This causes udev to create symlinks in /dev for rfxcom-rx and rfxcom-tx pointing to the dynamically assigned devices.
Re: /dev/ttyUSB0,1,2 force a device
A little bit late but maybe helpfull for somone else.
here is my /etc/udev/rules.d/62-usbserial.rules (i am using fedora 16)
here is my /etc/udev/rules.d/62-usbserial.rules (i am using fedora 16)
Code: Select all
SUBSYSTEM=="tty" ATTRS{idVendor}=="0403" ATTRS{idProduct}=="c850" ATTRS{serial}=="DEORA98A" OWNER="nico" GROUP="users" SYMLINK+="dmxcontr" MODE="0777"
SUBSYSTEM=="tty" ATTRS{idVendor}=="0403" ATTRS{idProduct}=="6001" ATTRS{serial}=="A4004nGU" OWNER="nico" GROUP="users" SYMLINK+="rfxcom"
SUBSYSTEM=="tty" ATTRS{idVendor}=="0403" ATTRS{idProduct}=="6001" ATTRS{serial}=="A2003F6l" OWNER="nico" GROUP="users" SYMLINK+="plugwise"
SUBSYSTEM=="tty" ATTRS{idVendor}=="0403" ATTRS{idProduct}=="6001" ATTRS{serial}=="FTVJWQQZ" OWNER="nico" GROUP="users" SYMLINK+="smeter"
SUBSYSTEM=="tty" ATTRS{idVendor}=="067b" ATTRS{idProduct}=="2303" OWNER="nico" GROUP="ysers" SYMLINK+="gsmmodem"
Re: /dev/ttyUSB0,1,2 force a device
Sorry for necro topic, but some extra info around this problem:
On boot its first come, first served what USBTTY number device get.
And its not fixed what devices get detected first by the usb controller.
Atleast on Ubuntu you can find the full path if you type "ls -ld /dev/serial/by-id/*" in shell
This will give you something like this:
This path does not change on reboot,unplug etc. It also contains serialnumber on the USB device.
If you reconnect device after booted, you may need to disable/enable device in domotiga.
On boot its first come, first served what USBTTY number device get.
And its not fixed what devices get detected first by the usb controller.
Atleast on Ubuntu you can find the full path if you type "ls -ld /dev/serial/by-id/*" in shell
This will give you something like this:
Code: Select all
$ ls -ld /dev/serial/by-id/*
lrwxrwxrwx 1 root root 13 Apr 9 22:28 /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AH01xxxx-if00-port0 -> ../../ttyUSB1
lrwxrwxrwx 1 root root 13 Apr 9 22:28 /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1Xxxxxx-if00-port0 -> ../../ttyUSB0
If you reconnect device after booted, you may need to disable/enable device in domotiga.