Comments (6)
Found the following solution here.
https://www.raspberrypi.org/forums/viewtopic.php?t=304434
So after the raspberry pi zero w has booted up, then ssh in and run the following command,
/usr/bin/bt-agent --capability=DisplayOnly -p /home/pi/pins
And it works!
Any idea how to integrate this so that it will work when the raspberry boots up?
from pizero-bluetooth-audio-receiver.
Any idea how to integrate this so that it will work when the raspberry boots up?
Sure, just change the args in the service (bt-agent.service
).
from pizero-bluetooth-audio-receiver.
Just tried changing the args but the service fails. Here is the status.
● bt-agent.service - Bluetooth Agent
Loaded: loaded (/etc/systemd/system/bt-agent.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-08-05 16:05:30 BST; 4min 16s ago
Process: 404 ExecStart=/usr/bin/bt-agent --capability=DisplayOnly -p /home/pi/pins (code=exited, status=1/FAILURE)
Main PID: 404 (code=exited, status=1/FAILURE)
Aug 05 16:05:30 raspberrypi0 systemd[1]: bt-agent.service: Service RestartSec=100ms expired, scheduling restart.
Aug 05 16:05:30 raspberrypi0 systemd[1]: bt-agent.service: Scheduled restart job, restart counter is at 5.
Aug 05 16:05:30 raspberrypi0 systemd[1]: Stopped Bluetooth Agent.
Aug 05 16:05:30 raspberrypi0 systemd[1]: bt-agent.service: Start request repeated too quickly.
Aug 05 16:05:30 raspberrypi0 systemd[1]: bt-agent.service: Failed with result 'exit-code'.
Aug 05 16:05:30 raspberrypi0 systemd[1]: Failed to start Bluetooth Agent.
Changed the args back to /usr/bin/bt-agent --capability=NoInputNoOutput and the service starts good
Anything else that can be tried?
from pizero-bluetooth-audio-receiver.
Finally got it to work.
Thank you for the advice.
The issue I think was the pins file permission.
Here is what was done.
Create a file called "pins" and save it at /usr/local/etc/
In the file have the following.
* *
Change ownership of the "pins" file.
chown bt-agent:bt-agent pins
Change permission of the "pins" file.
chmod 640 pins
Then change the args of the bt-agent.service file to the following.
ExecStart=/usr/bin/bt-agent --capability=DisplayOnly --pin /usr/local/etc/pins
Then do this command.
sudo systemctl daemon-reload
That should do it.
Enjoy!
Hope the file locations and settings are ok. Please advice.
from pizero-bluetooth-audio-receiver.
The issue I think was the pins file permission.
Alternatively you could change the user who the service is run under. The bluetooth agent service runs under the unprivileged bt-agent
user. If the service ran as root (many systemd services do) it would not matter where the file was nor the file permissions. You could also use pi
as the user.
from pizero-bluetooth-audio-receiver.
Thank you very much for the advice.
from pizero-bluetooth-audio-receiver.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pizero-bluetooth-audio-receiver.