Hi Anderson, On Thu, Sep 13, 2012 at 11:36 AM, Anderson Lizardo <anderson.lizardo@xxxxxxxxxxxxx> wrote: > Hi John, > > On Thu, Sep 13, 2012 at 2:18 PM, John Tobias <john.tobias.ph@xxxxxxxxx> wrote: >> Hi Anderson, >> >> Here's what I did: >> >> I set the EnableGatt=true and executed my bluetoothd. The debug >> messages of bluetoothd confirmed that it was responding to the request >> of my iPhone. > > Which messages did you see? The ran the bluetoothd with debug message: bluetoothd[14762]: plugins/mgmtops.c:mgmt_event() cond 1 bluetoothd[14762]: plugins/mgmtops.c:mgmt_event() Received 19 bytes from management socket bluetoothd[14762]: plugins/mgmtops.c:mgmt_device_connected() hci0 device 6E:FA:41:C4:DA:AD connected eir_len 0 bluetoothd[14762]: src/event.c:btd_event_conn_complete() Entry: btd_event_conn_complete bluetoothd[14762]: src/adapter.c:adapter_get_device() 6E:FA:41:C4:DA:AD bluetoothd[14762]: src/adapter.c:adapter_create_device() 6E:FA:41:C4:DA:AD bluetoothd[14762]: src/device.c:device_create() Creating device /org/bluez/14762/hci0/dev_6E_FA_41_C4_DA_AD bluetoothd[14762]: src/device.c:btd_device_ref() 0xb8600018: ref=1 bluetoothd[14762]: src/device.c:device_set_temporary() temporary 1 bluetoothd[14762]: plugins/mgmtops.c:mgmt_event() cond 1 bluetoothd[14762]: plugins/mgmtops.c:mgmt_event() Received 13 bytes from management socket bluetoothd[14762]: plugins/mgmtops.c:mgmt_device_disconnected() hci0 device 6E:FA:41:C4:DA:AD disconnected bluetoothd[14762]: src/event.c:btd_event_disconn_complete() bluetoothd[14762]: src/adapter.c:adapter_remove_connection() bluetoothd[14762]: src/adapter.c:adapter_remove_connection() Removing temporary device /org/bluez/14762/hci0/dev_6E_FA_41_C4_DA_AD bluetoothd[14762]: src/device.c:device_remove() Removing device /org/bluez/14762/hci0/dev_6E_FA_41_C4_DA_AD bluetoothd[14762]: src/device.c:btd_device_unref() 0xb8600018: ref=0 bluetoothd[14762]: src/device.c:device_free() 0xb8600018 I will look at the code you mention and will start from there. Regards, john > >> >> I used gatttool to connect to the device and read the characteristic.. > > gatttool is only for testing. It will open a bluetooth socket and talk > directly with the kernel (without bluetoothd help). In fact, it runs > just fine without any bluetoothd running (you need to do a "hciconfig > hciX up" though). > > If you want your app to properly integrate with bluetoothd, you need > to create connections using BlueZ's D-Bus APIs. > > Take a look at some example code: > > test/test-device (if you need to do the pairing from your application) > test/test-attrib (if you want to talk to some profile not supported by > BlueZ yet) > test/test-thermometer (for GATT Health Thermometer) > test/test-proximity (for GATT Proximity) > ... > > if the profile you want to use is one of the official ones, we > encourage you implement them as a BlueZ plugin, and provide some D-Bus > API that your app (or other apps) can use. That way we avoid > duplicating profile implementations. See for example the thermometer > (HTP) and proximity (PXP) implementations in BlueZ. > > Some others are in process of being implemented upstream: Battery, > Heart Rate, and Server profiles (Time, Alert Notification, Phone Alert > Status). > > Best Regards, > -- > Anderson Lizardo > Instituto Nokia de Tecnologia - INdT > Manaus - Brazil -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html