title: Bluetooth connection using socket rfcomm
body: <p>I have two Bluetooth devices and I'm trying to make two rfcomm connections, one connection per device.</p>
  
  <p>I'm using bluez rfcomm socket</p>
  
  <pre><code>addr.rc_family = AF_BLUETOOTH;
  addr.rc_channel = (uint8_t) 1;
  str2ba( dest, &amp;addr.rc_bdaddr );
  
  // connect to server
  s = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
  
  // set disconnect timeout to 2sec
  struct timeval tv;
  tv.tv_sec = 2;
  setsockopt(s, SOL_SOCKET, SO_RCVTIMEO,(struct timeval *)&amp;tv,sizeof(struct timeval));
  
  // make connection
  status = connect(s, (struct sockaddr *)&amp;addr, sizeof(addr));
  </code></pre>
  
  <p>How I select a device to make the connection?</p>