adding a sdp service with a 128bit uuid
Hi Marco!
Can you send the program you wrote to me for reference? Or can you tell briefly the algorithm about the program you wrote about adding a service profile, especially for which functions in sdptool.c are nneded? Thank you very much.
Michael
Marco Trudel <[email protected]> wrote:
Hello everybody
by reading sdptool.c, I was able to write a little program that promotes my service. Realising this, 3 questions arised:
1. general:
how to browse the local sdp services?
[sdptool browse dev] seems to be only for remote devices. I now always did it from another device to see the local seervices. how to [sdptool browse localhost]?
2. from add_sp(...) in sdptool.c, changing:
# sdp_uuid16_create(&sp_uuid, SERIAL_PORT_SVCLASS_ID);
into:
# sdp_uuid128_create(&sp_uuid, a128bitUUID);
gives me (if I do [sdptool browse from the other device]):
# Service Class ID List:
# "Error: This is uuid128" (0x0a333444-5556-6677-7888-9aa99000a1a1) Actually it works well. But why is it saying "Error: ..."? I noticed that using the avetana jsr82 implementation (that uses bluez), and creating a sdp entry with a 128bit uuid, it shows the same error.
3. actually this is more a c then a bluez question, but i'd appreciate if someone could tell it nevertheless:
# sdp_uuid32_create(uuid_t *uuid, uint32_t data);
# sdp_uuid128_create(uuid_t *uuid, const void *data);
the second function takes the uuid as "const void *data". What is the appropriate way to give a uuid like 2c3ef0c843674369b1dfb7315e76332a to that function?
I asked google and he (she?) told me this:
http://www.xgarreau.org/aide/devel/bluetooth/timeserver.c
but it seems a little big for me...
regards
Marco
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
---------------------------------
Yahoo! 工具列 - 內置防止彈出視窗工能!
Hallo Michael
just read the sdptool.c... it's all there. basically you need add_sp(sdp_session_t *session, svc_info_t *si)
respectively you told once something about headset, i think... there is a method like add_headset()...
regards
Marco
Quoted 64 lines · Ka Kin Cheung
Hi Marco!
Can you send the program you wrote to me for reference? Or can you
tell briefly the algorithm about the program you wrote about adding a service profile, especially for which functions insdptool.care nneded? Thank you very much.
Michael*/Marco Trudel <[email protected]>/* wrote:
Hello everybody
by reading
sdptool.c, I was able to write a little program that promotes my
service. Realising this, 3 questions arised:1. general:
how to browse the local sdp services?
[sdptool browse dev] seems to be only for remote devices. I now always did
it from another device to see the local seervices. how to [sdptool browse
localhost]?2. from
add_sp(...)insdptool.c, changing:
#sdp_uuid16_create(&sp_uuid, SERIAL_PORT_SVCLASS_ID); into:
#sdp_uuid128_create(&sp_uuid, a128bitUUID);
gives me (if I do [sdptool browse from the other device]):
# Service Class ID List:
# "Error: This is uuid128" (0x0a333444-5556-6677-7888-9aa99000a1a1) Actually it works well. But why is it saying "Error: ..."? I noticed that
using the avetana jsr82 implementation (that uses bluez), and creating a
sdp entry with a 128bit uuid, it shows the same error.3. actually this is more a c then a bluez question, but i'd appreciate if
someone could tell it nevertheless:
#sdp_uuid32_create(uuid_t *uuid, uint32_t data);
#sdp_uuid128_create(uuid_t *uuid, const void *data);
the second function takes the uuid as "const void *data". What is the appropriate way to give a uuid like2c3ef0c843674369b1dfb7315e76332ato that function?
I asked google and he (she?) told me this:
http://www.xgarreau.org/aide/devel/bluetooth/timeserver.c
but it seems a little big for me...regards
Marco-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Quoted 2 lines
------------------------------------------------------------------------
Yahoo! 工具列 - 內置防止彈出視窗工能 <http://hk.toolbar.yahoo.com>!
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Quoted 11 lines
3. actually this is more a c then a bluez question, but i'd appreciate if
someone could tell it nevertheless:
#sdp_uuid32_create(uuid_t *uuid, uint32_t data);
#sdp_uuid128_create(uuid_t *uuid, const void *data);
the second function takes the uuid as "const void *data". What is the appropriate way to give a uuid like2c3ef0c843674369b1dfb7315e76332ato that function?
I asked google and he (she?) told me this:
http://www.xgarreau.org/aide/devel/bluetooth/timeserver.c
but it seems a little big for me...
Whaou, nice, i love google :)
Actually i wrote this sample for a presentation in a university. It's not production quality code.
But to give data as void* you can do something like this:
unsigned char uuid_data[16] = {0x2c, 0x3e, 0xf0, 0xc8, 0x43, 0x67, 0x43, 0x69, 0xb1, 0xdf, 0xb7, 0x31, 0x5e, 0x76, 0x33, 0x2a};
...sdp_uuid128_create (&uuid, (void*)uuid_data);
Actually, in the code you mentionned i used the create_base_uuid function from a bluez source ... But i don't remember from what file it was ...
Regards,
Xavier
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users