pub fn bind_le_source(fd: c_int, psm: u16, cid: u16) -> Result<(), i32>Expand description
Bind an L2CAP socket to the local side of an LE link before connecting.
Without this the kernel leaves the channel’s source type at BDADDR_BREDR,
and l2cap_chan_connect refuses a BR/EDR source with an LE destination —
connect fails with EINVAL and no link is ever attempted. Binding is how
the socket is told it is an LE one; BlueZ’s own tools do the same.
BDADDR_ANY leaves the choice of adapter to the kernel, which is what we
want: the caller names a peer, not a controller.