Discovery

The IrDA discovery procedure is mapped onto the Sockets API by means of the RHostResolver class. For a station attempting to initiate an IrDA discovery, a RHostResolver object must be instantiated and then opened.

A GetByName() request will return the first discovered IrDA device in a TNameEntry object. The required discovery information can be parsed from this object by means of a cast of its constituent TSockAddr field to a TIrdaSockAddr.

The classes used in the discovery procedure are: RHostResolver, TNameRecord, TSockAddr, and TIrdaSockAddr. The typedefs TNameEntry and THostName are also used.

Fields parsed from discovery log entry

There are various fields that can be parsed from the discovery log entry. The host and remote device addresses are the unique 32-bit station Ids used by the IrLAP layer.

The Sniff status indicates whether the discovered device is capable of ‘sniffing’ for IrDA devices.

The Solicited status indicates whether the discovery was initiated by the host or a remote station.

The IrLAP version byte returned from the log should hold 0x00 indicating that the remote conforms to the IrDA IrLAP 1.00 specification.

The character set byte indicates the character set supported by the remote machine. 0x00 here indicates ASCII - the other values can be found in the IrLAP spec.

The service hint bytes give an indication as to the level of IrLMP support provided by the discovered device. For the meaning of the individual bits in the service hint bytes, see:

  • TIrdaSockAddr::GetFirstServiceHintByte()

  • TIrdaSockAddr::GetSecondServiceHintByte()

See also

TIrdaSockAddr