Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect devices when bt-agent is run with daemon flag #31

Open
rshatch opened this issue Oct 10, 2019 · 2 comments
Open

Can't connect devices when bt-agent is run with daemon flag #31

rshatch opened this issue Oct 10, 2019 · 2 comments

Comments

@rshatch
Copy link

rshatch commented Oct 10, 2019

When I run bt-agent in the foreground (bt-agent --capability=NoInputNoOutput) or manually backgrounded (bt-agent --capability=NoInputNoOutput &) I'm able to pair my phone correctly with the system, but running it with the daemon flag (bt-agent --capability=NoInputNoOutput -d), the system is visible to my phone, but trying to pair and connect fails with a generic 'can't connect to device' message. bluez-tools is running as the most recent repo version available on Raspbian Buster Full (version 2.0~20170911.0.7cb788c-2), on a Raspberry Pi Zero W using the built-in bluetooth chip.

@sedlund
Copy link

sedlund commented Feb 21, 2021

The NoInputNoOutput option appears to be broken as it always asks for a yes/no on stdout and awaits input.

I use the 'yes' command to authorize everything :)

In systemd I do this:

/etc/systemd/system/bt-agent.service

[Unit]
Description=Bluetooth Auth Agent

[Service]
#ExecStart=/usr/bin/bt-agent -c DisplayOnly
ExecStart=/bin/sh -c '/usr/bin/yes | /usr/bin/bt-agent --capability=NoInputNoOutput'
Type=simple

[Install]
WantedBy=multi-user.target

@CarlosDerSeher
Copy link

CarlosDerSeher commented Dec 10, 2021

Any updates regarding this issue? Are there any drawbacks starting a service with bt-agent --capability=NoInputNoOutput & instead of using bt-agent --capability=NoInputNoOutput -d
I am currently building the package for openwrt 21.02 platform and it runs already, just have been wondering if this needs to be fixed and if so how to debug this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants