Bug 1421387 - cannot connect a MCS7780 USB IR adapter
cannot connect a MCS7780 USB IR adapter
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: irda-utils (Show other bugs)
24
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Dmitry Butskoy
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-11 17:34 EST by Alessandro Volpi
Modified: 2017-07-22 11:33 EDT (History)
3 users (show)

See Also:
Fixed In Version: irda-utils-0.9.18-29.fc25 irda-utils-0.9.18-29.fc24 irda-utils-0.9.18-12.el6 irda-utils-0.9.18-18.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-22 12:24:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Output of lsusb, locate mcs7780 and iwconfig commands (2.39 KB, text/plain)
2017-02-11 17:34 EST, Alessandro Volpi
no flags Details

  None (edit)
Description Alessandro Volpi 2017-02-11 17:34:24 EST
Created attachment 1249406 [details]
Output of lsusb,  locate mcs7780 and iwconfig commands

Description of problem: no way for connecting an external device (Uwatec Galileo Sol dive computer) through a MCS7780 USB adapter


Version-Release number of selected component (if applicable):0.9.18-23.fc24


How reproducible: everytime


Steps to Reproduce:
1.insert the USB adapter
2.verify it is recognized by the system
3.issue the command irattach irda0

Actual results:nothing happens


Expected results:the USB adapter IR light should blink and the connection should be activated


Additional info: the USB adapter is recognized (see attachment) but irattach does not work; the driver is present on the system (see attachment) ; iwconfig finds a irda0 interface (see attachment).

I am sure that the hardware is working properly, since a Windows XP Virtual Machine (VirtualBox), launched from the same Fedora 24 system on the same PC and with the same USB adapter can connect the MCS 7780 and download or upload data from/to the dive computer.

I have also a laptop XPS 13 Developer Edition with Ubuntu Trusty Tahr; when I insert the USB adpter it is automatically mounted and its IR light blinks; the linux Subsurface software, a project initiated by Linus Torvalds and now maintained by Dirk Hohndel, is able to download the dive computer data through /dev/ttyS31.

Since no irda configuration file is present in the system I have tried to copy the Ubuntu /etc/default/irda-utils to my Fedora 24 system, but nothing seems to be changed.
Comment 1 Dmitry Butskoy 2017-02-11 18:48:39 EST
It seems that your hardware is "SMC related", and probably requires initialization by the "smcinit" command. But smcinit was disabled in 2006 for already unknown reason...

I rebuild with smcinit re-enabled.

Could you please test the new package:
https://kojipkgs.fedoraproject.org//work/tasks/9294/17809294/irda-utils-0.9.18-25.fc24.x86_64.rpm
and report results here?

It looks that you should insert your USB adapter, then run smcinit (probably with some options), then run the irda service as usual. 
Certainly it would be better to work out-of-the-box rather than manually, but I'm afraid we cannot find enough man power for this ancient upstream-stalled project now...
Comment 2 Alessandro Volpi 2017-02-12 17:24:05 EST
Dear Dmitry,
Thanks for your prompt answer.

The following operations have been executed:

1) erasing the installed irda-utils version with "dnf erase irda-utils".
2) erasing the configuration file copied from my Ubuntu laptop
3) downloading https://kojipkgs.fedoraproject.org  ...
4) installing it as root (command rpm -hiv ...) ; no error msg ; everything OK
5) reading the scminit man page ( installed with the rpm )
6) inserting the MCS 7780 USB adapter; the system message was :
   thunar-volman: Unsupported USB device type "usb".
   thunar-volman: Unsupported USB device type "mcs7780".
   I have verified that file /mcs7780.ko.xz is still present in my system.
7) trying to run scminit ; result : #smcinit
                                   bash: smcinit: command not found
8) #updatedb
9) #locate smcinit
   /usr/share/man/man8/smcinit.8.gz
   /usr/share/man/man8/tosh1800-smcinit.8.gz

The rpm has installed the mscinit man pages but no executable has been installed.
I have read the man pages; according to it scminit is used to initialize the SMSC IrDA controler on various laptops.

My computer is a desktop workstation Fujitsu Celsium. In any case the mscinit executable in not present in my system.

Very best regards.

Alessandro
Comment 3 Dmitry Butskoy 2017-02-12 20:42:59 EST
Sorry, some rare case when the package was successfully built regardless of compile errors during the build.

Please, try this one:
https://kojipkgs.fedoraproject.org//packages/irda-utils/0.9.18/29.fc24/x86_64/irda-utils-0.9.18-29.fc24.x86_64.rpm
Comment 4 Alessandro Volpi 2017-02-13 04:29:53 EST
I have installed the new rpm :

