Describe the bug
When launching pm3 without arguments, and blueshark was used earlier, if there is no proxmark pluged in, the script finds the blueshark's bluetooth address in bluetooth parameters and uses it as an argument to launch proxmark3 -p bt:xxx... The client then tries to connect to it. If it's off or not in range, the connection is left hanging, never fails, and neither Ctrl-C nor kill -9 can stop the proxmark3 process.
To Reproduce
Steps to reproduce the behavior:
client/proxmark3 -p bt:00:21:08:35:25:E8
Expected behavior
A timeout should occur, and the client switch to offline mode.
Desktop (please complete the following information):
OS: linux
inside proxmark3 client run the following commands and paste the output here.
Additional contextstrace shows that the process is hung in a connect() call:
write(1, "[\33[33m=\33[0m] Using UART port \33[3"..., 59[=] Using UART port bt:00:21:08:35:25:E8
) = 59
write(3, "[=] Using UART port bt:00:21:08:"..., 41) = 41
socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM) = 4
connect(4, {sa_family=AF_BLUETOOTH, rc_bdaddr=e8:25:35:08:21:00, rc_channel=1}, 10
The connect() call is at line 199 of client/src/uart/uart_posix.c, I guess an alarm() call and signal handler should allow for a timeout and Ctrl-C handling.
Describe the bug When launching
pm3
without arguments, and blueshark was used earlier, if there is no proxmark pluged in, the script finds the blueshark's bluetooth address in bluetooth parameters and uses it as an argument to launchproxmark3 -p bt:xxx..
. The client then tries to connect to it. If it's off or not in range, the connection is left hanging, never fails, and neitherCtrl-C
norkill -9
can stop theproxmark3
process.To Reproduce Steps to reproduce the behavior:
client/proxmark3 -p bt:00:21:08:35:25:E8
Expected behavior A timeout should occur, and the client switch to offline mode.
Desktop (please complete the following information):
hw version
Additional context
strace
shows that the process is hung in aconnect()
call:The
connect()
call is at line 199 ofclient/src/uart/uart_posix.c
, I guess an alarm() call and signal handler should allow for a timeout and Ctrl-C handling.