Go to advanced search

by Douglas6
Fri Dec 03, 2021 8:04 pm
Forum: Beginners
Topic: Created service starts bash script twice.
Replies: 8
Views: 315

Re: Created service starts bash script twice.

You are asking systemd to restart the script on abort, so perhaps it tried twice.

Is script a one-shot type "service"? I thought there was a different Type= for those.
by Douglas6
Tue Nov 30, 2021 4:39 pm
Forum: Beginners
Topic: Run script when Bluetooth (dis)connects
Replies: 2
Views: 144

Re: Run script when Bluetooth (dis)connects

I've updated btminder.py for Python3/BlueZ 5. Here it is: #!/usr/bin/env python3 import sys import signal import logging import dbus import dbus.service import dbus.mainloop.glib from gi.repository import GObject, GLib BLUEZ_SERVICE_NAME = "org.bluez" DBUS_OM_IFACE = "org.freedesktop....
by Douglas6
Mon Nov 29, 2021 10:54 pm
Forum: General discussion
Topic: the bluetooth of pi is such a pain
Replies: 2
Views: 175

Re: the bluetooth of pi is such a pain

Put PulseAudio back. Bluetooth streaming won't work without it.
by Douglas6
Sun Nov 14, 2021 7:43 pm
Forum: General discussion
Topic: Connect Bluetooth speaker
Replies: 5
Views: 216

Re: Connect Bluetooth speaker

How are you trying to connect? You shouldn't have to, PulseAudio will do that for you.
by Douglas6
Fri Nov 05, 2021 11:27 pm
Forum: Networking and servers
Topic: Bluetooth Mesh
Replies: 2
Views: 193

Re: Bluetooth Mesh

I think you need a true 5.0 Bluetooth dongle. I don't think the Pi's Bluetooth / WiFi chip will handle mesh.
by Douglas6
Fri Nov 05, 2021 11:13 pm
Forum: General discussion
Topic: hcitool scan won’t find my Rpi 3B Bluetooth
Replies: 4
Views: 244

Re: hcitool scan won’t find my Rpi 3B Bluetooth

Is the Pi in 'discoverable' mode? It must be, for the PC to 'discover' it.
by Douglas6
Fri Oct 22, 2021 6:05 pm
Forum: Other projects
Topic: R-Pi 4 Model B Bluetooth Project
Replies: 7
Views: 533

Re: R-Pi 4 Model B Bluetooth Project

Me? I'm just full of ideas. One idea is that I'm not sure how an iPhone will handle a request for a device that has no services it can use. Are you planning to stream music? You'll need PulseAudio running and configured for Bluetooth. Here's another one. To pair with a Pi, you'll need a Bluetooth 'a...
by Douglas6
Fri Oct 22, 2021 3:56 am
Forum: Troubleshooting
Topic: Pin code for bluetooth
Replies: 1
Views: 117

Re: Pin code for bluetooth

I'm sorry, could you rephrase your question? (A PIN is not involved in connecting, only in pairing your phone.)
by Douglas6
Fri Oct 22, 2021 3:50 am
Forum: Other projects
Topic: R-Pi 4 Model B Bluetooth Project
Replies: 7
Views: 533

Re: R-Pi 4 Model B Bluetooth Project

That's basically what happens when you set discoverable on. The 'countdown' (timeout) can be set in /etc/bluetooth/main.conf.
by Douglas6
Fri Oct 22, 2021 3:21 am
Forum: C/C++
Topic: Basic bluetooth app in C/C++
Replies: 23
Views: 1379

Re: Basic bluetooth app in C/C++

My 2 cents: D-bus is the recommended way to communicate with BlueZ. I would think there's lots of C code out there for talking to D-bus. Then you'll just need to know what BlueZ exposes, and the BlueZ interfaces are well documented. Falling back to HCI seems to be taking a big step backwards; BlueZ ...
by Douglas6
Sat Oct 09, 2021 7:20 pm
Forum: Graphics, sound and multimedia
Topic: Spotify ala Pi
Replies: 0
Views: 171

Spotify ala Pi

Has anyone else taken an old Pi0w, loaded Raspotify ("Just works") , and plugged it into your AV receiver? A cheap, simple way to get internet streaming audio into your home entertainment set-up*. The UI remains on your phone, but overhead is off-loaded to the Pi, and the audio can be sent...
by Douglas6
Sat Oct 09, 2021 5:47 pm
Forum: Python
Topic: Best practices for Indentation in Python?
Replies: 6
Views: 693

Re: Best practices for Indentation in Python?

scruss wrote:
Thu Oct 07, 2021 12:40 am
72 chars was good enough for Fortran, so it's good enough for me.
Ha, it's good to see you reserving 8 columns characters for a sequence number, just in case you drop your deck.
by Douglas6
Sat Oct 09, 2021 5:17 pm
Forum: Automation, sensing and robotics
Topic: Communicating to ble device and node-red
Replies: 1
Views: 151

Re: Communicating to ble device and node-red

