Friday, September 24, 2010

[android-developers] Re: Bluetooth Serial Port Programming.

Hello Nathan,

I just released a Bluetooth Terminal Emulator in the Market, and it
was my first BT project for Android. I used the terminal emulator
code from my other app, but separated the code into an Android Library
project so I could share the majority of the code. That was the most
difficult part. Then I leveraged some of the code from the Bluetooth
Chat example.

It seems to work pretty well, but occasionally drops characters. At
first I thought it had something to do with the flow control settings
on the BT Serial adapter I was using, but even if I go phone to phone
I still see the problem.

I targeted the app to Android 2.0 and higher, and tested with the
phones I have:

Droid, Droid X, EVO 4G, and Nexus One, and they all seem to work the
same.

Hope that helps,
Howard

On Sep 24, 3:34 pm, Nathan <critter...@crittermap.com> wrote:
> I may be doing some Bluetooth Serial Port programming work for a
> client and I'm just looking for some tips in determining complexity/
> workload.
> The work is similar to reading from a bluetooth GPS (not making the
> phone a bluetooth GPS), but it is some custom hardware, so not
> exact.
>
> Here's what (I think) I know so far:
> I will need to pair devices with a Serial Port Profile.
> I need to connect using a BluetoothSocket which works on Android 2x
> -I don't know yet if the Android I will be a server or a client in
> this scenario.
> I will open an InputStream (no outputstream needed) and have a thread
> continually blocking for input
> I believe "BluetoothChat" is the best example to start with.
>
> What I would want to know.
> - Are there devices/manufacturers who block the bluetooth serial port,
> trying to block tethering or something like that?
>    (-I've seen posts here that imply that, but I don't see a bunch of
> comments like "Doesn't work on my @#$$" in Bluetooth GPS Providers in
> the market).
> -Are there going to be hardware specific oddities, or can I develop
> with my Nexus One and just hope it works on everything else?
> -Is pairing something that will require a lot of education for the
> users, and would a good app try to initiate this inside their app, or
> just assume it is already done.
> -Is Bluetooth programming going to be my worst nightmare, like it
> sometimes was on Windows Mobile, or smoother than I could ever hope?
>
> Thanks
>
> Nathan

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment