How to Open a Port with the IrDA Protocol Module: Tutorial

This tutorial shows how to load the Infrared Serial Protocol Module and open a serial port.


  1. Call RCommServ::Connect() to create a session with the Serial communications Server.

  2. Call RCommServ::LoadCommModule() with the aFileName parameter set to ircomm. ircomm.csy is the name of the DLL file for the Serial Protocol Module. The extension .csy is optional for the LoadCommModule() API.
  3. Call RComm::Open() with the aName parameter set to IrComm::0.

    It is not recommended to change the default settings for the Infrared serial ports.


RCommServ server; 
server.Connect ();
server.LoadCommModule (_L ("IRCOMM"));
RComm commPort;
commPort.Open (server, _L ("IrCOMM::0"), ECommExclusive);