February 2015
Intermediate to advanced
768 pages
26h 24m
English
You communicate with a Bluetooth RFCOMM service using a standard StreamSocket. RfcommDeviceService provides ConnectionHostName and ConnectionServiceName properties that you can use to connect, and then you can use DataWriter and/or DataReader to work with the socket’s OutputStream and InputStream:
RfcommDeviceService service = await GetSerialPortProfileServiceAsync(); if (service != null) { StreamSocket socket = new StreamSocket(); await socket.ConnectAsync(service.ConnectionHostName, service.ConnectionServiceName, SocketProtectionLevel.BluetoothEncryptionAllowNullAuthentication); DataWriter writer = new DataWriter(socket.OutputStream); DataReader reader ...
Read now
Unlock full access