RComm::Open() returns KErrPermissionDenied
RComm::Open() returns KErrPermissionDenied when attempting to open the dataport loaned from a CSD data call. The documentation says that this method requires the LocalServices capability but granting this to the application does not help.
The information provided in the SDK documentation about the RComm::Open() method is incomplete yet correct as it states that the required capabilities are dependent.
The capabilities needed are indeed dependent on the communication module (*.CSY) in use. In this particular case, the DATAPORT.CSY module is used, and it requires that a calling process has the following capabilities: NetworkServices, NetworkControl and CommDD.
For the other CSY modules the security settings are more relaxed:
- BTCOMM.CSY requires LocalServices
- IRCOMM.CSY requires LocalServices
- ECUART.CSY requires no capability