2008-07-22 10:36:57

by Peter Wurmsdobler

[permalink] [raw]
Subject: [Bluez-users] #define OGF_TESTING_CMD potentially wrong?

Hello,

a few days ago I posted a message concerning testing, i.e. on how to put
a Bluetooth module into the test modes specified in the Bluetooth
specification Core 2.1 (27.07.2007) using:

hcitool cmd <OGF> <OCF> [params]

In concrete I was interested in HCI_Write_Loopback_Mode and
HCI_Enable_Device_Under_Test_Mode, for which OCF are defined as 0x0002
and 0x0003, respectively. OGF is defined as 0x06 in the specification.

hcitool delivers the command at the bluetooth module. However, hcidump,
which uses #defines and tables from bluez-libs, resolves this commands
as Unknown, as it would defined in include/hci.h

#define OGF_TESTING_CMD 0x3e

If I used OGF=0x3e in the above hcitool command, hcidump would resolve
the string correctly, but the bluetooth module would not do what it was
told to do.

To me it appears that the #define in hci.h is potentially wrong, or
maybe refers to an older version of the specification, when testing
might have been vendor specific.

Best regards,
peter


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2008-07-27 00:32:51

by Mumia W..

[permalink] [raw]
Subject: Re: [Bluez-users] compile error: bluetooth/bluetooth.h: No such file or directory

On 07/26/2008 04:35 PM, thanit sara wrote:
> [...] $ gcc -g -o simplescan simplescan.c -lblutooth "
> As result, below is what I got.
>
> simplescan.c:5:33: error: bluetooth/bluetooth.h: No such file or directory
> simplescan.c:6:27: error: bluetooth/hci.h: No such file or directory
> simplescan.c:7:31: error: bluetooth/hci_lib.h: No such file or directory
> [...]

It looks like you need the development packages for bluetooth installed.
For Debian Etch, libbluetooth2-dev contains these files. No doubt it
will be slightly different for Fedora.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-07-26 21:35:02

by thanit sara

[permalink] [raw]
Subject: [Bluez-users] compile error: bluetooth/bluetooth.h: No such file or directory





From: [email protected]
To: [email protected]
Subject: compile error: bluetooth/bluetooth.h: No such file or directory
Date: Sat, 26 Jul 2008 16:30:48 -0500


Dear all,

I am very new to linux and BlueZ. I started by reading the introduction doc and text book created by Alebert S. Huang. However, I stuck in the step of compilling of his very first c-programming example. The file name is "simplescan.c" and my command is " (on the file directory) $ gcc -g -o simplescan simplescan.c -lblutooth "
As result, below is what I got.

simplescan.c:5:33: error: bluetooth/bluetooth.h: No such file or directory
simplescan.c:6:27: error: bluetooth/hci.h: No such file or directory
simplescan.c:7:31: error: bluetooth/hci_lib.h: No such file or directory

Note, I am using fedora 9, 86x64 version. And I think I have all the Bluez package with all header files installed with gcc complier.
The weird thing is the Bluetooth header files (ie. bluetooth.h, hci.h ,....) are located in "/usr/src/kernels/2.6.25.10-86.fc9.x86_64/include/net ", instead of "/usr/include" where I thought they would be.

I have been searching on google for days now and no answer to myself yet. Anyone have a valuable suggestion please kindly let me know. Or if anyone know the exact proper way how to compile c-code file for BlueZ on linux pls kindly let me know

Your kindness is greatly appreciated.

Thanit


_________________________________________________________________
Find hidden words, unscramble celebrity names, or try the ultimate crossword puzzle with Live Search Games. Play now!
http://g.msn.ca/ca55/212
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-07-22 13:41:41

by Peter Wurmsdobler

[permalink] [raw]
Subject: Re: [Bluez-users] #define OGF_TESTING_CMD potentially wrong?

Hello Marcel,
> that hcidump shows something as unknown, doesn't mean that it didn't
> work. Actually hcidump is only a passive tool like tcpdump. So feel free
> to send a patch to fix hcidump, but this doesn't mean that hcitool is
> not working.
This was my understanding, too. After issuing the command with ogf=0x06
our test equipment could take over the module, which proved for me that
the command had worked. However, the #define hcidump uses is defined in
bluez-libs/include/hci.h. I will send a patch.
peter


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-07-22 12:45:52

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] #define OGF_TESTING_CMD potentially wrong?

Hi Peter,

> a few days ago I posted a message concerning testing, i.e. on how to put
> a Bluetooth module into the test modes specified in the Bluetooth
> specification Core 2.1 (27.07.2007) using:
>
> hcitool cmd <OGF> <OCF> [params]
>
> In concrete I was interested in HCI_Write_Loopback_Mode and
> HCI_Enable_Device_Under_Test_Mode, for which OCF are defined as 0x0002
> and 0x0003, respectively. OGF is defined as 0x06 in the specification.
>
> hcitool delivers the command at the bluetooth module. However, hcidump,
> which uses #defines and tables from bluez-libs, resolves this commands
> as Unknown, as it would defined in include/hci.h
>
> #define OGF_TESTING_CMD 0x3e
>
> If I used OGF=0x3e in the above hcitool command, hcidump would resolve
> the string correctly, but the bluetooth module would not do what it was
> told to do.
>
> To me it appears that the #define in hci.h is potentially wrong, or
> maybe refers to an older version of the specification, when testing
> might have been vendor specific.

that hcidump shows something as unknown, doesn't mean that it didn't
work. Actually hcidump is only a passive tool like tcpdump. So feel free
to send a patch to fix hcidump, but this doesn't mean that hcitool is
not working.

Regards

Marcel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users