08-30-2008 11:23 AM - edited 08-30-2008 11:44 AM
Two questions please.
Can someone please shead some light on what DSR / DTR is, in relation to Bluetooth? In the BluetoothDemo.SSPScreen there are 3 menu items: "Get DTR" , "DSR on", "DSR off". What are these for and why would I turn DSR on or off?
When implementing BluetoothSerialPortListener, does the method dataReceived block until the method finishes or only until _port.read(buf, 0, 1024)) !=0) is finished loading the byte buffer?? While reading NEMA sentences from a puck some data is observed as corrupt, so we're wondering whos fault it is this.developer, or the puck? Do I need to create some blocking logic until the entire method is finished?
Thank you in advance.
Solved! Go to Solution.
09-02-2008 09:54 AM
The Bluetooth Serial Port profile emulates a wired serial port. DTR maps to the DTR line on a serial port (the wired kind, not Bluetooth). We don't have any documentation on this to provide but it isn't specific to BlackBerry or Bluetooth, so you can read more about it in general serial port documentation.
The BluetoothSerialPortListener.dataReceived method is fired when data has arrived to the BlackBerry, passing in the length of the data that is available to be read. Your implementation can read up to the size specified in length, but should not block, waiting for more data. When more data is available the method should fire again. Please have a look at the BluetoothSample included with the BlackBerry JDE for an example.