All of lore.kernel.org
 help / color / mirror / Atom feed
* USB Smart Card reader
@ 2012-02-25 10:01 James Courtier-Dutton
  2012-02-25 16:41 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: James Courtier-Dutton @ 2012-02-25 10:01 UTC (permalink / raw)
  To: linux-serial

Hi,

I have done some development work on the iuu_phoenix.c driver in the
Linux kernel.
The iuu_phoenix is a smart card reader.
The smart card reader can be given a unique identification string of
16 characters/hex bytes. This ID can be read when the card reader is
inserted into the USB port.
I would like to be able to set up device names in /dev so that when
inserting a card reader into the USB port, it always will appear with
the same unique name in /dev.
Similar to the by-uuid used for hard disk drives.
Can someone tell me how to do this, or probably better, point me to an
existing driver that does it within the linux/drivers/usb/serial tree.

Kind Regards

James

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: USB Smart Card reader
  2012-02-25 10:01 USB Smart Card reader James Courtier-Dutton
@ 2012-02-25 16:41 ` Greg KH
  2012-02-27 20:17   ` James Courtier-Dutton
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2012-02-25 16:41 UTC (permalink / raw)
  To: James Courtier-Dutton; +Cc: linux-serial

On Sat, Feb 25, 2012 at 10:01:17AM +0000, James Courtier-Dutton wrote:
> Hi,
> 
> I have done some development work on the iuu_phoenix.c driver in the
> Linux kernel.
> The iuu_phoenix is a smart card reader.
> The smart card reader can be given a unique identification string of
> 16 characters/hex bytes. This ID can be read when the card reader is
> inserted into the USB port.
> I would like to be able to set up device names in /dev so that when
> inserting a card reader into the USB port, it always will appear with
> the same unique name in /dev.
> Similar to the by-uuid used for hard disk drives.

Your distro should already have /dev/serial/ which provides this for you
automatically.  Have you used that and found it somehow lacking?

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: USB Smart Card reader
  2012-02-25 16:41 ` Greg KH
@ 2012-02-27 20:17   ` James Courtier-Dutton
  2012-02-27 20:36     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: James Courtier-Dutton @ 2012-02-27 20:17 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-serial

On 25 February 2012 16:41, Greg KH <greg@kroah.com> wrote:
> On Sat, Feb 25, 2012 at 10:01:17AM +0000, James Courtier-Dutton wrote:
>> Hi,
>>
>> I have done some development work on the iuu_phoenix.c driver in the
>> Linux kernel.
>> The iuu_phoenix is a smart card reader.
>> The smart card reader can be given a unique identification string of
>> 16 characters/hex bytes. This ID can be read when the card reader is
>> inserted into the USB port.
>> I would like to be able to set up device names in /dev so that when
>> inserting a card reader into the USB port, it always will appear withudev
>> the same unique name in /dev.
>> Similar to the by-uuid used for hard disk drives.
>
> Your distro should already have /dev/serial/ which provides this for you
> automatically.  Have you used that and found it somehow lacking?
>

My question is how to I get the card reader ID, that is going to be
read by a special usb request, to influence the name of the
/dev/serial device name.
If the first card reader has ID: 0001, and the second has the ID:
0002. The IDs are programmed into the EEPROM of the card reader. I
would like the IDs to be passed to udev so that even if only one card
reader with ID:0002 is plugged in, it always gets the same name in
/dev/serial
The reason for this, is so that someone can look at the device name in
/dev/serial and then know exactly which physical device it applies to.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: USB Smart Card reader
  2012-02-27 20:17   ` James Courtier-Dutton
@ 2012-02-27 20:36     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2012-02-27 20:36 UTC (permalink / raw)
  To: James Courtier-Dutton; +Cc: linux-serial

On Mon, Feb 27, 2012 at 08:17:50PM +0000, James Courtier-Dutton wrote:
> On 25 February 2012 16:41, Greg KH <greg@kroah.com> wrote:
> > On Sat, Feb 25, 2012 at 10:01:17AM +0000, James Courtier-Dutton wrote:
> >> Hi,
> >>
> >> I have done some development work on the iuu_phoenix.c driver in the
> >> Linux kernel.
> >> The iuu_phoenix is a smart card reader.
> >> The smart card reader can be given a unique identification string of
> >> 16 characters/hex bytes. This ID can be read when the card reader is
> >> inserted into the USB port.
> >> I would like to be able to set up device names in /dev so that when
> >> inserting a card reader into the USB port, it always will appear withudev
> >> the same unique name in /dev.
> >> Similar to the by-uuid used for hard disk drives.
> >
> > Your distro should already have /dev/serial/ which provides this for you
> > automatically.  Have you used that and found it somehow lacking?
> >
> 
> My question is how to I get the card reader ID, that is going to be
> read by a special usb request, to influence the name of the
> /dev/serial device name.
> If the first card reader has ID: 0001, and the second has the ID:
> 0002. The IDs are programmed into the EEPROM of the card reader. I
> would like the IDs to be passed to udev so that even if only one card
> reader with ID:0002 is plugged in, it always gets the same name in
> /dev/serial
> The reason for this, is so that someone can look at the device name in
> /dev/serial and then know exactly which physical device it applies to.

If the card reader's "id" shows up in the serial number of the USB
device, /dev/serial/ will reflect this in the naming of the symlinks it
generates for the device.

Try it and see :)

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-27 20:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-25 10:01 USB Smart Card reader James Courtier-Dutton
2012-02-25 16:41 ` Greg KH
2012-02-27 20:17   ` James Courtier-Dutton
2012-02-27 20:36     ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.