SparkFun Forums 

Where electronics enthusiasts find answers.

General suggestions or questions about the SparkFun Electronics website
By dk-info
#99578
I have no experience developing with Bluetooth or developing code for a phone or Palm pilot. I can spell Java, and have coded in it years back but that is about it.

I would like some help in starting out. I would like a serial interface between my phone/pilot and a Bluetooth equipped controller (I have experience designing PIC based embedded controllers). I would like to use the hand-held device to set parameters in the embedded controller wirelessly.

I designed a serial hand held terminal unit that uses a male to male audio jumper cord for the serial interface to the controller. I would like to do the same thing just using my phone/palm device.

Where do I start? It should be straightforward to wire in the bluetooth module (which one???) to the USART of my microcontroller. If I understand things correctly, I could then use a bluetooth 2 USB dongle to see the serial traffic on a PC with some comm port mapping software.

I am stuck where to start on the phone/palm end. Is there a "hello world" canned setup for the palm pilot? Where do I start to discover that development tool chain?

Thanks in advance for the help even if it is an admonishment to "RTFM" as long as the requisite "FM" is listed.

David,
Melbourne, Florida
By tetsujin
#99780
Bluetooth hardware is one aspect I don't know a lot about (particularly with regard to the available options for embedding Bluetooth into hardware projects...) But I was a PalmOS developer for a while (professionally and in my spare time) so maybe I can help a bit...

First off, development for PalmOS appears to be a bit of a problem at present. Palm has discontinued their developer support for the platform, so I don't know what you have to do in order to get the SDK. (Palm recommends pestering ACCESS, current owners of the legacy PalmOS, if you want the SDK - but ACCESS does not presently make it available, I guess.) I did find a copy online, provided by another PalmOS developer:

http://crone.us/palm/sdk/
(link originated from this forum post...)

If you're interested in developing anything for PalmOS, I recommend downloading that stuff and stashing it away. The examples zipfile includes some Bluetooth stuff, including use of RFCOMM.

Another thing to consider if you're interested in PalmOS is the compiler. There's a version of GCC you can use to compile the code, but you also usually need to make resources to go with your application - things like forms and menus and so on. There are free tools for that as well (pilrc, etc.) but it can be a bit difficult. Furthermore, example code from Palm usually doesn't use pilrc, I think. (At least, around 10 years ago they always used the Metrowerks resource builder - it wasn't always easy to compile Palm's examples in GCC as I recall.)

If you want to write Bluetooth code yourself to talk to something like this, you'll want a good understanding of Bluetooth itself as well.

I think it also might be possible to skip a lot of that by using the PalmOS Bluetooth config to pair with and connect to your RFCOMM device, and then use a regular terminal program to communicate with it - I'm really not sure, though. Among other things the "regular terminal program" would have to know how to deal with "com ports" other than the traditional hotsync connector, and I don't think that's typical...
By tetsujin
#100000
dk-info wrote:Thanks for the Palm Info, based on that I think I will go the Blackberry/phone route.
XD

Yeah, can't say I'd recommend getting into PalmOS programming at this point - maybe if you had the hardware for it already, it could be worth it, but otherwise... (That's how it is for me. I have an old Treo, so if I wanted to interface with Bluetooth I'd start there.)

I wish I knew more about the hardware options for Bluetooth. I mean, you can get a USB Bluetooth dongle for about $10 - but any other "Bluetooth" device on Sparkfun costs like $60 or more. (What is up with that?)

I guess another way to do it is to start with an Arduino, add the USB host shield ($25) and then use a Bluetooth module with it - but I don't know how much software overhead that adds, or what limitations that imposes... But that would be about $35 total for the BT hardware instead of $50-$60.

I suppose if one used a microcontroller with USB host functions, then a USB Bluetooth dongle could be used directly - but, again, that puts all the burden of the software interface on you...

(EDIT): Also, this may be of use to you, perhaps... Sparkfun's Bluetooth tutorial - at least it goes into their available hardware options, anyway...
(EDIT again): this also may be useful: the author is using an Arduino, USB shield, and USB Bluetooth dongle to interface with game controllers via Bluetooth. Some of the info there would probably also be useful for making the Arduino use the BT dongle for incoming serial connections...