You’re following the steps that I’d take if I were doing this. As a sanity check, does this work on Raspbian? And I wonder if dmesg shows any errors?
Also, not that this is a bad thing, but this is an ambitious first project. I think that you’ll be the first person to get Bluetooth PANs working with Nerves, so I’m very curious to hear your progress.
I just tried this afternoon on Raspbian and I was able to setup a working PAN.
For dmesg, there is no error.
I like to have ambitious projects when I try out a technology. It allows me to really try to understand how it works, especially when I’m trying to do something and there is little documentation on the topic ^^
I will try again and I will update this post if I manage to get the NAP working on Nerves.
Thanks! You were right! My controller is now properly detected.
Unfortunately, I always get the same errors when I run bt-agent -c NoInputNoOutput and bt-network -s nap pan0:
(bt-agent:361): GLib-CRITICAL **: 22:56:40.140: PCRE library is compiled without UTF8 support
(bt-agent:361): GLib-CRITICAL **: 22:56:40.140: PCRE library is compiled without UTF8 properties support
bt-agent: bluez service is not found
Did you forget to run bluetoothd?
It seems that bluetoothd wants to write to /var/lib/bluetooth but it can’t (read-only partition):
bluetoothd[333]: Unable to open adapter storage directory: /var/lib/bluetooth/XX:XX:XX:XX:XX:XX
It’s been a while since I’ve done it, but I believe if you want to make that directory be writable, you can either configure the application to write to somewhere that is writable, mount a writable partition there, or use a symlink to redirect that directory to a place that is writable.
I thought we used to have an example of doing that e.g. for making the /etc/resolv.conf file and friends be writable, but I’m having trouble finding a link to that now. Maybe someone else knows what I’m talking about and/or can fill in the gap.
Small progress: I added a symbolic link from /var/lib/bluetooth to /tmp/bluetooth (via rootfs_overlay) but I still have the same error.
(bt-agent:363): GLib-CRITICAL **: 13:30:51.254: PCRE library is compiled without UTF8
(bt-agent:363): GLib-CRITICAL **: 13:30:51.255: PCRE library is compiled without UTF8 properties support
bt-agent: bluez service is not found
Did you forget to run bluetoothd?
Now I don’t understand what the problem is since I don’t have any error anymore (neither from dmesg nor from bluetoothd).