Hi, I encountered a lot problems connecting to a NAP server running on Ubuntu 16.04 x86_64. Systemd-udev was renaming the bnepx interfaces before network server could bring up the interface. Network server went on to use the original interface name and failed on the creation of the interface. This did not happen always but quite often. The obvious solution was to prevent udev from renaming. But I could not make that work. Also, IMHO, it is the task of bluetoothd to cope with this situation because systemd-udev is now pretty common. The choosen solution is to use the interface index where possible. It does not change on rename. The kernel does not provide the ifindex on BNEPCONNADD, but the interface name. So there is still a race condition when retrieving the ifindex. Also there are race conditions when using an interface name that was retrieved by interface index; which is necessary for if up/down. To cope with these potential races retry cycles are added. The patched version of bluetoothd was tested using a SAMSUNG S2 (Android 4.1.2) and a NVIDIA Shield (Android 5.1.1). No connection errors due to interface creation were realized so far. The retries are necessary though. The patch is 'minimal invasive'. Only the file bnep.c is changed. Only static local function interfaces of bnep.c are changed/ added. The patch also adds documentation to the static local functions that are substantially changed or added. make check is passed. Comments, suggestions appreciated. Thanks, Bobby b0661n0e71e@xxxxxxxxx (1): Make network server interface handling more robust profiles/network/bnep.c | 311 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 260 insertions(+), 51 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html