what is "hci_inquiry"? in which context of iotdk-ide-linux do you use it?
Looks like sometthing wrong is with the casting:
( inquiry_info **)&ii
Sample usage should look like this:
... inquiry_info *info = NULL; int num_rep = hci_inquiry(dev_id, length, num_rsp, lap, &info, flags); ...
Dear Mhahn and Damain, thank you for reply. I just refer to Bluetooth programming in C with BlueZ, I also tried the usage Damain mentioned, but nothing changed. I think maybe something of iotdk-ide-linux (the IDE based on Eclipse provided by Intel) should be set. Does anyone know how to set or fix it? Thanks!
Hi Mhahn, hci_inquiry performs a Bluetooth device discovery and returns a list of detected devices and some basic information about them in the variable ii.
could you paste what kind of error do you have ? did unblock bluetooth wby rfkill unblock bluetooth ?
thanks - as it's a compile error message it doesn't seem to have anything to do with bluetooth enabled or not. It should also have nothing to do with the OS - I guess you'd see the same error when directly compiling on the target as well - but rather really invalid arguments.
Hi Mhahn, you are right, it's not the problem of hardware or OS, and I know that. It should be problem of the IDE( iotdk-ide-linux ). I've checked the header files hci_lib.h , hci.h and bluez5 library bluetooth exist in the iotdk-ide-linux, the interfaces are defined as followings. The code should be correct, but can't pass compiling.
int hci_inquiry(int dev_id, int len, int num_rsp, const uint8_t *lap, inquiry_info **ii, long flags);
Can you paste your imports section ?
Hi Damain, what I include list as followings.
The followings are included by the project automatically
Hello, I found that if I use the interface hci_inquiry in the sample project 5_cpp_mraa_analog_input provided by iotdk-ide-linux, everything is ok. But if I use it in my own created project with iotdk-ide-linux, the error of hci_inquiry occurs. What's going on?
So I just modifed the sample project 5_cpp_mraa_analog_input with my code, then compiled it successfully. When I download the App to the Edison breakout board and run it, it will say "Failed to write to export Intel Edison Failed to initialise Arduino board TriState, check i2c devices! FATAL", then continue running. How to remove the steps about the error messages? I haven't find them, maybe they are reported by some library, but I can't find it. Does anyone has some advices? Thank you!
That's a message from lbmraa, update the version of mraa on your board. Instructions are here: Upgrading Intel® IoT Developer Kit libraries – Intel® Edison or Intel® Galileo board | Intel® Developer Zone
And somewhere hidden is how to update the IDE to have matching headers/bins I can only find this right now - Updating Eclipse to stay in sync with IoT
Hi arfoll, thank you for your quick reply, I'll try it.