Hello, Is anyone able to help me with this? Thanks Jay -----Original Message----- From: Montague, Jay Sent: 07 September 2016 16:05 To: 'linux-bluetooth@xxxxxxxxxxxxxxx' <linux-bluetooth@xxxxxxxxxxxxxxx> Subject: bluez bluetooth problem Dear Bluez, I am having a problem that I wondered whether you could help me with? I'm currently working on a project in which I'm trying to communicate to an Intel Edison board from my Windows PC via Bluetooth. I have managed to successfully connect and communicate via Bluetooth using the serial port and bluez version 5.22. But my problem is that I can only auto connect to the PC once I have already manually paired to the device. So my aim is to have software running on the Edison which will be able to auto pair to a PC and connect without knowing the PC device id in advance, for the PC to then send commands and eventually files to the Edison. I have been able to manually send serial commands to the Edison by using a Putty terminal and using rfcomm and the "cat /dev/rfcomm0" command. Using process below on the Edison: rfkill unblock bluetooth sdptool add -channel=22 SP rfcomm watch /dev/rfcomm0 22 > /dev/null & bluetoothctl agent NoInputNoOutput default-agent discoverable on "pair with Edison from PC and accept pairing on the Edison" cat /dev/rfcomm0 "send text to Edison via Putty terminal com port" So I have been trying to automate this process by writing C code on the Eclipse IDE and also by writing scripts running on the Edison but I have not been able to successfully send commands to the bluetoothctl function. I have tried to send commands using the Eclipse IDE but when I send the following: system("echo -e 'agent NoInputNoOutput\n | bluetoothctl"); On the Edison it reports "No agent is registered" and the following message: (bluetoothctl:690): GLib-CRITICAL **: Source ID 22 was not found when attempting to remove it Also if I try to create a script file like the following: #!/bin/sh rfkill unblock bluetooth sdptool add -channel=22 SP sleep 1 bluetoothctl << EOF agent NoInputNoOutput EOF sleep 1 Again it just report "No agent is registered". I have been in communication with Intel support but I've got to a point where I don't think I can get any further and they have recommended that I contact you. Any help would be very much appreciated. Kind regards Jay ________________________________ This e-mail contains privileged and confidential information intended for the use of the addressees named above. If you are not the intended recipient of this e-mail, you are hereby notified that you must not disseminate, copy or take any action in respect of any information contained in it. If you have received this e-mail in error, please notify the sender immediately by e-mail and immediately destroy this e-mail and its attachments. -- 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