On 10/03/2011 03:36 PM, James Courtier-Dutton wrote:
2011/8/29 Antti Palosaari<crope@xxxxxx>:
Only De facto serial smartcard protocol is so called Phoenix/Smartmouse,
implementing new protocol is totally dead idea. It will never got any
support.
There is already such drivers, at least Infinity Unlimited USB Phoenix
driver (iuu_phoenix.c). It uses USB-serial driver framework and some small
emulation for Phoenix protocol. Look that driver to see which kind of
complexity it adds. Anysee have *just* same situation.
I helped write the iuu_phoenix.c driver.
With regards to "The character device supports two ioctl's (see
anysee_sc), one for
detecting the presence of a card, the other one for resetting the card
and querying the ATR."
The iuu_phoenix.c driver uses standard phoenix/smartmouse reset and
atr controls. (i.e. with DCD, DTR, RTS, CTS lines etc)
As the result the iuu_phoenix.c driver works out of the box with oscam.
It might be a good idea to use a similar interface for your driver.
The result would be that your driver would work out of the box with
oscam as well as other user space programs that read smart cards.
The problem would be if you wished to support smart card program
capabilities, the Phoenix/Smartmouse interface does not support that.
If I add programmer functionallity to the iuu_phoenix driver, I would
probably add an IOCTL for it.
Thank you for the feedback. I already did that. See latest tree:
http://git.linuxtv.org/anttip/media_tree.git/shortlog/refs/heads/anysee
Adding IOCTLs and making new userspace IFD was István idea / propose.
Interface is now de facto standard Phoenix. Unfortunately it is not very
compatible yet. I used oscam as client during development mainly since
as a open source it was easy to look and add debugs to see what kind of
protocol is. Unfortunately I did mistake and removed accidentally my
original tree and was forced to rewrite it. At that point oscam stopped
working, but it is surely small bug. I suspect .set_termios() or
.tiocmget() or .tiocmset().
Currently device name and location are under the discussion. Mainly,
should that device be under /dev/tty* as other character devices or
under /dev/dvb/adapterN/ as a property of DVB card.
regards
Antti
--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html