I'm connecting a WinCE terminal (using the Microsoft stack) to a hand-held bluetooth barcode scanner. Everything's running fine apart from one thing.
First, the setup: The terminal starts a BluetoothListener and the scanner initiates the connection to the terminal. A BluetoothClient is created successfully and GetStream is called. On that stream, a StreamReader and StreamWriter are opened.
The StreamReader correctly receives data as the scans are performed.
This particular scanner allows the terminal to send an ASCII BEL (7) character back to the scanner to produce some audio feedback. When this is needed, the program calls the StreamWriter as so:
However, the audio feedback is never heard -- I'm currently assuming that the BEL character is not being received by the scanner, since the scanner itself is configured correctly. Bear in mind that whilst this is being attempted, there's a background
thread running which is in the following loop:
While Not m_BTStreamReader.EndOfStream
code = m_BTStreamReader.ReadLine
Is there a problem with attempting to write to the base stream via a StreamWriter whilst that m_BTStreamReader.ReadLine is blocking? Or is this a case of the code should be working so I should look elsewhere?