rpm -hUv irda-utils-0.9.18-29.fc24.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:irda-utils-0.9.18-29.fc24        ################################# [ 50%]
Cleaning up / removing...
   2:irda-utils-0.9.18-25.fc24        ################################# [100%]

After inserting the mcs7780 (no blinkink IR transmiter):

[downloads]#smcinit -v
smcinit 0.5cvs

SIR ioport: 0x3f8
FIR ioport: 0x130
FIR interupt: 3
FIR DMA: 3

Detected IO hub vendor id: 0x8086
smcinit IO hub device 3b16 not 82801CAM (0x248c or 0x24cc)

Nothing happens even after having issued the command irattach irda0

I do not understand the meaning of smcinit output, since the only available IR adapter is : 0x002 0x003 ID 9710:7780 : 

[downloads]#lsusb
Bus 002 Device 005: ID 03f0:8211 Hewlett-Packard 
Bus 002 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 002 Device 003: ID 04b8:0118 Seiko Epson Corp. GT-F600 [Perfection 4180]
Bus 002 Device 006: ID 9710:7780 MosChip Semiconductor MCS7780 4Mbps Fast IrDA Adapter
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0bda:0151 Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader)
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

My problem is that I have no knowledge about the internal irda interface. Perhaps the issue is not due to a bug, but simply some missing configuration file . I remember of having used the mcs7780 running a Java Application on a old Fedora version of the Jurassic era. I do not remember the details but I remember that it was just working, as it is when I insert the IR adapter in my laptop with Ubuntu trusty.

Best regards.

Alessandro
Comment 5 Dmitry Butskoy 2017-02-13 13:13:18 EST
> as it is when I insert the IR adapter in my laptop with Ubuntu trusty.

Last chance is to explore the similar irda-utils package on your Ubuntu system (or how they package it for distribution). It might give you a hint what to do further.

We have no enough knowledge for irda from our side for now too...
Comment 6 Fedora Update System 2017-02-13 19:44:24 EST
irda-utils-0.9.18-29.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-55886b186b
Comment 7 Fedora Update System 2017-02-13 19:45:01 EST
irda-utils-0.9.18-29.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-e98fa806b4
Comment 8 Fedora Update System 2017-02-13 19:45:45 EST
irda-utils-0.9.18-18.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-916fd6c9d5
Comment 9 Fedora Update System 2017-02-13 19:46:13 EST
irda-utils-0.9.18-12.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-38b1c49c50
Comment 10 Fedora Update System 2017-02-14 17:21:56 EST
irda-utils-0.9.18-29.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-e98fa806b4
Comment 11 Fedora Update System 2017-02-14 18:21:35 EST
irda-utils-0.9.18-29.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-55886b186b
Comment 12 Fedora Update System 2017-02-14 22:50:02 EST
irda-utils-0.9.18-18.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-916fd6c9d5
Comment 13 Fedora Update System 2017-02-15 10:45:48 EST
irda-utils-0.9.18-12.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-38b1c49c50
Comment 14 Fedora Update System 2017-02-22 12:24:26 EST
irda-utils-0.9.18-29.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2017-02-22 12:51:47 EST
irda-utils-0.9.18-29.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 16 Jeremie R. 2017-02-27 14:14:29 EST
Don't know if it's the right place, else I will create a new ticket on kernel.
When I launch irattach irda0 -s, it fails. With 4.5.5 kernel, everything run like a charm.

Now:
Feb 27 20:13:27 laptop-freetibet sudo[19099]:  jeremie : TTY=pts/0 ; PWD=/home/jeremie ; USER=root ; COMMAND=/sbin/irattach irda0 -s
Feb 27 20:13:27 laptop-freetibet audit[19099]: USER_CMD pid=19099 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/jeremie" cmd=6972617474616368206972646130202D73 terminal=pts/0 res=succe
Feb 27 20:13:27 laptop-freetibet audit[19099]: CRED_REFR pid=19099 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? a
Feb 27 20:13:27 laptop-freetibet audit[19099]: USER_START pid=19099 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_syste
Feb 27 20:13:27 laptop-freetibet sudo[19099]: pam_systemd(sudo:session): Cannot create session: Already running in a session
Feb 27 20:13:27 laptop-freetibet sudo[19099]: pam_unix(sudo:session): session opened for user root by (uid=0)
Feb 27 20:13:27 laptop-freetibet irattach[19100]: executing: '/sbin/modprobe irda0'
Feb 27 20:13:27 laptop-freetibet irattach[19100]: + modprobe: FATAL: Module irda0 not found in directory /lib/modules/4.9.11-200.fc25.x86_64
Feb 27 20:13:27 laptop-freetibet irattach[19100]: Trying to load module irda0 exited with status 1
Feb 27 20:13:27 laptop-freetibet audit[19099]: USER_END pid=19099 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_system
Feb 27 20:13:27 laptop-freetibet audit[19099]: CRED_DISP pid=19099 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? a
Feb 27 20:13:27 laptop-freetibet sudo[19099]: pam_unix(sudo:session): session closed for user root
Feb 27 20:13:27 laptop-freetibet irattach[19104]: executing: 'echo laptop-freetibet > /proc/sys/net/irda/devname'
Feb 27 20:13:27 laptop-freetibet irattach[19104]: executing: 'echo 1 > /proc/sys/net/irda/discovery'
Feb 27 20:13:27 laptop-freetibet irattach[19104]: Starting device irda0
Feb 27 20:13:27 laptop-freetibet irattach[19104]: ioctl(SIOCSIFFLAGS): Resource temporarily unavailable
Feb 27 20:13:27 laptop-freetibet irattach[19104]: Stopping device irda0
Feb 27 20:13:27 laptop-freetibet irattach[19104]: exiting ...
Feb 27 20:13:27 laptop-freetibet kernel: Basic transceiver setup error

