Closed robert-winkler closed 3 years ago
I assume the BadURL
error is from the Pi? i.e. with systemctl status remapper
or similar.
How about pasting the full error?
Also, why are you trying to open the web interface via 127.0.1.1/bthidhub? The instructions say to do this via the Pi address, and there's no path (i.e. 192.168.1.196:8080). Maybe that's all the issue is...
Ok, I tried again; step-by-step. I documented the complete procedure on a different computer and logged the output of the setup script and the remapper service (attached).
pi-bluetooth bluez bluez-firmware
and installs .service
files.sudo su && git clone https://github.com/ruundii/bthidhub
.cd install/on_rpi/
.vim on_pi_setup.sh
.:%s/home\/pi/home\/dietpi/g
.dd
line sudo reboot
to see final messages/errors.bash on_pi_setup.sh > /home/dietpi/bthidhub_setup.log
watch tail bthidhub_setup.log
Warnings/Errors during setup:
Failed to connect to bus: No such file or directory
(several times).
..pulseaudio.socket/service is masked, ignoring
.192.168.1.196:8080
and localhost:8080
: Connection refused.systemctl status remapper
: Error.sudo su
and python3 ./remapper.py
192.168.1.196:8080
works!dietpi
. 18. I tested various browsers: the web UI does not work well with links2, w3m, uzbl, and nsgtk3 (lightweight browsers suitable for the Pi 0W); we need javascript, I suppose?
Yes, I think it's all websockets. I can't even imagine how horrible the UX would be if done without JS (like asking the user to refresh the page every few seconds to see discovered BT devices).
* Any idea why the remapper service starts manually, but no automatically as service?
Again, there's no logs. Can't guess blindly.
If I run systemctl status remapper
I can see error logs etc. at the bottom of the output. Your remapper.log file only shows the status fields from the top of the output, no error logs from the execution.
Maybe also running the exact same command as root might help reproduce the issue: https://github.com/ruundii/bthidhub/blob/master/install/on_rpi/remapper.service#L7
cd /home/pi/bthidhub
/usr/bin/python3 /home/pi/bthidhub/remapper.py
And now that I look at that, I'm wondering if you changed the paths in that file? Maybe I can guess blindly. :P
* Where could I change the username of the web UI?
At a guess, probably this one: https://github.com/ruundii/bthidhub/blob/master/web.py#L19
You were completely right!
I changed two lines in the remapper.py
from /home/pi
to /home/dietpi
. This modification enabled the remapper service.
In web.py
, I changed
PI_USER = 'pi'
to
PI_USER = 'dietpi'
and the login works, also from remote machines.
Thanks a lot for your advice!
Hi, I tried to install bthidhub on an RPi 0W with DietPi (https://dietpi.com/). My final goal is to use the RPi 0W as a portable Stenography keyboard interface; Somehow inspired by the Stenogotchi https://github.com/Anodynous/stenogotchi. bthidhub seems more flexible for the connection of other devices than other options I found. I cloned the GitHub code I slightly modified the
on_pi_setup.sh
: I substituted the/home/pi/
by/home/dietpi
, and run the script as root. Everything looks good and the Pi reboots. Bluetooth is ON in the configuration of DietPi.Now I wanted to try the Bluetooth capabilities and connect my keyboard. However, after the reboot,
Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown; The name org.a11y.Bus was not provided by any .service file.
OK, I got rid of this error by
apt install at-spi2-core
and tried again connecting to the web interface. Now I getBadURL
Just to make sure the IP:
hostname -I
gives192.168.1.196
; but connecting to this IP/bthidhub gives the same failure.Any idea what is missing?
How can I track down the problem and fix it?
Best regards, Robert