I am trying to manually connect between my laptop and phone. I have
4.98-2ubuntu7 installed. When I run the agent on the terminal, I get:
asheesh@U32U:~$ sudo bluetooth-agent 4835 Pincode request for device /org/bluez/980/hci0/dev<id> Authorizing request for /org/bluez/980/hci0/dev<id>
The pincode request line gets printed when I try to pair from my phone. After I enter the passkey on being prompted, the device gets authorized. I can now send files to the laptop from my phone. However, the application gets stuck after authorizing request and control is not passed back to the terminal.
Why is this happening? How do I get back control?
This seems to be contrary to examples I have seen across the internet, where the terminal becomes available after authorization to run further commands.
I realise that running it in the background is a possible solution, but since I need to run certain other tasks once pairing is completed, I would prefer to have it run in the foreground.
I tried using this:
bluetooth-agent "$PIN" 1> ./bluelog #Background run tested also
However, the process does not write its output to file till it completes (or is killed), so I cannot test the output in
bluelog. Is there a way to force the process to write output before completion?