I'm trying to make printing work more smoothly with IRDA devices.
I've got it working with my ONE test printer but there are some things
that I haven't been able to work out.
1) In particular right now my one printer appears on
/dev/irlpt0. However, if I were to have two printers how do I know
which one is /dev/irlpt0 /dev/irlpt1?
2) What would /proc/net/irda/discovery look like if there were more than
one printer in range? With one device I have:
IrLMP: Discovery log:
nickname: HP LaserJet 4050, hint: 0x0900, saddr: 0x4c2cf8d7, daddr: 0x000009e6
With two devices I infer that it would be something like:
IrLMP: Discovery log:
nickname: HP LaserJet 4050, hint: 0x0900, saddr: 0x4c2cf8d7, daddr: 0x000009e6
nickname: HP LaserJet 5si, hint: 0x<somehexno>, saddr: 0x<somehexno>, daddr: 0x<somehexno>
is that correct?
3) If there are two printers and the first one goes away does the
second one stay /dev/irlpt1? If it does how do I know that the printer
is on /dev/irlpt1 vs. /dev/irlpt0?
4) Finally, this is a more basic question. I know as a human that a HP
LaserJet is a printer and I think that the IRDA subsytem knows because
it allows me to open up /dev/irlpt1 but how can I make a userspace
application recognise the difference between a printer and something
else. Is there anything in the hint, saddr, or daddr that tells me
that something is actually a printer as opposed to just another
computer or a palm pilot or something else?
-ben
|