Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Serial Port Profile & Bluetooth


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-26-2007, 06:57 PM
Newbie
 
Join Date: May 2007
Posts: 6
Default Serial Port Profile & Bluetooth

Hi,
I have developed an application which uses the serial port oon a pda via appropriate cable. However, the client now wants to use bluetooth with a different make of pda (as yet unknown). My question is what do I need to do to use bluetooth instaed of a cable as I have never used bluetooth before. I was told that I need SPP (Serial Port Profile) software installed. What is this and where do I get it.
Thanks again for any help.

Regards
Paul
__________________
Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 2Gb SD + 2Gb CF
Reply With Quote
  #2 (permalink)  
Old 07-26-2007, 07:23 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,687
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Bluetooth can emulate a Serial (Com) Port so as long as your app can find the appropriate Com port then you should only need minimal or no changes to your app itself (baud rate setting by the app is not available for example).

For example the Bluetooth stack on my Axim X30 offers a Serial Port service that both Microsoft Pocket Streets and Anquet Maps can connect to without even knowing that the GPS receiver they are talking to is a Bluetooth device rather than connected to a real Serial Port. The actual Com ports (Com7 and Com8 are the defaults on my Axim) can be configured in the Serial Port service parameters and also in Pocket Streets and Anquet.

I think that it is down to the Bluetooth device to request that service from the PDA so as long as whatever device your app talks to can do this you should have no trouble.
Reply With Quote
  #3 (permalink)  
Old 07-27-2007, 09:24 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

This post: Reading com ports information from the registry
includes code that lists the available ports and their description.
Reply With Quote
  #4 (permalink)  
Old 07-27-2007, 10:53 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

You should first pair your mobile device with the "unknown device". And then make an "outgoing serial port" if your "unknown device" supports such a service. Until then no virtual serial port exists.

I've tested this approach with various bluetooth GPS receivers, bluetooth printers and mobile phones with bluetooth capability with success.
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #5 (permalink)  
Old 07-27-2007, 12:19 PM
Newbie
 
Join Date: May 2007
Posts: 6
Angry How to set up inbound and outbound com port

Help,
I can't figure out how to set up seperate inbound and outbound comm ports for use with bluetooth. Could someone show me an example, please?.

Thanks, Paul
__________________
Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 2Gb SD + 2Gb CF
Reply With Quote
  #6 (permalink)  
Old 07-27-2007, 05:08 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,687
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by Paul View Post
I can't figure out how to set up seperate inbound and outbound comm ports for use with bluetooth. Could someone show me an example, please
YOU don't set them up, the Bluetooth driver stack does. I think that you just need to open the Com port and talk to it. The sequence to use my Bluetooth GPS with my Axim is as follows.

Examine the Bluetooth setup parameters - for me this goes
Start -> Settings -> Connections -> Bluetooth -> Services -> Serial Port
Make sure the service is enabled then
-> Advanced
The inbound and outbound Com port numbers are displayed and can be changed if required. I note the Outbound Com port number (in this case Com7 is the default). I confess to not having researched the reason for having an inbound and an outbound port but I know, by experiment, that my GPS uses an outbound port.

Start the GPS application, in my case either Anquet Maps or Pocket Streets.
In their GPS setup menu make sure the Com port number is the outbound number noted above. Pocket Streets allows you to select only a Com port number, Anquet gives you a baud rate selection option as well and I leave that at the default of 4800.

Turn on the Bluetooth device and then in the application turn on GPS tracking. Depending upon the device Bluetooth stack settings a selection screen showing the GPS device may or may not appear - if it doesn't the connection is made automatically, if it does then I select the device and it all works.

The applications don't care if the Com port is real or a Bluetooth one. For example on my laptop using Autoroute or Anquet Maps I can connect to either a real serial port GPS and a Bluetooth GPS just by selecting the correct Com port. I have a GPS test program and that doesn't care either (although another GPS test program that I had DID care - don't know why, trying to access the (non-existent) hardware I guess). I seem to remember also connecting in Hyperterminal with the the Com port number noted above to see the data stream coming from the GPS and that worked fine too.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial port handling mjcoon Questions & Help Needed 5 06-26-2008 11:48 AM
Send data to serial port for other application schimanski Questions & Help Needed 6 04-08-2008 06:45 PM
Serial Port won't open djmrozinski Questions & Help Needed 6 03-16-2008 05:25 PM
Use Basic4ppc to send serial data from a PDA to a BlueSMiRF Bluetooth module. pdablue Share Your Creations 3 11-19-2007 10:58 PM
GPS and Virtual Serial Port alfcen Questions & Help Needed 2 10-05-2007 02:56 PM


All times are GMT. The time now is 11:33 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0