Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Developer
Posts: 6
Registered: ‎08-04-2008
My Device: Not Specified
Accepted Solution

BluetoothSerialPort explain DSR / DTR?? Does BluetoothSerialPortListener dataReceived() block??

[ Edited ]


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.



Message Edited by pacred on 08-30-2008 11:44 AM
Message Edited by pacred on 08-30-2008 11:44 AM
BlackBerry Development Advisor
Posts: 15,884
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: BluetoothSerialPort explain DSR / DTR?? Does BluetoothSerialPortListener dataReceived() block??

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.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.