Closed DylanCarbone closed 4 months ago
Sounds quite fundamental @DylanCarbone
Could you send me the following from your Pi? (Or at least what's easy for you to obtain - don't wanna waste your time.)
1) The content of /etc/rc.local
.
2) The content of /boot/config.txt
.
3) The output of the command sudo python3 /home/pi/Desktop/ami_setup-bluetooth-dev/ami-trap-raspi-bluetooth.py
.
4) Whether you can connect via Bluetooth after executing this command or not.
5) Which base image you are using (e.g., rasp-pi-amber-20231013
).
6) Whether you have modified the base image or not before installing the Blueooth stuff. (No need to list the modifications.)
One guess is that there may be a command in your rc.local
that is not terminated with an &
.
Thanks for your feedback!
Hi @JonasBchrt,
Thanks for your help! Sorry it took a little while to get to this. Please find attached the config and rc local file
In answer to these questions:
The output of the command sudo python3 /home/pi/Desktop/ami_setup-bluetooth-dev/ami-trap-raspi-bluetooth.py.
Run Bluetooth continuously.
Bluetooth powered on.
Ami-Trap-10000000e40ed214
Whether you can connect via Bluetooth after executing this command or not.
I can connect through your Bluetooth application! If it's any help, I also receive Command 'iwgetid -r' returned non-zero exit status 255.
Which base image you are using (e.g., rasp-pi-amber-20231013).
I'm using rasp-pi-20231013
Whether you have modified the base image or not before installing the Blueooth stuff. (No need to list the modifications.)
I've made some edits to the motion config file and Grace's bird pi script, but that should be all. However, I'm still pretty novice at using the Pi and I would consider the likelihood that I've corrupted a file somewhere, if you can't find a solution.
Thanks
Thanks @DylanCarbone ,
The issue is indeed the /etc/rc.local
file on your Pi. I would put a &
behind the motion
command to run the motion software in the background rather than in the foreground. Currently, the system waits until motion terminates (which never happens) before Bluetooth starts. A fixed /etc/rc.local
file could look like this:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/home/pi/scripts/setCamera.sh &
#/sbin/modprobe uvcvideo
motion &
sudo python3 /home/pi/ami_setup-bluetooth-dev/ami-trap-raspi-bluetooth.py &
exit 0
Then, the Bluetooth service should start automatically on start-up.
Currently, the way the install.sh
script in this repo works is pretty hacky. It attempts to fix missing &
in /etc/rc.local
, but failed doing that adequately in your case. Ultimately, an image may just ship with a complete /etc/rc.local
file and we hopefully won't need that script anymore.
P.S: I hope running motion in the background doesn't cause any issues.
Hi Jonas,
Apologies again for the slow reply. That's great, thank you. I'll make this change when I'm back in the office after Portugal and let you know if there are any issues with motion running in the background.
Hi Jonas,
I just checked and everything works. Thanks for your help :)
Hi @JonasBchrt ,
I've just tried setup Bluetooth on my Raspberry Pi using your read me instructions. The script runs without error and the second time I ran it (apologies, I lost the console output from the first install), I received the following as output:
However, after rebooting, I'm unable to connect via the Bluetooth application. Do you have any ideas what could be causing this error?
Thanks