meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:bluetooth:bluez:btattach [2025/04/11 08:11] – created niziaklinux:bluetooth:bluez:btattach [2025/04/11 12:23] (current) niziak
Line 1: Line 1:
 ====== btattach ====== ====== btattach ======
  
-Is not working in ''3wire'' aka ''H:5'' mode.+hci/btattach flow: 
 +  * bluez (bluetoothd service) is running 
 +  * ''hciattach'' 
 +  * ''hci0'' interface appears 
 +  * bluez is configuring it 
 +    * NOTE: w/o blues try to call ''hciconfig hci0 up'' returns error: ''Can't init device hci0: Cannot assign requested address (99)'' 
 +  * now possible put inteface up: 
 +    * ''hciconfig hci0 up'' or  
 +    * ''bluetoothctl -- power on'' 
 + 
 +===== EUNATCH (Protocol driver not attached) ===== 
 + 
 +Search tags:  
 +  * ''EUNATCH (Protocol driver not attached)'' 
 +  * ''Failed to get device id: Protocol driver not attached) = 54'' 
 +  * ''No controller attached) = 23'' 
 + 
 +Btattach is not working in ''3wire'' aka ''H:5'' mode.
  
 <code bash> <code bash>
Line 23: Line 40:
 write(2, "No controller attached\n", 23No controller attached) = 23 write(2, "No controller attached\n", 23No controller attached) = 23
 </code> </code>
 +
 +
 +===== old hciattach works well ! =====
 +
 +<code bash>
 +strace hciattach -n /dev/ttymxc1 3wire 1000000 flow
 +</code>
 +
 +  * ''-n'' Don't detach from controlling terminal.
 +
 +<code>
 +openat(AT_FDCWD, "/dev/ttymxc1", O_RDWR|O_NOCTTY) = 3
 +ioctl(3, TCFLSH, TCIOFLUSH)             = 0
 +ioctl(3, TCGETS, {c_iflag=, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|, c_cflag=B1000000|CS8|CREAD|CLOCAL, c_lflag=, ...}) = 0
 +ioctl(3, SNDCTL_TMR_START or TCSETS, {c_iflag=, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|, c_cflag=B1000000|CS8|CREAD|CLOCAL|CRTSCTS, c_lflag=, ...}) = 0
 +ioctl(3, SNDCTL_TMR_START or TCSETS, {c_iflag=, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|, c_cflag=B115200|CS8|CREAD|CLOCAL|CRTSCTS, c_lflag=, ...}) = 0
 +ioctl(3, TCFLSH, TCIOFLUSH)             = 0
 +ioctl(3, TCFLSH, TCIOFLUSH)             = 0
 +ioctl(3, SNDCTL_TMR_START or TCSETS, {c_iflag=, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|, c_cflag=B1000000|CS8|CREAD|CLOCAL|CRTSCTS, c_lflag=, ...}) = 0
 +ioctl(3, TIOCSETD, [15])                = 0
 +ioctl(3, _IOC(_IOC_WRITE, 0x55, 0xc8, 0x4), 0x2) = 0
 +fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(0xcf, 0x13), ...}) = 0
 +ioctl(1, TCGETS, {c_iflag=ICRNL|IXON|IXOFF|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B115200|CS8|CREAD|HUPCL|CLOCAL, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|ECHOCTL|ECHOKE, ...}) = 0
 +...
 +write(1, "Device setup complete\n", 22Device setup complete) = 22
 +</code>
 +
 +===== Headline =====
 +
 +It is not working since 2017 :(
 +  * [[https://www.spinics.net/lists/linux-bluetooth/msg72050.html|btattach and 3wire doesn't work]]
 +
 +Issue was posted on mailing list but without any deep look from developer.
 +Problem is not related to connected nrF52 device. 
 +It can be reproduced on any UART. Problem is during UART configuration before any data transmission!
 +