Go to advanced search

by Douglas6
Fri Jun 14, 2019 7:34 pm
Forum: Networking and servers
Topic: BLE connection with an android
Replies: 4
Views: 122

Re: BLE connection with an android

You'll need to import from advertisement.py and service.py (which import bletools.py), but you should only need to make modifications to cputemp.py.
by Douglas6
Thu Jun 13, 2019 11:23 pm
Forum: Beginners
Topic: [Guide] Receive files over Bluetooth on the command line
Replies: 9
Views: 16831

Re: [Guide] Receive files over Bluetooth on the command line

What are the results of

Code: Select all

systemctl status obexpush
?
by Douglas6
Thu Jun 13, 2019 4:06 pm
Forum: Networking and servers
Topic: BLE connection with an android
Replies: 4
Views: 122

Re: BLE connection with an android

I just posted some Python code on Github to make a Raspberry Pi GATT server (peripheral).

Clone the repo, read the README, and try the code.

https://github.com/Douglas6/cputemp.git
by Douglas6
Thu Jun 13, 2019 1:41 am
Forum: Beginners
Topic: [Guide] Python BLE GATT server for the Raspberry Pi
Replies: 0
Views: 66

[Guide] Python BLE GATT server for the Raspberry Pi

So, I've published some Python code for creating a BLE GATT server on the Raspberry Pi. I'm not aware of any Python code for this, apart from The BlueZ examples example-advertisement and example-gatt-server from which I heavily stole. I moved the code around a bit, and tried to protect the end user ...
by Douglas6
Wed Jun 12, 2019 10:34 pm
Forum: General discussion
Topic: Using Bluetooth Microphone and 3.5 Speaker
Replies: 1
Views: 55

Re: Using Bluetooth Microphone and 3.5 Speaker

May be your post formatting, but I believe 'device "FC:58:FA:0C:74:0C"' should be on its own line.

I've never used BlueALSA and SCO, so I probably won't be of much help. What kind of microphone? Did you get it paired and trusted sucessfully?
by Douglas6
Sun Jun 09, 2019 2:18 am
Forum: General discussion
Topic: Difference in RASPBIAN STRETCH WITH DESKTOP and RASPBIAN STRETCH LITE.
Replies: 30
Views: 69575

Re: Difference in RASPBIAN STRETCH WITH DESKTOP and RASPBIAN STRETCH LITE.

Raspian lite may skimp on some Bluetooth functionality, like BlueALSA, just so ya know.
by Douglas6
Sat Jun 08, 2019 9:30 am
Forum: Troubleshooting
Topic: Bluetooth and hciuart not working
Replies: 2
Views: 92

Re: Bluetooth and hciuart not working

Try:

Code: Select all

sudo apt-get install pi-bluetooth 
Don't ever use rpi-update.
by Douglas6
Wed Jun 05, 2019 12:25 am
Forum: Raspbian
Topic: The much heralded "Buster"- When?
Replies: 24
Views: 1132

Re: The much heralded "Buster"- When?

When and where have you heard "any day now"?
by Douglas6
Mon Jun 03, 2019 5:13 pm
Forum: Advanced users
Topic: Need help connecting bluetooth device
Replies: 1
Views: 103

Re: Need help connecting bluetooth device

