I used gdb till just before it went stuck. Below is the backtrace: (gdb) bt #0 __libc_connect (fd=3, addr=..., len=10) at ../sysdeps/unix/sysv/linux/connect.c:24 #1 0x0004cb4c in bthConnect (btAddr=0xbeffedc8 "00:80:25:2C:C5:C7", loc_btAddr=0xbeffedda "") at Bluetooth.cpp:347 #2 0x00025ae8 in Inverter::logOn (this=this@entry=0xbeffed74) at Inverter.cpp:612 #3 0x000264e4 in Inverter::process (this=this@entry=0xbeffed74) at Inverter.cpp:59 #4 0x00016784 in main (argc=<optimized out>, argv=<optimized out>) at main.cpp:104 One step further: (gdb) bt #0 __libc_connect (fd=3, addr=..., len=10) at ../sysdeps/unix/sysv/linux/connect.c:26 #1 0x0004cb4c in bthConnect (btAddr=0xbeffedc8 "00:80:25:2C:C5:C7", loc_btAddr=0xbeffedda "") at Bluetooth.cpp:347 #2 0x00025ae8 in Inverter::logOn (this=this@entry=0xbeffed74) at Inverter.cpp:612 #3 0x000264e4 in Inverter::process (this=this@entry=0xbeffed74) at Inverter.cpp:59 #4 0x00016784 in main (argc=<optimized out>, argv=<optimized out>) at main.cpp:104 One step further it gets stuck.