/dev/ttyUSB0,1,2 force a device

Forum regarding Linux Software and Home Automation Domotica.

/dev/ttyUSB0,1,2 force a device

Postby Kroonen » Fri Dec 07, 2007 5:22 pm

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???
Kroonen
Member
Member
 
Posts: 223
Joined: October 2007
Location: Netherlands

/dev/ttyUSB0,1,2 force a device

Postby Snelvuur » Fri Dec 07, 2007 5:41 pm

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)
User avatar
Snelvuur
Forum Moderator
Forum Moderator
 
Posts: 3052
Joined: April 2007
Location: Netherlands

/dev/ttyUSB0,1,2 force a device

Postby Kroonen » Fri Dec 07, 2007 8:56 pm

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.
Kroonen
Member
Member
 
Posts: 223
Joined: October 2007
Location: Netherlands

/dev/ttyUSB0,1,2 force a device

Postby Snelvuur » Fri Dec 07, 2007 11:06 pm

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)
User avatar
Snelvuur
Forum Moderator
Forum Moderator
 
Posts: 3052
Joined: April 2007
Location: Netherlands

/dev/ttyUSB0,1,2 force a device

Postby Kroonen » Sun Dec 09, 2007 10:37 am

it should be done with udev, in /etc/udev dir. it is not easy, but i searching for it
Kroonen
Member
Member
 
Posts: 223
Joined: October 2007
Location: Netherlands

/dev/ttyUSB0,1,2 force a device

Postby beanz » Sun Feb 10, 2008 10:27 am

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.
beanz
Starting Member
Starting Member
 
Posts: 20
Joined: June 2007
Location: United Kingdom

Re: /dev/ttyUSB0,1,2 force a device

Postby vossie » Sun Jul 01, 2012 11:52 am

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)
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"
User avatar
vossie
Starting Member
Starting Member
 
Posts: 18
Joined: January 2009
Location: Netherlands


Return to Linux Forum

Who is online

Users browsing this forum: No registered users and 0 guests