If using Node-RED (I don't) , you'll first want to look into the bleno and noble libraries: https://github.com/noble/bleno.

MQTT is not a great analogy. Do some internet reading on BLE.
by Douglas6
Sat Oct 09, 2021 4:59 pm
Forum: Advanced users
Topic: Bleutooth and radio range
Replies: 1
Views: 181

Re: Bleutooth and radio range

Sadly, it is not possible to increase Bluetooth range through software. You could look into using class 1 Bluetooth adapters; a USB dongle for the Pi and whatever for your whatever (you'll want class 1 on both ends). That will give you a nominal range of 100m. [EDIT: Re-reading your post, I may have...
by Douglas6
Sat Oct 09, 2021 4:39 pm
Forum: Graphics, sound and multimedia
Topic: [Deprecated: do not use] [Guide] Stream audio to the Raspberry Pi over Bluetooth
Replies: 26
Views: 28501

Re: [Guide] Stream audio to the Raspberry Pi over Bluetooth [solved]

This thread is outdated, now that we're back to using PulseAudio in the newer releases. Thanks for the tip; I'll edit the first post with a STAY AWAY! warning. Bluetooth support on the Raspberry Pi has improved greatly over the years, and streaming capability comes pretty much out of the box. I woul...
by Douglas6
Fri Oct 01, 2021 11:35 pm
Forum: Graphics, sound and multimedia
Topic: Simulate Physical Connection Wirelessly
Replies: 5
Views: 421

Re: Simulate Physical Connection Wirelessly

This is not separate?

Code: Select all

------------    Ripples in the Aether    ----------------
¦  Tablet  ¦<~~~~~~~~~~~~~~~~~~~~~~~~~~~>¦  Pi/Speaker  ¦
------------                             ----------------
I'm sorry, I guess I don't know what you mean.
by Douglas6
Fri Oct 01, 2021 10:02 pm
Forum: Graphics, sound and multimedia
Topic: Simulate Physical Connection Wirelessly
Replies: 5
Views: 421

Re: Simulate Physical Connection Wirelessly

Looks to me like like you have two too many 'Pi or Arduino' s there. Why not just use Bluetooth to a Pi with a speaker plugged in. I do it all the time.
by Douglas6
Fri Oct 01, 2021 5:15 am
Forum: Troubleshooting
Topic: Bluetooth: No Usable Devices
Replies: 3
Views: 254

Re: Bluetooth: No Usable Devices

Now it's just a matter of opening /dev/rfcomm0 as a serial port. I like to use PySerial to open, read, and write from the port.
by Douglas6
Wed Sep 29, 2021 2:11 am
Forum: Troubleshooting
Topic: Bluetooth: No Usable Devices
Replies: 3
Views: 254

Re: Bluetooth: No Usable Devices

I seem to be saying more and more these days, that bluetoothctl is almost never the right place to 'connect' from. If you are connecting using Serial Port Profile, you'll need to run rfcomm. Look that one up and see how it is used to create 'virtual' serial communications ports. Also, as for the 'no...
by Douglas6
Tue Sep 28, 2021 5:19 am
Forum: Troubleshooting
Topic: Bluetooth connecting but no audio (even on fresh install)
Replies: 2
Views: 276

Re: Bluetooth connecting but no audio (even on fresh install)

A few hours (and some concentrated Googling) later, I seem to be sorted. Raspotify is playing nicely on the latest Buster, as-is, with PulseAudio. The trick for me was to explicitly tell librespot which audio device to use. I just added "--device plughw:2,0" (for my case) in the ExecStart=...
by Douglas6
Mon Sep 27, 2021 6:29 pm
Forum: Troubleshooting
Topic: Bluetooth connecting but no audio (even on fresh install)
Replies: 2
Views: 276

Re: Bluetooth connecting but no audio (even on fresh install)

Thank you, MinaDarsh. I finally got Raspotify running (by "yeeting" out PA and using BlueALSA, as you say).

But only to a Bluetooth speaker. Can't I use the A/V jack or a sound card? Is anybody using Raspotify with the latest Raspi OS?

Anybody?
by Douglas6
Sun Sep 05, 2021 3:43 am
Forum: Beginners
Topic: RPI 4 Bluetooth Audio device - can't connect
Replies: 5
Views: 501

Re: RPI 4 Bluetooth Audio device - can't connect

Did you pair the device in the Bluetooth menu?
by Douglas6
Sun Sep 05, 2021 3:12 am
Forum: Troubleshooting
Topic: Bluetooth receiver connection problem
Replies: 1
Views: 173

Re: Bluetooth receiver connection problem

If you must forget the Pi on the remote device, you'll need to re-pair it with the Pi before using it again. To do that, you'll need to forget it on the Pi first. Using bluetoothctl you can 'remove <bdaddr>'. You're then ready to pair up again.
by Douglas6
Mon Aug 30, 2021 7:32 pm
Forum: C/C++
Topic: Definitive BLE guide(BlueZ) and gatt-server implementation
Replies: 18
Views: 2407

Re: Definitive BLE guide(BlueZ) and gatt-server implementation

Fanoush is correct. You are building the services, but you are not advertising them. As far as BlueZ goes, two very different things. I can't speak for the C code, but the Python example-gatt-server does NOT advertise; you'll need to run example-advertisement as well. For my money, there's no reason...

Go to advanced search