Home > other >  Ubuntu usb bluetooth no/dev/rfcomm serial port, to a serial port communication
Ubuntu usb bluetooth no/dev/rfcomm serial port, to a serial port communication

Time:04-05

RT
Ubuntu, after connecting USB bluetooth installed driver () in question, using hcitool or bluetoothctl pair can succeed, but the connect appear:
[bluetooth] # connect and 6: FB: C4 22 CB:
Attempting to connect to and 6: FB: C4 22 CB:
(CHG) Device and 6: FB: C4: CB: 22 Connected: yes
(CHG) Device and 6: FB: C4: CB: 22 ServicesResolved: yes
Failed to connect: org. Bluez. Error. InProgress
(CHG) Device and 6: FB: C4: CB: 22 ServicesResolved: no
(CHG) Device and 6: FB: C4: CB: 22 Connected: no

In addition, due to the need of mainly do mobile phone bluetooth and ubuntu bluetooth communication, this also don't care, but using sdptool browse and 6: FB: C4: CB: 22, did not see SP (0 x1101) serial port information (RFCOMM and Channel, etc.), so can't communicate with bluetooth, check inside the/dev/RFCOMM;


S=socket (AF_BLUETOOTH SOCK_STREAM, BTPROTO_RFCOMM);
//bind socket to port 1 of the first available
//local bluetooth adapter
Loc_addr. Rc_family=AF_BLUETOOTH;
Loc_addr. Rc_bdaddr=* BDADDR_ANY;
Loc_addr. Rc_channel=(uint8_t) 1;
Bind (s, (struct sockaddr *) & amp; Loc_addr, sizeof (loc_addr));

Listen (s, 1);

Use the server, mobile phone a serial port connection also have no reaction, there is something wrong with the driver?
Or the right process should be like?
Is the need to turn bluez bluetooth serial port?

Thank you very much
  • Related