Daniel Kreischer wrote:
we are trying to make a small embedded sensor device (Crossbow's TelosB mote)[1] talk to a SmartCard reader via a serial connection. To do so, we checked which packets are being sent by a open source linux driver to the reader and successfully replicated the behaviour manually with cutecom[2]. We then implemented a stripped down version of the driver on the mote, but when we attach the reader to it, it won't answer to the commands sent by the mote. We recognized a kind of initialization packet received by cutecom and even cat everytime we open a connection: 00 00 80 00 00 00 80 00 80 80 80 80 80 80 80 80 80 80 80 80 00 80 80 80 00 00 80 00 00 00 00 80 00 00 80 00 00 We don't seem to receive that packet when connecting the reader to the mote, though. Connecting the mote via a null modem cable to the PC and imitating the reader's responses with cutecom does work, so the driver on the mote is ok. We have already debugged the 8250.c serial kernel driver with printk()s before every outb() and inb() to the UART's registers and started writing a miniature user space driver to find out what causes the packet, but we can't exactly replicate the behaviour manually, yet. The question is: Does anybody of you know what that packet is about, and what triggers it?
If I understand you correctly, the card reader sends this init packet when connected to cutecom running on Linux but not when connected to mote? I don't know the meaning of that packet, but if it is sent by the reader when a connection is open but no data has been sent then the card reader is probably responding to a UART control signal (DTR or RTS) which is asserted when the tty device is opened. If the mote does not drive or assert these signals then the card reader may ignore data sent by the mote. I would verify that the control signals from the mote are the same state as the control signals from the Linux box. -- Paul Fulghum Microgate Systems, Ltd. -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html