LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-06-2016, 05:52 PM   #1
gobo7
LQ Newbie
 
Registered: Aug 2012
Posts: 29

Rep: Reputation: Disabled
ftdi and udev rules questions, 13.37


i'm working on a 13.37 machine with some ftdi devices. there are some things going on that i don't understand.

after a reboot, ftdi_sio and usbserial are not loaded. i can plug in an ftdi device, it does get detected, but no tty port is assigned. this can be seen in both var/log/messages and udevadm.

run modprobe ftdi_sio, and nothing changes.
run modprobe ftdi_sio vendor=0x0403 product=0x6015. both ftdi_sio and usbserial are then loaded and the device is assigned ttyUSB0.

first question -- why did i have to specify that exact device before a ttyUSB* would be assigned?

next i worked on some udev rules with the actual intent of defining which ttyUSB* would be assigned. something like ttyUSB9, so it would always be the same. could not get that to work. it always went to ttyUSB0.

where i quit last night was this rule:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", ATTRS{serial}=="DN01DVGJ", RUN+="/sbin/modprobe ftdi_sio vendor=0x0403 product=0x6015", MODE="0666", SYMLINK+="redboard"

at least this got the port up and with the correct permissions for the application to work.

second question -- why can i not define the ttyUSB* port this device will be assigned?


thanks in advance for any and all suggestions.
 
Old 09-06-2016, 06:48 PM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 5,299

Rep: Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044
Quote:
Originally Posted by gobo7 View Post
where i quit last night was this rule:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", ATTRS{serial}=="DN01DVGJ", RUN+="/sbin/modprobe ftdi_sio vendor=0x0403 product=0x6015", MODE="0666", SYMLINK+="redboard"

at least this got the port up and with the correct permissions for the application to work.

second question -- why can i not define the ttyUSB* port this device will be assigned?
I just looked at the 70-persistent-net.rules file in my /etc/udev/rules.d/ folder. In there, the device is defined with the name= variable. Have you tried that?

Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", ATTRS{serial}=="DN01DVGJ", RUN+="/sbin/modprobe ftdi_sio vendor=0x0403 product=0x6015", MODE="0666", SYMLINK+="redboard", name="ttyUSB9"
 
Old 09-06-2016, 08:09 PM   #3
gobo7
LQ Newbie
 
Registered: Aug 2012
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
I just looked at the 70-persistent-net.rules file in my /etc/udev/rules.d/ folder. In there, the device is defined with the name= variable. Have you tried that?

Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", ATTRS{serial}=="DN01DVGJ", RUN+="/sbin/modprobe ftdi_sio vendor=0x0403 product=0x6015", MODE="0666", SYMLINK+="redboard", name="ttyUSB9"
i don't remember testing with symlink and name together. so i did and it sorta worked. that made /dev/redboard symlinked to /dev/ttyUSB9, but there is also a ttyUSB0. both USB0 and USB9 can access the ftdi device.

something is making the USB0 that i'm missing...

thanks.
 
Old 09-06-2016, 10:32 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 5,299

Rep: Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044
I'm not at a computer where I can test adding devices to a system, but you could try monitoring udev with:

Code:
udevadm monitor
This might give you an idea of where ttyUSB0 is being created.
 
Old 09-07-2016, 09:10 PM   #5
gobo7
LQ Newbie
 
Registered: Aug 2012
Posts: 29

Original Poster
Rep: Reputation: Disabled
found the answer to my first question. with ftdi_sio.c, there is a file ftdi_sio_ids.h that contains definitions for the chips. the chip i'm using is an FT231XS. the definition file for ubuntu 14.04 contains that chip, the file for 13.37 does not. apparently, if the chip is not known to ftdi_sio, then it must be declared when the module is loaded.
 
Old 09-07-2016, 09:45 PM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 5,299

Rep: Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044
That makes sense. Slackware 13.37 was released in 2011, where Ubuntu 14.04 was in 2014. That addition to the file was likely added to a kernel after the one included in 13.37.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] udev/rules.d and FTDI CollieJim Arch 2 05-16-2014 11:27 PM
RKHunter ASCII text in /dev/.udev/rules.d/root.rules metrx Linux - Security 2 03-07-2014 08:37 AM
Slack 13.1 : /etc/udev/rules.d70-persistent-net.rules Ramurd Slackware 10 02-18-2011 09:56 AM
cat: /etc/udev/rules.d/70-persistent-net.rules: No such file or directory rcg1984 Linux From Scratch 2 09-17-2008 07:02 AM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 03:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration