You can read more about RFCOMM here:
http://www.palowireless.com/infotooth/tutorial/rfcomm.asp
and here
http://www.bluetooth.com/NR/rdonlyres/1483FFFD-7A5C-49A8-9AFE-1156DA1D96C3/916/rfcomm1.pdf
In your case the "BAM module" is what is called type 2 RFCOMM device
the RS-232 port it has has different setting than Bluetooth
connection.
--
Vlad
On 7/7/08, Trey <yert...@gmail.com> wrote:
>
--
Vlad
According to the specs this one doesn't allow you to setup the port
settings.
What you need is a bit more advanced device. For example the company I
work for sells this one: http://aircable.net/serial.html
Which allows you to configure the serial port. SPP allows you to send
modem control signals (DTR etc), the Serial3 implements this part. Take
a look at the specs according to the sig:
https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=8700
(you will need a bluetooth sig memebership, you get this for free).
But anyway, rfcomm and SPP doesn't define a way to setup baud rates. As
bluetooth wasn't thought that way, but you can define the baud rate on
the device, if you want more information about our devices contact me
privately.
Thanks,
Manuel
Have you tried with plain windows? Just to make sure your stack is not a
problem? Adding a virtual port, then connecting. If this works, then
there shouldn't be any limitation in bluecove for you to make this work.
Except for the 8 bits/16 bits thing which is kind of tricky.
> As I said before the command "128 131" has the desired effect maybe
> 15% of the time. How could this be? Where is my problem and how do I
> resolve this issue?
>
Thin is that in java a data type byte is actually 16 bits or something
like that, so data conversions aren't so easy to do. If you do byte A =
128 && 0x00FF you some how can be sure that the upper part of A is null.
I would say you better start debuggin what's going on. Eclipse is pretty
good for this tasks. Make sure bluecove is getting exactly the same that
you wanna transfer.
Cheers,
Manuel}
>
> The message "128 131" was being sent rarely because it wasn't given
> enough time to complete the transfer. After adding a longer
> Thread.sleep *after* sending the data, the connection stayed open long
> enough to transfer the data successfully.
>
Ouch!, bluetooth connections tends to be asynchronous this means you
know when you tell the rfcomm connection to send the data, but you don't
really know when that happens.
A suggestion, making a connection takes no less than 1 sec (it might
take less, but in general), it's a safe value to tell if a connection
was successful or not 7 secs, this is related to bluetooth page windows
sizes.