The services that bluetoothctl is reporting on that device (GAP and GATT) seem odd to me. It looks to me like a BLE device. Are you sure it is an HC-05 and not, say, an HM-10? Can you include a pic of the device? Or the source where you purchased it? [EDIT: The device name ('BT05') and manufacturer ...
by Douglas6
Sun Jun 02, 2019 1:47 pm
Forum: Troubleshooting
Topic: STICKY: Bluetooth not working after update - need info
Replies: 160
Views: 143333

Re: STICKY: Bluetooth not working after update - need info

Yes, you should have started a new thread. This one yearns to be locked.

You can try unmasking the hciuart service:

Code: Select all

sudo systemctl unmask hciuart 
Or you could try uninstalling bluetooth and pi-bluetooth and re-installing. But the best bet is to flash a new version of Raspbian Stretch.
by Douglas6
Sat Jun 01, 2019 9:48 pm
Forum: Beginners
Topic: Bluetooth connected to headphones but no sound. Raspberry Pi 3+
Replies: 2
Views: 113

Re: Bluetooth connected to headphones but no sound. Raspberry Pi 3+

My 2 cents: ignore the previous advice. PulseAudio is no longer recommended for Bluetooth streaming on the Pi. BlueALSA is now recommended and already installed (assuming a full install of Stretch.) You'll need to do just two things: 1. Click the Bluetooth icon at the top-right of the desktop to pai...
by Douglas6
Fri May 31, 2019 12:13 pm
Forum: Advanced users
Topic: Transfering Data between two Rpis using BLE
Replies: 17
Views: 1614

Re: Transfering Data between two Rpis using BLE

Here's some code I have to write a characteristic using bluepy: viewtopic.php?f=28&t=193923&p=1214901#p1214901
by Douglas6
Thu May 30, 2019 12:23 pm
Forum: Advanced users
Topic: Transfering Data between two Rpis using BLE
Replies: 17
Views: 1614

Re: Transfering Data between two Rpis using BLE

Are you running example-advertisement on the peripheral?
by Douglas6
Thu May 30, 2019 1:04 am
Forum: C/C++
Topic: Programming bluetooth using C++
Replies: 12
Views: 1273

Re: Programming bluetooth using C++

I have not found SINGLE documentation in "blueZ" package ( source code ) about D_Bus usage. Did you look into the BlueZ github directory as I recommended? Based on your response, I'm guessing no. Again, I can't help if you ignore my advice. If you are looking at using bluetoothctl from a C program,...
by Douglas6
Wed May 29, 2019 8:36 pm
Forum: General discussion
Topic: .asoundrc
Replies: 6
Views: 319

Re: .asoundrc

ALSA's global configuration file is /usr/share/alsa/alsa.conf, renamed some years from /etc/modeprobe.d/alsa-base.conf. The per-user configuration file is ~/.asoundrc and always has been. I use it all the time.
by Douglas6
Wed May 29, 2019 7:12 pm
Forum: Advanced users
Topic: Transfering Data between two Rpis using BLE
Replies: 17
Views: 1614

Re: Transferind Data between two Rpis using BLE

If you have the peripheral working, you can either use example-gatt-client on the central Pi, or use bluepy to create the client, and connect to and read/write characteristics from the peripheral. Lots of examples on the Internet.
by Douglas6
Wed May 29, 2019 6:47 pm
Forum: Advanced users
Topic: Transfering Data between two Rpis using BLE
Replies: 17
Views: 1614

Re: Transferind Data between two Rpis using BLE

There's sample Pi code in the test directory of the BlueZ github (example-gatt-server and example-gatt-client). They interface directly with BlueZ through its D-Bus interfaces. You can't use bluepy for central coding. There's a Python port of the node.js bleno library, but I've never used it.
by Douglas6
Wed May 29, 2019 2:10 pm
Forum: Advanced users
Topic: Transfering Data between two Rpis using BLE
Replies: 17
Views: 1614

Re: Transferind Data between two Rpis using BLE

There are no services running out of the box on the Pi, so no connection to be made. You'll need to set up a service on one Pi (the 'peripheral'), and add at least one characteristic. You'll need to start advertising on the peripheral. Then, on the other Pi (the 'central'), you should be able to con...
by Douglas6
Wed May 29, 2019 2:00 pm
Forum: General discussion
Topic: Read BLE device service, characteristic and descriptors
Replies: 6
Views: 423

Re: Read BLE device service, characteristic and descriptors

I'm not understanding, and of course I don't know how your Bluetooth device works. You say you are reading a characteristic on the Pi. So you have the data. I'm afraid I don't understand where notifications come in. There's a section in the bluepy documentation on how to read notifications, if your ...
by Douglas6
Wed May 29, 2019 1:52 pm
Forum: General discussion
Topic: .asoundrc
Replies: 6
Views: 319

Re: .asoundrc

I'm not sure if there is still a question? Have you done this?

Code: Select all

cd ~
nano .asoundrc
If there is text in the file, edit it. If not, add it. Save the file.
by Douglas6
Tue May 28, 2019 12:04 pm
Forum: General discussion
Topic: .asoundrc
Replies: 6
Views: 319

Re: .asoundrc

That file should be in your home directory, /home/pi, for example. But it's not necessary and may not be there by default. Create it if you need to.

Oh, also that's a hidden file, as seen by the prepended dot. 'ls -a' should show it if it's there.
by Douglas6
Tue May 28, 2019 10:51 am
Forum: Advanced users
Topic: Transfering Data between two Rpis using BLE
Replies: 17
Views: 1614

Re: Transferind Data between two Rpis using BLE

Possibly. What's your question?
by Douglas6
Tue May 28, 2019 10:48 am
Forum: General discussion
Topic: Read BLE device service, characteristic and descriptors
Replies: 6
Views: 423

Re: Read BLE device service, characteristic and descriptors

Node.js has excellent BLE libraries bleno and noble. I've used bluepy with Python. The BlueZ github has examples in Python and C. Gatttool and bluetoothctl are good CLI interfaces for exploring BLE devices.
by Douglas6
Mon May 27, 2019 2:37 pm
Forum: Other projects
Topic: External GPS with the pi zero w
Replies: 4
Views: 301

Re: External GPS with the pi zero w

Ok, you'll need to connect the GPS module to the Pi. I would use the default UARTs. Then you'll need to add the Bluetooth Serial Port Profile to the Pi, and use rfcomm to create a virtual serial port over Bluetooth. Then some software to read from the GPS and write to the /dev/rfcomm0 device. Plenty...

Go to advanced search