• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Serial Port Profile baud rate problems

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Does anyone know if it's possible to set the baud rate of a serial port profile connection?

I'm trying to connect to a device that's sending data over Bluetooth at 9600 baud. After some trial and error I can read data continuously from the device by making my thread sleep for around 30ms between reads of 37 bytes.

However, after a large amount of data has been read, the data being read in appears to be corrupted, and out of sync with the data being sent.

Any ideas how to set the baud rate, so I can just read in data without problems?

Paul
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using a CommConnection, you can specify the baudrate in the connection string:


Wether or not the device you're working with will respect the baudrate, parity, etc., I do not know. I can tell you that most of the phones I've worked with (mostly IDEN) usually respect the baudrate, but completely ignore any parity specs).
 
Paul Atkins
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jason,

Thanks for the reply.

I've looked at CommConnection, however the Nokia 6630 returns null when trying to get a list of the available COM ports using:



Also, I couldn't see a way to open a SPP connection using the CommConnection, as the url's used are completely different.

i.e.

SPP


Comm


I can tell you that most of the phones I've worked with (mostly IDEN) usually respect the baudrate, but completely ignore any parity specs).



Have you got any example code of connecting to a bluetooth serial port profile using a CommConnection? If you have could you post it, as it'd be very useful!

Cheers,

Paul

[ March 03, 2005: Message edited by: Paul Atkins ]
[ March 03, 2005: Message edited by: Paul Atkins ]
 
Live a little! The night is young! And we have umbrellas in our drinks! This umbrella has a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic