How can I decode the Bluetooth Error numbers found in errno, that show up in Android log? I am trying to find the definition of the Bluetooth Error Numbers.  For example they might appear in logcat output as:


  09-16 07:38:50.896 V/BluetoothSocket.cpp( 8809): ...accept(69, RFCOMM)
  = -1 (errno 125)
The errno global variable concept is not Bluetooth specific but comes from the (POSIX) system calls used by BluetoothSocket.cpp. Your log shows that the system call accept() failed, because it returned -1 (negative values usually indicate an error). Additionally accept() also set the errno to 125. If you look at the related definition in the Linux sources, you find that it maps to ECANCELED:

#define ECANCELED   125 /* Operation Canceled */


See also


Wikipedia on errno.h
POSIX errno.h