Hi, I am taking the task to clean up the src/btio.[ch] files in order to share them among BlueZ, OBEX and oFono. And yes, it's easy to make them as identical but harder to make it self contained by removing the 'dependence' with libbluetooth. So I post the shared structure between btio.[ch] and libbluetooth to get your comments. Now I have some small patches that do the cleanup with depends on libbluetooth. I suggest we could first make the btio.[ch] having the same look&feel and remove the libbluetooth dependence later. One reason is that the potential changes to libbluetooth code could only happen in BlueZ 5.x version. Below are the data structure that btio.[ch] depends on libbluetooth. I don't count L2RAW and L2SCO yet. So there will be more from sco.h and etc. A detailed copy of 'faked' btio/bluetooth.h is attach. /* rfcomm.h */ struct sockaddr_rc; struct rfcomm_conninfo; /* L2CAP socket options */ struct l2cap_options; struct l2cap_conninfo; #define L2CAP_LM_XXX #define L2CAP_MODE_XXX /* hci.h */ enum { HCI_XXX }; struct hci_dev_stats; struct hci_dev_info; Regards, Zhenhua