lsusb:
Bus 001 Device 009: ID 9710:7780 MosChip Semiconductor MCS7780 4Mbps Fast IrDA Adapter

I test with irda-utils-0.9.18.fc25 and kernel-4.9.11-200.fc25.x86_64.
Comment 17 Dmitry Butskoy 2017-02-27 14:25:02 EST
> FATAL: Module irda0 not found in directory /lib/modules/4.9.11-200.fc25.x86_64

Looks like a kernel or udev issue.

It seems that when you use kernel-4.5.5, there is a proper modprobe alias (alias irda0 <something>), which should be set by something like udev. After updating to your new kernel this mechanism no more work...
Comment 18 Jeremie R. 2017-02-27 15:49:08 EST
Here the fun:

Another laptop but with kernel 4.5.5-300.fc24.x86_64.

févr. 27 21:30:39 laptop.rapin sudo[2677]:    rapin : TTY=pts/0 ; PWD=/home/rapin ; USER=root ; COMMAND=/sbin/irattach irda0 -s
févr. 27 21:30:39 laptop.rapin audit[2677]: USER_CMD pid=2677 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/rapin" cmd=6972617474616368206972646
févr. 27 21:30:39 laptop.rapin audit[2677]: CRED_REFR pid=2677 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_unix acct="root" exe=
févr. 27 21:30:39 laptop.rapin sudo[2677]: pam_systemd(sudo:session): Cannot create session: Already running in a session
févr. 27 21:30:39 laptop.rapin audit[2677]: USER_START pid=2677 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_lim
févr. 27 21:30:39 laptop.rapin sudo[2677]: pam_unix(sudo:session): session opened for user root by rapin(uid=0)
févr. 27 21:30:39 laptop.rapin irattach[2681]: executing: '/sbin/modprobe irda0'
févr. 27 21:30:39 laptop.rapin irattach[2681]: + modprobe: FATAL: Module irda0 not found in directory /lib/modules/4.5.5-300.fc24.x86_64
févr. 27 21:30:39 laptop.rapin irattach[2681]: Trying to load module irda0 exited with status 1
févr. 27 21:30:39 laptop.rapin sudo[2677]: pam_unix(sudo:session): session closed for user root
févr. 27 21:30:39 laptop.rapin audit[2677]: USER_END pid=2677 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limi
févr. 27 21:30:39 laptop.rapin audit[2677]: CRED_DISP pid=2677 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_unix acct="root" exe=
févr. 27 21:30:39 laptop.rapin irattach[2685]: executing: 'echo laptop > /proc/sys/net/irda/devname'
févr. 27 21:30:39 laptop.rapin irattach[2685]: executing: 'echo 1 > /proc/sys/net/irda/discovery'
févr. 27 21:30:39 laptop.rapin irattach[2685]: Starting device irda0

But as you can see, the irda device works at the end, even if the modprobe fails.
It seems that something went wrong during the configuration of the msc7780 since the 4.9.x.

Do you thing that a kernel bug should be open? Or you wanna investigate?

Kind regards and many thanks for your help.

Jérémie R.
Comment 19 Dmitry Butskoy 2017-02-27 15:53:55 EST
> Do you thing that a kernel bug should be open?
Yes.
Comment 20 Fedora Update System 2017-03-03 01:18:32 EST
irda-utils-0.9.18-12.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
Comment 21 Fedora Update System 2017-03-03 01:20:29 EST
irda-utils-0.9.18-18.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
Comment 22 Thomas Jarosch 2017-07-22 11:33:15 EDT
Upstream bug report:
https://bugzilla.kernel.org/show_bug.cgi?id=195217

I've posted a patch to fix the issue. It was also sent to netdev.
It's not too unlikely that it will land upstream and in -stable.

Note You need to log in before you can comment on or make changes to this bug.