I went back to this project and I'm still turning up blank as to how to
get BT connections working as a client.
The definite error code is 0x030C - serial port configuration failed.
can you give a good example of how exactly its done? (I think I have a
bad parameter in my code or something).
Oh also... something that's wicked annoying that I'm dealing with....
Whenever I disconnect my device from the debugger it resets and goes
into a loop and i have to go and manually delete the thing every time.
Its wicked annoying. Is there a way I can have the debugger remove the
prc for me? ... or maybe its just that I should write a program thats
better...?
Thanks,
Joseph M Fleming
Edward Jones wrote:
My first step then would be be confirm that you really are receiving
chars over the Bluetooth serial connection. I use an open source
product called AsyncPro (http://sourceforge.net/projects/tpapro/) -
but I also imagine that there are probably plenty of others - and open
a standard COM port on the PC and display whatever comes in in ASCII.
You should be able to find out what COM port your Bluetooth adapter is
using on your PC and set AsyncPro to point at that. The advantage of
this is that as it is displaying any chars that arrive on the port
unformatted you can see if you are actually receiving or not.
By the way you may also want to have a look at Peter Eastons site,
http://www.whizoo.com/ who deals specifically in Bluetooth solutions
for the Palm. I have found him very useful in the past. His products
are not free but if you want to get up and running quickly he supplies
the necessary Palm code to get you going fast, once you have a license
to his libraries.
Good luck!
Edward Jones
Shorin wrote:
Okay, last night I sorta got the connections working. I looked at the
documentation for it and also I gleaned some stuff from the Duke3d
source.
I got server connections going "okay", although whenever I send serial
port data it doesn't seem to show up on the computer I'm connected to.
I had client connections working too (I did not use
DiscoverSingleDevice, but just filled the address with all zeros and
opened with SrmExtOpen), but it fails to connect to the device I select
(a PC). The computer doesn't even respond really.
I think I'm going to go back over this code and get a definite method to
do both. Currently I have to have the computer connect to the palm (when
I try to open it as a server on the palm), while my program is stopped
(because I open it, send data, and close it...thats the way its
written...just for tests). It seems to work, because the port is
monitored in a background thread, but like I said before, when I send a
string, it doesn't show up on the computer. I'm using a simple serial
port monitor program.
What I would LIKE is to have a dialog (just like in TriConnect), that
tells me its listening for connections. I think that would be
SrmWaitRecieve.
Either way, I would like to know why the connections as bluetooth client
do not complete successfully. By the way, those error codes were
primarily resulting because of my misunderstanding of what
ErrAlert(number code) does. I thought that was supposed to print out the
string resource number you specify. Instead it prints out the referenced
error code by that number...i guess.
Thanks
Shorin
Edward Jones wrote:
DiscoverSingleDevice is covered in the Palm OS Programmers API
Reference - p1881 under Bluetooth Library: Management section.
Yes I agree that you don't necessarily have to fiddle with BtLib as
it will do a lot of the work for you, doing the discovery and
presenting the user with a handy list of nearby available Bluetooth
devices. However, the reason I have "gone deep" with BtLib is so
that the connection and transmission via Bluetooth is a seamless as
possible as whilst most users will be fine selecting the right
device from the list, you will always have one who will try to
connect to their mobile phone or PC instead of the modem which is
what the program is looking for!
So both approaches work, it is what your users want and how you want
your program to flow which dictates which path you take.
Edward Jones
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/