Welcome, Guest
Username: Password: Remember me
25 Jul 2018
Glad to announce of release of INDI Library v1.7.4 on 2018-07-25. A few drivers were added in this release as we continue to improve & stabilize existing drivers.
Read More...
  • Page:
  • 1

TOPIC: Port failure Error: Inappropriate ioctl for device.

Port failure Error: Inappropriate ioctl for device. 2 days 21 hours ago #28513

  • Gonzothegreat
  • Gonzothegreat's Avatar Topic Author
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1238
  • Karma: 3
  • Thank you received: 90
I have been using the following udev rule for a while now, working great until very recently.
# HEQ5 mount
SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", ATTR{manufacturer}=="Prolific Technology Inc.", MODE="0777", SYMLINK+="Mount"

It does create /dev/Mount as expected.
lrwxrwxrwx 1 root root          15 Aug 12 22:32 Mount -> bus/usb/001/079
crw-rw---- 1 root dialout 188,   1 Aug 12 22:32 ttyUSB1

My EQmod is set to connect to that device, so far so good until recently where I get the following issue:
[ERROR] Failed to connect to port (/dev/Mount). Error: Port failure Error: Inappropriate ioctl for
device. Check if device is connected to this port.

dmesg:
[398112.100972] pl2303 1-1.2.3.2:1.0: pl2303 converter detected
[398112.102629] usb 1-1.2.3.2: pl2303 converter now attached to ttyUSB1

However, if I select /tty/USB1 directly in Eqmod, it connects without a fuss.


Any help is appreciated, thanks

root@heidenrod-obs:/home# udevadm info -n /dev/Mount 
P: /devices/lm1/usb1/1-1/1-1.2/1-1.2.3/1-1.2.3.2
N: bus/usb/001/079
S: Mount
E: BUSNUM=001
E: DEVLINKS=/dev/Mount
E: DEVNAME=/dev/bus/usb/001/079
E: DEVNUM=079
E: DEVPATH=/devices/lm1/usb1/1-1/1-1.2/1-1.2.3/1-1.2.3.2
E: DEVTYPE=usb_device
E: DRIVER=usb
E: ID_BUS=usb
E: ID_MODEL=USB-Serial_Controller
E: ID_MODEL_ENC=USB-Serial\x20Controller
E: ID_MODEL_FROM_DATABASE=PL2303 Serial Port
E: ID_MODEL_ID=2303
E: ID_REVISION=0300
E: ID_SERIAL=Prolific_Technology_Inc._USB-Serial_Controller
E: ID_USB_INTERFACES=:ff0000:
E: ID_VENDOR=Prolific_Technology_Inc.
E: ID_VENDOR_ENC=Prolific\x20Technology\x20Inc.
E: ID_VENDOR_FROM_DATABASE=Prolific Technology, Inc.
E: ID_VENDOR_ID=067b
E: MAJOR=189
E: MINOR=78
E: PRODUCT=67b/2303/300
E: SUBSYSTEM=usb
E: TYPE=0/0/0
E: USEC_INITIALIZED=398115350936

root@heidenrod-obs:/home# udevadm info -n /dev/ttyUSB1 
P: /devices/lm1/usb1/1-1/1-1.2/1-1.2.3/1-1.2.3.2/1-1.2.3.2:1.0/ttyUSB1/tty/ttyUSB1
N: ttyUSB1
S: serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0
E: DEVLINKS=/dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0
E: DEVNAME=/dev/ttyUSB1
E: DEVPATH=/devices/lm1/usb1/1-1/1-1.2/1-1.2.3/1-1.2.3.2/1-1.2.3.2:1.0/ttyUSB1/tty/ttyUSB1
E: ID_BUS=usb
E: ID_MODEL=USB-Serial_Controller
E: ID_MODEL_ENC=USB-Serial\x20Controller
E: ID_MODEL_FROM_DATABASE=PL2303 Serial Port
E: ID_MODEL_ID=2303
E: ID_REVISION=0300
E: ID_SERIAL=Prolific_Technology_Inc._USB-Serial_Controller
E: ID_TYPE=generic
E: ID_USB_DRIVER=pl2303
E: ID_USB_INTERFACES=:ff0000:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=Prolific_Technology_Inc.
E: ID_VENDOR_ENC=Prolific\x20Technology\x20Inc.
E: ID_VENDOR_FROM_DATABASE=Prolific Technology, Inc.
E: ID_VENDOR_ID=067b
E: MAJOR=188
E: MINOR=1
E: SUBSYSTEM=tty
E: TAGS=:systemd:
E: USEC_INITIALIZED=398115364254

root@heidenrod-obs:/home#

Please Log in or Create an account to join the conversation.

Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / Atik titan / Atik 314L+
Last Edit: by Gonzothegreat.

Re:Port failure Error: Inappropriate ioctl for device. 2 days 9 hours ago #28537

These are clearly not the same device, see the major/minor? Another device is detected as a prolific serial converter and is taking the symlink. You need to be more restrictive on the device selection in the udev rule.

-Eric

Please Log in or Create an account to join the conversation.

Port failure Error: Inappropriate ioctl for device. 2 days 29 minutes ago #28568

  • Gonzothegreat
  • Gonzothegreat's Avatar Topic Author
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1238
  • Karma: 3
  • Thank you received: 90
Hello Eric,

I only have one adapter plugged in, it's a symlink through udev rules.
Something has changed, I need to figure it out. yes I agree the major an minor are different.

Please Log in or Create an account to join the conversation.

Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / Atik titan / Atik 314L+

Re:Port failure Error: Inappropriate ioctl for device. 1 day 23 hours ago #28571

Change logging level of the udev daemon with "udevadm control --log-priority=info". Plug out, run "dmesg -Hw", plug in. You should see what is happening perhaps.

-Eric

Please Log in or Create an account to join the conversation.

Re:Port failure Error: Inappropriate ioctl for device. 1 day 23 hours ago #28572

Oh sorry now I see it! You need to filter the "tty" subsystem in your udev rule, not the "usb" subsystem. What you are interested in is the device that offer serial transfer features...

-Eric

Please Log in or Create an account to join the conversation.

Port failure Error: Inappropriate ioctl for device. 1 day 22 hours ago #28575

  • Gonzothegreat
  • Gonzothegreat's Avatar Topic Author
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 1238
  • Karma: 3
  • Thank you received: 90
ok, I shall amend the rule and see how it goes. Will report soon.

Please Log in or Create an account to join the conversation.

Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / Atik titan / Atik 314L+
Last Edit: by Gonzothegreat.
  • Page:
  • 1
Time to create page: 0.115 seconds

Login



3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!


Gallery

Replica

Why INDI

Replica