Click here to get back home

Bluetooth Services

 HomeNewsGroups | Search | About
 microsoft.public.smartphone    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Bluetooth Services Andreas Nilsson 08-24-2005
Posted by Andreas Nilsson on August 24, 2005, 10:33 pm
Please log in for more thread options
Hi!

Is it possible to "advertise" bluetooth services on a smartphone (Qtek
S100 running Windows Mobile 2003, Second Edition v4.21.1088)? I'm
trying to programmatically advertise a custom service through the
Winsock interface, but it refuses to allow me to bind the socket (it
claims that the address is not valid on the local computer). It works
on XP, of course.


Ideas?


Thanks in advance,
Andreas Nilsson





Posted by Tim Wallace on August 25, 2005, 3:25 pm
Please log in for more thread options
Are you following the steps for Registering a BT service as outlined in MS
documentation?

Tim

> Hi!
>
> Is it possible to "advertise" bluetooth services on a smartphone (Qtek
> S100 running Windows Mobile 2003, Second Edition v4.21.1088)? I'm
> trying to programmatically advertise a custom service through the
> Winsock interface, but it refuses to allow me to bind the socket (it
> claims that the address is not valid on the local computer). It works
> on XP, of course.
>
>
> Ideas?
>
>
> Thanks in advance,
> Andreas Nilsson
>
>
>




Posted by Nille on August 31, 2005, 3:06 pm
Please log in for more thread options
Hi!

Yes, I do. In fact, the step that fails is the first step. This is
rougly what happens:

SOCKET bth_socket = ::socket(AF_BTH, SOCK_STREAM, BTHPROTO_RFCOMM);
SOCKADDR_BTH name = { 0 };
int nameLen = sizeof(name);

name.addressFamily = AF_BTH;
name.port = BT_PORT_ANY;

if(::bind(bth_socket, (const sockaddr*)&name, nameLen) == SOCKET_ERROR)
{
// I don't want to get here :(
}

// connect
// listen
// WSASetService
// etc...

Any idea why I can't bind the socket? It says that the address is not
valid on the local machine, which seams absurd since I set the port to
auto-select. If I use a fixed port, it will always claim that the
address is already in use. The only idea I have, is that the AF_BTH
address family is not valid, i.e. it is not possible to host custom
services. Ideas?

Regards,
Nille

Tim Wallace wrote:
> Are you following the steps for Registering a BT service as outlined in MS
> documentation?
>
> Tim
>
> > Hi!
> >
> > Is it possible to "advertise" bluetooth services on a smartphone (Qtek
> > S100 running Windows Mobile 2003, Second Edition v4.21.1088)? I'm
> > trying to programmatically advertise a custom service through the
> > Winsock interface, but it refuses to allow me to bind the socket (it
> > claims that the address is not valid on the local computer). It works
> > on XP, of course.
> >
> >
> > Ideas?
> >
> >
> > Thanks in advance,
> > Andreas Nilsson
> >
> >
> >



Posted by Tim Wallace on September 1, 2005, 8:50 am
Please log in for more thread options
Next obvious question...is the Bluetooth radio on?

Tim

> Hi!
>
> Yes, I do. In fact, the step that fails is the first step. This is
> rougly what happens:
>
> SOCKET bth_socket = ::socket(AF_BTH, SOCK_STREAM, BTHPROTO_RFCOMM);
> SOCKADDR_BTH name = { 0 };
> int nameLen = sizeof(name);
>
> name.addressFamily = AF_BTH;
> name.port = BT_PORT_ANY;
>
> if(::bind(bth_socket, (const sockaddr*)&name, nameLen) == SOCKET_ERROR)
> {
> // I don't want to get here :(
> }
>
> // connect
> // listen
> // WSASetService
> // etc...
>
> Any idea why I can't bind the socket? It says that the address is not
> valid on the local machine, which seams absurd since I set the port to
> auto-select. If I use a fixed port, it will always claim that the
> address is already in use. The only idea I have, is that the AF_BTH
> address family is not valid, i.e. it is not possible to host custom
> services. Ideas?
>
> Regards,
> Nille
>
> Tim Wallace wrote:
>> Are you following the steps for Registering a BT service as outlined in
>> MS
>> documentation?
>>
>> Tim
>>
>> > Hi!
>> >
>> > Is it possible to "advertise" bluetooth services on a smartphone (Qtek
>> > S100 running Windows Mobile 2003, Second Edition v4.21.1088)? I'm
>> > trying to programmatically advertise a custom service through the
>> > Winsock interface, but it refuses to allow me to bind the socket (it
>> > claims that the address is not valid on the local computer). It works
>> > on XP, of course.
>> >
>> >
>> > Ideas?
>> >
>> >
>> > Thanks in advance,
>> > Andreas Nilsson
>> >
>> >
>> >
>




Posted by Nille on September 1, 2005, 2:56 pm
Please log in for more thread options
Yeah, I'm pretty sure it is :)

I can use the Smartphone as a client without any problems - it's just
the server part that doesn't work. Everything works on XP without any
problems.

Regards,
Nille



Similar ThreadsPosted
I want use 'OBEX Server Services'(bluetooth service) January 31, 2006, 1:51 am
Terminal Services / RDC August 16, 2005, 2:00 pm
terminal services August 28, 2006, 9:09 am
Terminal services through VPN July 4, 2008, 2:52 pm
terminal services for WM5 smartphone June 26, 2006, 9:18 am
Terminal Services via VPN Connection September 25, 2006, 6:23 pm
Terminal Services client January 3, 2008, 2:03 pm
Motorola Q and Terminal Services Client August 23, 2006, 10:53 am
Money saving services for smartphones September 9, 2007, 4:58 pm
Treo 700w Terminal Services Client January 22, 2006, 1:45 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap