Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: michiil on January 14, 2016, 12:28:13 PM

Title: Bluetooth Keyboard
Post by: michiil on January 14, 2016, 12:28:13 PM
Hey guys,
i have searched the forum but didn't find anything helpfull so:
is the a way to connect a bluetooth keyboard on picore 7?

Thanks in advance
Title: Re: Bluetooth Keyboard
Post by: beerstein on January 15, 2016, 07:14:11 AM
WOW - That 's what I would like to have also. I spent days to get Bluetooth working on a Cubietruck. It turned out to be hell on earth for me.
I suggest to study how it can be done with Raspian on the Raspberry PI.
There is a lot of information out there. Google keywords "Raspian linux bluetootht Cubieboard aso) I assume it needs to be done via command line.
Title: Re: Bluetooth Keyboard
Post by: michiil on January 15, 2016, 08:02:35 AM
I am just now building bluez. So i am pretty close to getting this working (:
I hope i will manage to build a tcz Package for everyone else to download (:
Title: Re: Bluetooth Keyboard
Post by: Juanito on January 15, 2016, 08:46:44 AM
I am just now building bluez. So i am pretty close to getting this working

I like that - good luck with the pairing  :)
Title: Re: Bluetooth Keyboard
Post by: michiil on January 15, 2016, 09:50:25 AM
Well its not as easy as i thougt..
I could build and install bluez, but when i try to start bluetoothctl it gets stuck and when i abort with ctrl+c i get the following error:
Code: [Select]
[bluetooth]#
process 6321: arguments to dbus_connection_unref() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 2821.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace
Aborted

I guess i have to try a little more..

EDIT:
Okay after manually starting dbus (sudo /usr/local/etc/init.d/dbus start) bluetoothctl doesn't give an error anymore, but its till stuck.. I have read that this is properly because bleutootd is not running..
The problem is: how do i get it runnign?
Title: Re: Bluetooth Keyboard
Post by: michiil on January 15, 2016, 10:47:12 AM
Getting there:
when i am starting the bluetoothd i get:
bluetoothd[7057]: Bluetooth daemon 5.37
bluetoothd[7057]: Starting SDP server
bluetoothd[7057]: Bluetooth management interface 1.9 initialized
bluetoothd[7057]: Failed to obtain handles for "Service Changed" characteristic

maxbe someone knowns what to do?
Title: Re: Bluetooth Keyboard
Post by: Juanito on January 15, 2016, 10:59:36 AM
I get this (on corepure64):
Code: [Select]
$ sudo /usr/local/lib/bluetooth/bluetoothd -n
bluetoothd[30609]: Bluetooth daemon 5.28
bluetoothd[30609]: Starting SDP server
bluetoothd[30609]: Bluetooth management interface 1.10 initialized
bluetoothd[30609]: Endpoint registered: sender=:1.67 path=/MediaEndpoint/A2DPSource
bluetoothd[30609]: Endpoint registered: sender=:1.67 path=/MediaEndpoint/A2DPSink

If you use "bluetoothd -nd" you'll get verbose output, which might help
Title: Re: Bluetooth Keyboard
Post by: michiil on January 15, 2016, 11:45:40 AM
with -nd i get this:

Code: [Select]
bluetoothd[7221]: Bluetooth daemon 5.37
bluetoothd[7221]: src/adapter.c:adapter_init() sending read version command
bluetoothd[7221]: Starting SDP server
bluetoothd[7221]: src/sdpd-service.c:register_device_id() Adding device id record for 0002:1d6b:0246:0525
bluetoothd[7221]: src/plugin.c:plugin_init() Loading builtin plugins
bluetoothd[7221]: src/plugin.c:add_plugin() Loading hostname plugin
bluetoothd[7221]: src/plugin.c:add_plugin() Loading wiimote plugin
bluetoothd[7221]: src/plugin.c:add_plugin() Loading autopair plugin
bluetoothd[7221]: src/plugin.c:add_plugin() Loading policy plugin
bluetoothd[7221]: src/plugin.c:add_plugin() Loading a2dp plugin
bluetoothd[7221]: src/plugin.c:add_plugin() Loading avrcp plugin
bluetoothd[7221]: src/plugin.c:add_plugin() Loading network plugin
bluetoothd[7221]: src/plugin.c:add_plugin() Loading input plugin
bluetoothd[7221]: src/plugin.c:add_plugin() Loading hog plugin
bluetoothd[7221]: src/plugin.c:add_plugin() Loading gap plugin
bluetoothd[7221]: src/plugin.c:add_plugin() Loading scanparam plugin
bluetoothd[7221]: src/plugin.c:add_plugin() Loading deviceinfo plugin
bluetoothd[7221]: src/plugin.c:plugin_init() Loading plugins /usr/local/lib/bluetooth/plugins
bluetoothd[7221]: profiles/input/suspend-none.c:suspend_init()
bluetoothd[7221]: profiles/network/manager.c:read_config() Config options: Security=true
bluetoothd[7221]: src/main.c:main() Entering main loop
bluetoothd[7221]: src/rfkill.c:rfkill_event() RFKILL event idx 0 type 2 op 0 soft 0 hard 0
bluetoothd[7221]: Bluetooth management interface 1.9 initialized
bluetoothd[7221]: src/adapter.c:read_version_complete() sending read supported commands command
bluetoothd[7221]: src/adapter.c:read_version_complete() sending read index list command
bluetoothd[7221]: src/adapter.c:read_commands_complete() Number of commands: 61
bluetoothd[7221]: src/adapter.c:read_commands_complete() Number of events: 34
bluetoothd[7221]: src/adapter.c:read_commands_complete() enabling kernel-side connection control
bluetoothd[7221]: src/adapter.c:read_index_list_complete() Number of controllers: 1
bluetoothd[7221]: src/adapter.c:read_index_list_complete() Found index 0
bluetoothd[7221]: src/adapter.c:index_added() index 0
bluetoothd[7221]: src/adapter.c:btd_adapter_new() System name: BlueZ 5.37
bluetoothd[7221]: src/adapter.c:btd_adapter_new() Major class: 0
bluetoothd[7221]: src/adapter.c:btd_adapter_new() Minor class: 0
bluetoothd[7221]: src/adapter.c:btd_adapter_new() Modalias: usb:v1D6Bp0246d0525
bluetoothd[7221]: src/adapter.c:btd_adapter_new() Discoverable timeout: 180 seconds
bluetoothd[7221]: src/adapter.c:btd_adapter_new() Pairable timeout: 0 seconds
bluetoothd[7221]: src/adapter.c:index_added() sending read info command for index 0
bluetoothd[7221]: src/adapter.c:read_info_complete() index 0 status 0x00
bluetoothd[7221]: src/adapter.c:clear_uuids() sending clear uuids command for index 0
bluetoothd[7221]: src/adapter.c:clear_devices() sending clear devices command for index 0
bluetoothd[7221]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10001
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000007-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001800-0000-1000-8000-00805f9
bluetoothd[7221]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[7221]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[7221]: src/gatt-database.c:gatt_db_service_added() GATT Service added to local database
bluetoothd[7221]: Failed to obtain handles for "Service Changed" characteristic
bluetoothd[7221]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10002
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000007-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001801-0000-1000-8000-00805f9
bluetoothd[7221]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[7221]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[7221]: src/gatt-database.c:gatt_db_service_added() GATT Service added to local database
bluetoothd[7221]: profiles/audio/a2dp.c:media_server_probe() path /org/bluez/hci0
bluetoothd[7221]: plugins/hostname.c:hostname_probe()
bluetoothd[7221]: profiles/network/manager.c:panu_server_probe() path /org/bluez/hci0
bluetoothd[7221]: profiles/network/server.c:server_register() Registered interface org.bluez.NetworkServer1 on path /org/bluez/hci0
bluetoothd[7221]: profiles/network/manager.c:gn_server_probe() path /org/bluez/hci0
bluetoothd[7221]: profiles/network/manager.c:nap_server_probe() path /org/bluez/hci0
bluetoothd[7221]: profiles/audio/avrcp.c:avrcp_controller_server_probe() path /org/bluez/hci0
bluetoothd[7221]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10003
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110f-0000-1000-8000-00805f9
bluetoothd[7221]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[7221]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[7221]: profiles/audio/avrcp.c:avrcp_target_server_probe() path /org/bluez/hci0
bluetoothd[7221]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10004
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110c-0000-1000-8000-00805f9
bluetoothd[7221]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[7221]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[7221]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[7221]: profiles/audio/a2dp.c:a2dp_sink_server_probe() path /org/bluez/hci0
bluetoothd[7221]: profiles/audio/a2dp.c:a2dp_source_server_probe() path /org/bluez/hci0
bluetoothd[7221]: src/adapter.c:btd_adapter_unblock_address() hci0 00:00:00:00:00:00
bluetoothd[7221]: src/adapter.c:load_link_keys() hci0 keys 0 debug_keys 0
bluetoothd[7221]: src/adapter.c:load_ltks() hci0 keys 0
bluetoothd[7221]: src/adapter.c:load_irks() hci0 irks 0
bluetoothd[7221]: src/adapter.c:load_conn_params() hci0 conn params 0
bluetoothd[7221]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[7221]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[7221]: src/adapter.c:set_did() hci0 source 2 vendor 1d6b product 246 version 525
bluetoothd[7221]: src/adapter.c:adapter_register() Adapter /org/bluez/hci0 registered
bluetoothd[7221]: src/adapter.c:set_dev_class() sending set device class command for index 0
bluetoothd[7221]: src/adapter.c:set_name() sending set local name command for index 0
bluetoothd[7221]: src/adapter.c:load_link_keys_complete() link keys loaded for hci0
bluetoothd[7221]: src/adapter.c:load_ltks_complete() LTKs loaded for hci0
bluetoothd[7221]: src/adapter.c:load_irks_complete() IRKs loaded for hci0
bluetoothd[7221]: src/adapter.c:load_conn_params_complete() Connection Parameters loaded for hci0
Title: Re: Bluetooth Keyboard
Post by: Juanito on January 15, 2016, 12:28:42 PM
If bluetoothd didn't exit it might be OK - did you try to pair with something?
Title: Re: Bluetooth Keyboard
Post by: michiil on January 15, 2016, 12:30:02 PM
It seems to work anyway (:
I startet bleutoothd in another ssh session so i could pair in mine (:

Code: [Select]
[bluetooth]# pair 00:04:20:F2:46:E6
Attempting to pair with 00:04:20:F2:46:E6
[CHG] Device 00:04:20:F2:46:E6 Connected: yes
[CHG] Device 00:04:20:F2:46:E6 UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device 00:04:20:F2:46:E6 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 00:04:20:F2:46:E6 UUIDs: 830a5548-5c66-23bd-0949-c0040000227e
[CHG] Device 00:04:20:F2:46:E6 Paired: yes
Pairing successful
[CHG] Device 00:04:20:F2:46:E6 Connected: no
[bluetooth]# trust 00:04:20:F2:46:E6
[CHG] Device 00:04:20:F2:46:E6 Trusted: yes
Changing 00:04:20:F2:46:E6 trust succeeded
[bluetooth]# connect 00:04:20:F2:46:E6
Attempting to connect to 00:04:20:F2:46:E6
[CHG] Device 00:04:20:F2:46:E6 Connected: yes
Connection successful
[Harmony Keyboard]#
Title: Re: Bluetooth Keyboard
Post by: michiil on January 16, 2016, 04:29:15 AM
Okay i need some help with the tcz file..
i habe built it but i think i have some permission error..

Code: [Select]
start-stop-daemon: can't execute '/usr/local/libexec/bluetooth/bluetoothd': Permission denied


What permissions and owner should i have on the different files?
Title: Re: Bluetooth Keyboard
Post by: Juanito on January 16, 2016, 05:31:55 AM
Did you start/stop bluetoothd as root?
Title: Re: Bluetooth Keyboard
Post by: michiil on January 16, 2016, 05:41:04 AM
I took the init.d script from the x86_64 bluez plugin and modified it a bit.. (only the path of bluetoothd really)

Code: [Select]
tc@Wohnzimmer:~$ sudo cat /usr/local/etc/init.d/bluez-5.37
#!/bin/sh

start() {
  if [ ! -f /var/run/dbus/bluez_flag ]; then
    /usr/local/etc/init.d/dbus restart
    touch /var/run/dbus/bluez_flag
  fi
  if ! pidof bluetoothd >/dev/null; then
    start-stop-daemon --start --exec /usr/local/libexec/bluetooth/bluetoothd & 2>/dev/null
  fi
}

stop() {
  start-stop-daemon --stop --exec /usr/local/libexec/bluetooth/bluetoothd 2>/dev/null
  sleep 2
}

status() {
  if pidof bluetoothd >/dev/null; then
    echo -e "\nbluetoothd is running.\n"
    exit 0
  else
    echo -e "\nbluetoothd is not running.\n"
    exit 1
  fi
}

case $1 in
  start) start
    ;;
  stop) stop
    ;;
  status) status
    ;;
  restart) stop; start
    ;;
  *) echo -e "\n$0 [start|stop|restart|status]\n"
    ;;
esac

I tried some commands to start it manually:
Code: [Select]
tc@Wohnzimmer:~$ /usr/local/etc/init.d/bluez-5.37 start
-sh: /usr/local/etc/init.d/bluez-5.37: Permission denied
tc@Wohnzimmer:~$ sudo /usr/local/etc/init.d/bluez-5.37 start
sudo: /usr/local/etc/init.d/bluez-5.37: command not found
tc@Wohnzimmer:~$ sudo sh /usr/local/etc/init.d/bluez-5.37 start
tc@Wohnzimmer:~$ start-stop-daemon: can't execute '/usr/local/libexec/bluetooth/bluetoothd': Permission denied

I am used to debian so i wanted to use service but its not aviable on tinycore so whats the right way to start a init.d script manually?

Also the permissions if it helps:
Code: [Select]
tc@Wohnzimmer:~$ ls -lsa /usr/local/libexec/bluetooth/
total 0
     0 drwxr-xr-x    2 tc       staff           80 Jan 15 20:45 ./
     0 drwxr-xr-x    4 tc       staff          120 Jan 15 20:44 ../
     0 lrwxrwxrwx    1 root     root            61 Jan 15 21:00 bluetoothd -> /tmp/tcloop/bluez-5.37/usr/local/libexec/bluetooth/bluetoothd
     0 lrwxrwxrwx    1 root     root            56 Jan 15 21:00 obexd -> /tmp/tcloop/bluez-5.37/usr/local/libexec/bluetooth/obexd
