LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   totally rookie fighting with USB (https://www.linuxquestions.org/questions/linux-newbie-8/totally-rookie-fighting-with-usb-532028/)

donald_duck 02-24-2007 12:29 PM

totally rookie fighting with USB
 
:confused:

hallo, I have a USB smart card reader.

the unit is present if I list the USB devices.

the /dev was not having any ttyUSB and I managed to add ttySUB0 and ttyUSB1.

I can not find any info on how to connect my card readerto the ttyUSB dev.

thank you forthe precious help and ciao!

osor 02-24-2007 01:33 PM

Quote:

Originally Posted by donald_duck
:confused:

hallo, I have a USB smart card reader.

the unit is present if I list the USB devices.

the /dev was not having any ttyUSB and I managed to add ttySUB0 and ttyUSB1.

I can not find any info on how to connect my card readerto the ttyUSB dev.

thank you forthe precious help and ciao!

Generally, USB smart-card readers do not require direct serial access. If you have the usb-storage driver (try doing “modprobe usb-storage”), your smart-card readers should show up under /dev as block devices (e.g., /dev/sd[a-z] depending on your other block devices) which are mountable just as any other block device.

donald_duck 02-24-2007 04:09 PM

hallo Osor, my problem is that I must use it as a serial device.

my Debian PC is working as a card server for my network.

in any case I have given the command modprobe usb-storage and it did notshow up....

thank you and ciao!

osor 02-24-2007 04:31 PM

Quote:

Originally Posted by donald_duck
hallo Osor, my problem is that I must use it as a serial device.

my Debian PC is working as a card server for my network.

in any case I have given the command modprobe usb-storage and it did notshow up....

thank you and ciao!

I don’t understand… what do you mean by “card server”? How do you intend you use a type of storage as a serial device?

Did the block devices show up? What’s the output of dmesg?

Electro 02-24-2007 05:27 PM

Some distributions do not have a certain setting correctly set that provides more than a certain amount of luns (a SCSI term). Setting this is done before compiling the kernel. Post the print out of "zcat /proc/config.gz".

Make sure sd_mod or sd-mod and usb-storage or usb_storage are loaded. Having sd_mod as built-in breaks USB storage in Linux.

Some people inserted a card in the reader before attaching to the computer and then it came up as a drive. Others have the card reader connected and inserted the card in the card reader. In a few seconds later fdisk shows the card as a drive. Some manufactures sell Linux compatible card readers while others do not state that it works in Linux. It is a trial and error.

ttyUSB is for USB to serial adapters.

donald_duck 02-25-2007 02:42 AM

hallo mens, thank you for tacking the time to answer to my question.

I will be more precise.

the debian computer I have (laying under the roof) is acting as a file server (samba shares) and as a card server for my satellite TV network.

on it I am running a conditional access emulator that talks to the card - cards that are connected to it and its hares the subscription on all the satellite receivers there are on my network (obviously satellite receiver with linux operating system (dreambox7000 and so on...)

now I have one phoeninx (a card reader) interface connected to tyhe COM1 of the PC but due to the slowness of the COM1 chain I see from time to time some interruption of the images on the sat receivers attached to it.

I have sourced a USB card reader that has a much quicker communication speed, I installed usbview and I can see it on the list of USB deices but I am not able to assign it to thye ttyUSB0 that I have created. I need help on this

in fact even of the emulation softare is has been written to communicate via serial I can telli him to use another tty (I will change ttyS0 with ttyUSB0). in fact I must emulate a serialcommunication.

at least, I think it shoud work! ;-)

ciao!!!

Electro 02-25-2007 11:54 AM

If I understand you right, the interface that the software can only handle is serial communication to read card and you thought that a USB card reader will work. This will not happen because USB storage and serial communication are two different connections. One creates an input/output device while the other shows up like a disk node (/dev/sda, /dev/sdb, /dev/sdc, ...).

You will have to invest time to learn C or C++ to change the code to the emulation software. Another way is to create an awkward wrapper that converts serial communication to USB storage, but I do not think this is feasible. I suggest stick with serial communication or change the code of the emulation software to access disk nodes like /dev/sda.

donald_duck 02-26-2007 06:31 AM

OK all this said, how can I bind a USB device to ttyUSB0?

ciao

Electro 02-26-2007 01:51 PM

Get an USB to serial adaptor. The kernel should detect it and load the proper modules.


All times are GMT -5. The time now is 07:28 AM.