Hi, All
I'm using imx6qsabresd evaluation board.
some test for the board, but it is so strange.
I've connect usb cdrom through OTG.
<phenomenon>
1) When device is recognize but driver is not loaded sometimes to /dev/cdrom.
2) Even if the driver loaded, but I don't get the event for cd load and eject.
The status is that It is cdrom locked status, I think.
In this case, should input command for "touch /dev/cdrom" and only then recognize cdrom media exist or not exist.
it is builded for build-x11, fsl-image-qt5.
Is there someone who helped me?
<dmesg : Detail message is attached>
[ 13.748614] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[ 13.753930] scsi1 : usb-storage 1-1.1:1.0
[ 14.758335] scsi 1:0:0:0: CD-ROM HL-DT-ST BD-RE BE06LU10 YE05 PQ: 0 ANSI: 0
Original Attachment has been moved to: dmesg.txt.zip
Hi, Carlos
Sure, Go AHEAD.I'm waiting your kind instruction.
Currently, I've build as manual and can adapt to any part.
and then I can modify kernel acccording to your comment, I think.
Best Regards
Hi Christian,
The experts have commented if you checked your kernel settings? These options must be selected:
Device drivers
- SCSI device support.
--- SCSI media changer support
--- SCSI CDROM support
- USB Support
--- OTG Support
Hope this will be useful for you.
Best regards!
/Carlos
Hi, Carlos
We've already selected in device drvier.
thanks.
Best Regards,
Hi Christian,
So, did you was able to add the proper configurations? It is everything working now?
Best regards!
/Carlos
Hi, Carlos
It means that your recommanded kernel configuration is already applied, but It is not working.
I'm wondering that you try to test it.
Carlos, Was success your side test with the configuration only ?
Best regards,
Hi Christian,
Based on the previous, the changer logic in already on the build. So, if what you want to know how to detect an insert or eject, a rebuild is not necessary. Mostly it boils down to polling for the mountpoint.
Neither X11 nor QT5 does auto-mount. There is no simple answer to the query, and a variety of ways to do it, like the previously suggestion of the change to fstab.
We should remind that this is an embedded system and not a desktop OS, like Ubuntu, so the choices are limited. So what works on Ubuntu may not work on an embedded OS version. Besides, some OSs define it as /dev/cdrom, others, /dev/sr0, or /dev/scd
Our BSP defines it as /dev/sr0 as seen in the listing that you provided.
Here are some suggestions from around the web:
linux - How to detect whether there is a CD-ROM in the drive? - Super User
Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi, Carlos
Unfortunately, there isn't exsit the file what you commented. I think that It is usb-storage.
I want you to look below dmesg log.
It is result of scsi cdrom setting in kernel. but it has phenomenon as first question.
If I receive cdrom's event like load and eject, I should do command "touch /dev/cdrom".
<phenomenon>
I don't get the event for cd load and eject.
The status is that It is cdrom locked status, I think.
In this case, should input command for "touch /dev/cdrom" and only then recognize cdrom media exist or not exist.
<dmesg>
[ 10.945982] usb 1-1.1: new high-speed USB device number 3 using ci_hdrc
[ 13.737970] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[ 13.744715] scsi1 : usb-storage 1-1.1:1.0
[ 14.754055] scsi 1:0:0:0: CD-ROM HL-DT-ST BD-RE BE06LU10 YE05 PQ: 0 ANSI: 0
[ 14.777072] sr0: scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray
[ 14.785341] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 14.793263] sr 1:0:0:0: Attached scsi CD-ROM sr0
[ 14.794343] sr 1:0:0:0: Attached scsi generic sg0 type 5
Hi Christian,
According with the descriptor text indicates it is a Hitachi Blu-Ray drive, and our BSP doesn’t have Blu-Ray support at all.
In order for the unit to be 'classed' as a removable storage device it has to match the IDs we keep in the /proc table. Otherwise it is classed as a storage device and nothing more.
Our device table is sparse and no BD devices are IDed in it. Ubuntu, OTOH has a robust list in which a BD drive is classified. We are an embedded OS so the tree has to be sparse.
Could you please perform the same tests but using a simple CD-drive?
Hope this will be useful for you.
Best regards!
/Carlos
Hi, Carlos,
I've already tested it, Usb DVD Writer is same result.
I think that it is not issue BD Driver or not.
The issue is very SERIOUS issue for me and us, becasue general user will connect to usb port regarding of BD drive or CD drive.
and then, I want you to test it and what does have problem and issue. you can get the information very easy.
Best Regards.
Hello Christian,
Can we get a text of the descriptors you are seeing? Particularly the line that starts with "CDROM..."
We will be waiting for your reply.
Best regards!
/Carlos
Hi, Carlos
This is LG DVD log.
This state is lock, and In this case, should input command for "touch /dev/cdrom" and only then recognize cdrom media exist or not exist.
<log>
scsi 1:0:0:0: CD-ROM HL-DT-ST DVDRAM GS40N 1.00 PQ: 0 ANSI: 0
sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
cdrom: Uniform CD-ROM driver Revision: 3.20
Best Regards.
This is log Udev log after CD-Rom insert
KERNEL[595284.957796] change /devices/pci0000:00/0000:00:14.0/usb3/3-6/3-6:1.0/host5/target5:0:0/5:0:0:0/block/sr0 (block)
ACTION=change
DEVNAME=/dev/sr0
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-6/3-6:1.0/host5/target5:0:0/5:0:0:0/block/sr0
DEVTYPE=disk
DISK_MEDIA_CHANGE=1
MAJOR=11
MINOR=0
SEQNUM=2253
SUBSYSTEM=block
UDEV [595285.294381] change /devices/pci0000:00/0000:00:14.0/usb3/3-6/3-6:1.0/host5/target5:0:0/5:0:0:0/block/sr0 (block)
ACTION=change
DEVLINKS=/dev/cdrom /dev/disk/by-id/usb-HLDS_Inc_SuperMulti_RW_001010164000450A5 /dev/disk/by-path/pci-0000:00:14.0-usb-0:6:1.0-scsi-0:0:0:0
DEVNAME=/dev/sr0
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-6/3-6:1.0/host5/target5:0:0/5:0:0:0/block/sr0
DEVTYPE=disk
DISK_MEDIA_CHANGE=1
ID_BUS=usb
ID_CDROM=1
ID_CDROM_BD=1
ID_CDROM_BD_R=1
ID_CDROM_BD_RE=1
ID_CDROM_CD=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_DVD_PLUS_R=1
ID_CDROM_DVD_PLUS_RW=1
ID_CDROM_DVD_PLUS_R_DL=1
ID_CDROM_DVD_R=1
ID_CDROM_DVD_RAM=1
ID_CDROM_DVD_RW=1
ID_CDROM_HDDVD=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_CD=1
ID_CDROM_MEDIA_SESSION_COUNT=1
ID_CDROM_MEDIA_TRACK_COUNT=18
ID_CDROM_MEDIA_TRACK_COUNT_AUDIO=18
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_FOR_SEAT=block-pci-0000_00_14_0-usb-0_6_1_0-scsi-0_0_0_0
ID_MODEL=SuperMulti_RW
ID_MODEL_ENC=SuperMulti\x20RW\x20\x20\x20
ID_MODEL_ID=1640
ID_PATH=pci-0000:00:14.0-usb-0:6:1.0-scsi-0:0:0:0
ID_PATH_TAG=pci-0000_00_14_0-usb-0_6_1_0-scsi-0_0_0_0
ID_REVISION=0159
ID_SERIAL=HLDS_Inc_SuperMulti_RW_001010164000450A5
ID_SERIAL_SHORT=001010164000450A5
ID_TYPE=floppy
ID_USB_DRIVER=usb-storage
ID_USB_INTERFACES=:080550:
ID_USB_INTERFACE_NUM=00
ID_VENDOR=HLDS_Inc
ID_VENDOR_ENC=HLDS\x20Inc
ID_VENDOR_ID=152e
MAJOR=11
MINOR=0
SEQNUM=2253
SUBSYSTEM=block
TAGS=:seat:uaccess:
USEC_INITIALIZED=90455793
Hi Christian,
Could you please specify what are you using for cdrom detection?
From the last post it looks that it is recognized. Unless there is an entry in the /etc/fstab it is not mounted. It should have a line similar, if not identical to
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
Could you please confirm?
Best regards!
/Carlos
Hi, Carlos
Sorry, Your recommadation is not adaptable solution.
You said that is a little tricky solution becasue general user will connect one or more cdrom drive at usb.
We produce Hifi Audio device, and then we don't think except cdrom detection.
Above the udev log is only can be founded, It is that I should manual command "touch /dev/cdrom".
Cdrom media is just music cd(have tracks) like in your house.
Best Regards,
Hi Christian,
You mentioned that you are using build-x11, fsl-image-qt5 right? Did you modify something when building or it is a canned image?
Experts asked if you added scsi support and cdrom insert detection turned on in the kernel, because our base kernel load will not have these turned on.
We will be waiting for your reply.
Best regards!
/Carlos
Hi Christian,
You could try checking if the proper layers and drivers were included when compiling the image. If the CDROM will be mounted over USB, the USB driver should have Mass Storage Class support, and then, mounting the CDROM driver over it.
On the following links you could find useful related information:
http://tldp.org/HOWTO/CDROM-HOWTO/
http://lxr.free-electrons.com/source/drivers/cdrom/cdrom.c
Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi, Carlos.
Thanks for your reply, buit I don't solve clearly the issue.
cdrom driver issue is solved that scsi cdrom check in kernel.
finally, I'd like to know How to detect cdrom media insert or remove.
I've tried udev, buit I detect cdrom media insert or remove.
Once if cdrom driver loaded, the state is that It is cdrom locked status, I think.
In this case, should input command for "touch /dev/cdrom" and only then detect cdrom media exist or not exist.
In Ubuntu12.04, detect possible, but I don't know how to treat method.
root@imx6qsabresd:~# uname -a
Linux imx6qsabresd 3.10.53-1.1.0_ga+g4742c51 #1 SMP PREEMPT Thu May 28 16:04:52 KST 2015 armv7l GNU/Linux
Regards,
Christian.
Hi Christian,
Do you know the manufacturer of the USB-PATA or USB-SATA used to connect to the CDROM?
It seems the chipset that does the conversion from the CDROM to the USB, does not have a compatible driver in our BSP.
Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi, CarlosCasillas,
I don't know What interface is, if USB-PATA or USB-SATA.
but It is clearly that it is not conversion issue why it is very general usb cdrom.
I do test in various linux os. for example, in ubuntu14.04(Linux dev-H81M-DS2V 3.16.0-37-generic #51~14.04.1-Ubuntu), usb cdrom detected very well.
What difference does have the kernel driver ?
Best Regards,
Hi Christian,
What is the result of 'cat /proc/scsi/device_info' ? Can you post the output?
In the case of other Linux distros they may have device list that is robust enough to detect the unit and identify as part of their kernel build. Our build tends to be 'sparse', and when it mounts it just mounts it as a generic scsi storage device if it is unrecognized.
The text "CD-ROM HL-DT-ST BD-RE BE06LU10 YE05 PQ: 0 ANSI: 0" indicates it is a Hitachi Blu-ray and is not recognized as such because our build does not have a matching ID for BD-RE devices. That is why we asked if you know the brand and model of the drive.
Hope this will be useful for you.
Best regards!
/Carlos