Title: Re: Bluetooth Keyboard
Post by: Juanito on January 16, 2016, 06:49:28 AM
The command should be:
Code: [Select]
$ sudo /usr/local/etc/init.d/bluez start..and you can also use the control panel services gui

It looks like you have a typo somewhere?
Title: Re: Bluetooth Keyboard
Post by: michiil on January 16, 2016, 07:52:43 AM
Success!
Code: [Select]
tc@Wohnzimmer:~$ tce-load -i bluez-5.37.tcz
created directory: '/usr/local/etc/bluetooth'
'/usr/local/share/bluez-5.37/files/main.conf' -> '/usr/local/etc/bluetooth/main.conf'
bluez-5.37.tcz: OK
tc@Wohnzimmer:~$ sudo /usr/local/etc/init.d/bluez-5.37 start
no /usr/local/bin/dbus-daemon found; none killed
rm: can't remove '/var/run/dbus/pid': No such file or directory
tc@Wohnzimmer:~$ sudo bluetoothctl
[NEW] Controller 00:15:83:D2:28:ED BlueZ 5.37 [default]
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller 00:15:83:D2:28:ED Powered: yes

I just adjusted all permissions according to the wiki (:

Thanks a lot for your help (:
Title: Re: Bluetooth Keyboard
Post by: michiil on January 16, 2016, 11:37:56 AM
Okay so 2 more questions:
Title: Re: Bluetooth Keyboard
Post by: michiil on January 16, 2016, 01:36:05 PM
I manages to autostart by adding it to /opt/bootlocal.sh is this okay?

Also how do i reconnect my keaboard on boot?

Thanks in advance
Title: Re: Bluetooth Keyboard
Post by: michiil on January 18, 2016, 01:10:22 PM
Okay i'm just going to share what i have until now:

https://drive.google.com/folderview?id=0B1Ekntw8HsBXaWVqeXdod0VPYjA&usp=sharing

Everything that i tested works. I have to re-pair on every boot maybe someone could find a soloution to this?
buetoothctl needs to be executed as sudo!
Title: Re: Bluetooth Keyboard
Post by: Greg Erskine on January 18, 2016, 03:17:31 PM
...I have to re-pair on every boot maybe someone could find a soloution to this?

Hi michiil,

Is there a configuration file that needs to be added to /opt/.filetool.lst so it is backed up?

regards
Greg
Title: Re: Bluetooth Keyboard
Post by: michiil on January 19, 2016, 01:55:44 AM
Okay it seems like the paired devices are store in: /var/lib/bluetooth/nn:nn:nn:nn:nn:nn
Where nn:nn:nn:nn:nn:nn is the mac of the bluetooth adapter.
At least its like that on bluez 4, didn't find anything about bluez 5..
I will try it when i get home.
How would i backup this directroy?

Thanks for the tipp greg

Btw im on picoreplayer if this makes any differences
Title: Re: Bluetooth Keyboard
Post by: Rich on January 19, 2016, 02:08:08 AM
Hi michiil
Add:
Code: [Select]
var/lib/bluetooth/nn:nn:nn:nn:nn:nnto your  /opt/filetool.lst  file and then run a backup.

Title: Re: Bluetooth Keyboard
Post by: michiil on January 19, 2016, 02:27:04 AM
Thanks rich!
Will try when i get home and report back (:
What about the extension audit script? I would like to submit my extension to the repo..
Title: Re: Bluetooth Keyboard
Post by: Rich on January 19, 2016, 02:48:02 AM
Hi michiil
Depending on which version of the audit scrip you are using it may be looking for  squashfs-tools-4.x.tcz  or
squashfs-tools.tcz. I don't run ARM myself so I don't know whether the audit script is compatible or not.
Title: Re: Bluetooth Keyboard
Post by: michiil on January 20, 2016, 11:48:06 AM
UPDATE:

Okay the files for bluez are in /usr/local/var/lib/bluetooth/... and if i back this foler up the device is still paired afer a reboot. YEY (:
but thats not enough as it seems /:
When i try to reconnect if jumps back and forth between 'connected yes' and 'connected no'.. If i disconnect and reconnect without rebooting it works so it seems like there is still something missing..

I will have to play around some more it seems..
Title: Re: Bluetooth Keyboard
Post by: michiil on January 20, 2016, 01:03:08 PM
this is from bluetoothd with debugging enabled:
Code: [Select]
bluetoothd[1222]: src/adapter.c:connected_callback() hci0 device 00:04:20:F2:46:E6 connected eir_len 23
bluetoothd[1222]: profiles/input/server.c:connect_event_cb() Incoming connection from 00:04:20:F2:46:E6 on PSM 17
bluetoothd[1222]: profiles/input/device.c:input_device_set_channel() idev (nil) psm 17
bluetoothd[1222]: Refusing input device connect: No such file or directory (2)
bluetoothd[1222]: profiles/input/server.c:confirm_event_cb()
bluetoothd[1222]: Refusing connection from 00:04:20:F2:46:E6: unknown device
bluetoothd[1222]: src/adapter.c:dev_disconnected() Device 00:04:20:F2:46:E6 disconnected, reason 3
bluetoothd[1222]: src/adapter.c:adapter_remove_connection()
bluetoothd[1222]: plugins/policy.c:disconnect_cb() reason 3
bluetoothd[1222]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 00:04:20:F2:46:E6 type 0 status 0xe
bluetoothd[1222]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
bluetoothd[1222]: src/device.c:device_bonding_failed() status 14

I have no idea whats going on there..

Code: [Select]
bluetoothd[1314]: src/adapter.c:get_ltk_info() 00:04:20:F2:46:E6
bluetoothd[1314]: src/device.c:device_create_from_storage() address 00:04:20:F2:46:E6
bluetoothd[1314]: src/device.c:device_new() address 00:04:20:F2:46:E6
bluetoothd[1314]: src/device.c:device_new() Creating device /org/bluez/hci0/dev_00_04_20_F2_46_E6
bluetoothd[1314]: src/device.c:btd_device_set_temporary() temporary 0
bluetoothd[1314]: src/device.c:device_set_bonded()
bluetoothd[1314]: src/adapter.c:load_link_keys() hci0 keys 1 debug_keys 0
bluetoothd[1314]: src/adapter.c:load_ltks() hci0 keys 0
bluetoothd[1314]: src/adapter.c:load_irks() hci0 irks 0
bluetoothd[1314]: src/adapter.c:load_conn_params() hci0 conn params 0
bluetoothd[1314]: src/device.c:device_probe_profiles() Probing profiles for device 00:04:20:F2:46:E6
bluetoothd[1314]: profiles/input/device.c:input_device_register() /org/bluez/hci0/dev_00_04_20_F2_46_E6
bluetoothd[1314]: input-hid profile probe failed for 00:04:20:F2:46:E6

this part looks promising.. but still no idea whats going on..
Title: Re: Bluetooth Keyboard
Post by: Juanito on January 21, 2016, 06:18:10 AM
Maybe it would have been better to use "--localstatedir=/var" as the base and most other extensions would use that?
Title: Re: Bluetooth Keyboard
Post by: michiil on January 22, 2016, 01:38:49 AM
Maybe it would have been better to use "--localstatedir=/var" as the base and most other extensions would use that?
With ./configure ? Okay will recompile today (:
Also my package is rather big compared to the x64 one (4mb vs 1mb) is that a problem?
Title: Re: Bluetooth Keyboard
Post by: Juanito on January 22, 2016, 01:48:43 AM
The bluetooth libs are a separate extension in x86_64.

Did you strip the binaries (strip-all) and libs (strip-unneeded)?
Title: Re: Bluetooth Keyboard
Post by: michiil on January 22, 2016, 08:21:25 AM
The bluetooth libs are a separate extension in x86_64.

Did you strip the binaries (strip-all) and libs (strip-unneeded)?

Okay i recompiled with "--localstatedir=/var" but that didn't help at all...
But i found the Problem FINALLY!

Before Reboot:
Code: [Select]
tc@Wohnzimmer:~$ sudo ls -lsahR /var/lib/bluetooth/
/var/lib/bluetooth/:
total 0
     0 drwx------    3 root     root          60 Jan  1  1970 .
     0 drwxrwxr-x    6 root     staff        120 Jan  1  1970 ..
     0 drwx------    4 root     root         100 Jan 22 14:13 00:15:83:D2:28:ED

/var/lib/bluetooth/00:15:83:D2:28:ED:
total 0
     0 drwx------    4 root     root         100 Jan 22 14:13 .
     0 drwx------    3 root     root          60 Jan  1  1970 ..
     0 drwx------    2 root     root          80 Jan 22 14:14 00:04:20:F2:46:E6
     0 drwx------    2 root     root         120 Jan 22 14:14 cache
     0 -rw-------    1 root     root           0 Jan 22 14:00 settings

/var/lib/bluetooth/00:15:83:D2:28:ED/00:04:20:F2:46:E6:
total 8
     0 drwx------    2 root     root          80 Jan 22 14:14 .
     0 drwx------    4 root     root         100 Jan 22 14:13 ..
     4 -rw-------    1 root     root         187 Jan 22 14:14 attributes
     4 -rw-------    1 root     root         292 Jan 22 14:14 info

/var/lib/bluetooth/00:15:83:D2:28:ED/cache:
total 16
     0 drwx------    2 root     root         120 Jan 22 14:14 .
     0 drwx------    4 root     root         100 Jan 22 14:13 ..
     4 -rw-------    1 root     root        1.5K Jan 22 14:14 00:04:20:F2:46:E6
     4 -rw-------    1 root     root          28 Jan 22 14:13 A8:54:B2:39:BC:F7
     4 -rw-------    1 root     root          21 Jan 22 14:14 CC:FE:3C:D6:88:59
     4 -rw-------    1 root     root          21 Jan 22 14:14 F8:95:C7:83:DA:40

After Reboot:
Code: [Select]
tc@Wohnzimmer:~$ sudo ls -lsahR /var/lib/bluetooth/
/var/lib/bluetooth/:
total 0
     0 drwx------    3 root     root          60 Jan  1  1970 .
     0 drwxrwxr-x    6 root     staff        120 Jan  1  1970 ..
     0 drwx------    3 root     root          80 Jan  1  1970 00:15:83:D2:28:ED

/var/lib/bluetooth/00:15:83:D2:28:ED:
total 0
     0 drwx------    3 root     root          80 Jan  1  1970 .
     0 drwx------    3 root     root          60 Jan  1  1970 ..
     0 drwx------    2 root     root          80 Jan 22 14:08 00:04:20:F2:46:E6
     0 -rw-------    1 root     root           0 Jan 22 14:00 settings

/var/lib/bluetooth/00:15:83:D2:28:ED/00:04:20:F2:46:E6:
total 8
     0 drwx------    2 root     root          80 Jan 22 14:08 .
     0 drwx------    3 root     root          80 Jan  1  1970 ..
     4 -rw-------    1 root     root         187 Jan 22 14:01 attributes
     4 -rw-------    1 root     root         292 Jan 22 14:08 info

As you can see: the cache folder is missing after the reboot. But why? I added the whole var/lib/bluetooth folder to the filetool.lst..
What am I missing?
Title: Re: Bluetooth Keyboard
Post by: Rich on January 22, 2016, 08:29:46 AM
Hi michiil
There is a  cache  entry in  /opt/.xfiletool.lst  to prevent browser caches from being backed up. See if adding this to
/opt/.filetool.lst  overrides that:
Code: [Select]
var/lib/bluetooth/00:15:83:D2:28:ED/cache
Title: Re: Bluetooth Keyboard
Post by: michiil on January 22, 2016, 08:35:44 AM
Hi michiil
There is a  cache  entry in  /opt/.xfiletool.lst  to prevent browser caches from being backed up. See if adding this to
/opt/.filetool.lst  overrides that:
Code: [Select]
var/lib/bluetooth/00:15:83:D2:28:ED/cache

nope still away after a reboot.. could i just delete the entry in /opt/.xfiletool.lst? i am not using a browser.
Title: Re: Bluetooth Keyboard
Post by: Rich on January 22, 2016, 08:44:00 AM
Hi michiil
You could do that, but if you ever start using a browser it could result in some huge slow backups and restores.
I'd first see if being more specific helps, like:
Code: [Select]
var/lib/bluetooth/00:15:83:D2:28:ED/cache/or:
Code: [Select]
var/lib/bluetooth/00:15:83:D2:28:ED/cache/00:04:20:F2:46:E6
Title: Re: Bluetooth Keyboard
Post by: michiil on January 22, 2016, 09:02:24 AM
Hi michiil
You could do that, but if you ever start using a browser it could result in some huge slow backups and restores.
I'd first see if being more specific helps, like:
Code: [Select]
var/lib/bluetooth/00:15:83:D2:28:ED/cache/or:
Code: [Select]
var/lib/bluetooth/00:15:83:D2:28:ED/cache/00:04:20:F2:46:E6
nope.. not working.. i will never start a browser (its a picore player) so its fine for me but i think there should be a possibility to whitelist a folder no matter the blacklist..

But for now: everything is working! And i am able to reconnect after boot (: