Go to advanced search

by Douglas6
Fri Jul 19, 2019 12:53 pm
Forum: General discussion
Topic: Bluetooth states No usable services
Replies: 17
Views: 21897

Re: Bluetooth states No usable services

1. Not true. Classic Bluetooth has no central/peripheral concept. And of course you can connect a Pi to a phone for audio streaming, serial communications, file transfer etc.

2. Generally true for serial communications. Other rfcomm commands may be used.
by Douglas6
Thu Jul 18, 2019 3:46 pm
Forum: Advanced users
Topic: RPI4 Bluetooth Chip
Replies: 2
Views: 144

Re: RPI4 Bluetooth Chip

My understanding is that it's the same chip as the Pi3B, but with (slightly) updated firmware.
by Douglas6
Tue Jul 16, 2019 12:44 pm
Forum: Networking and servers
Topic: BLE connection with an android
Replies: 11
Views: 682

Re: BLE connection with an android

I believe that nRF Connect labels services using the local name included in the advertising packet. I think local name is not working in BlueZ 5.43, so you may be out of luck. If you have upgraded BlueZ or are using Buster, you can try setting the local_name on the Advertisement. I don't know what n...
by Douglas6
Tue Jul 16, 2019 12:00 pm
Forum: Automation, sensing and robotics
Topic: Arduino motor control from Pi 3B+
Replies: 11
Views: 305

Re: Arduino motor control from Pi 3B+

This is where I am stuck I think. I can see the text I send from the Pi but I don't know how to send command, as they just show up as text on the Arduino. I'm also not sure how to integrate the communication on the Pi into a Python script, as I am currently sending the messages from the Terminal wi...
by Douglas6
Tue Jul 16, 2019 12:55 am
Forum: Gaming
Topic: Show if someone want to talk to me
Replies: 4
Views: 168

Re: Show if someone want to talk to me

You want a notification while you are watching TV to go play video games? Perhaps there is an issue here larger than the Pi can resolve? Get some air.
by Douglas6
Tue Jul 16, 2019 12:29 am
Forum: Automation, sensing and robotics
Topic: Programming an adafruit trinket from Rasperrypi
Replies: 2
Views: 99

Re: Programming an adafruit trinket from Rasperrypi

Technically, it should be possible to program a 5v Trinket with a Pi. You would need to use several voltage dividers at critical points, and it's not guaranteed. Given the cost of the Trinket, I would simply purchase a 3v3 version and not incur the additional headaches.
by Douglas6
Mon Jul 15, 2019 10:56 pm
Forum: Automation, sensing and robotics
Topic: Arduino motor control from Pi 3B+
Replies: 11
Views: 305

Re: Arduino motor control from Pi 3B+

If you wish to continue with Bluetooth, you'll need to be more specific about your issue. You say you can send messages from the Pi to the "Arduino serial monitor". That implies to me that you are sending them to the Arduino. So instead of printing them to the Arduino's serial port, you can test the...
by Douglas6
Sat Jul 13, 2019 11:20 pm
Forum: Python
Topic: Initiating and controlling omxplayer using a python app
Replies: 9
Views: 4900

Re: Initiating and controlling omxplayer using a python app

Ctrl-C is the standard way to halt an interactive Python program.
by Douglas6
Sat Jul 13, 2019 11:18 pm
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 212
Views: 4960

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

Michiel O. wrote:
Sat Jul 13, 2019 11:13 pm
You might better ask yourself why JavaScript has become so popular.
I ask myself that all the time.
by Douglas6
Sat Jul 13, 2019 11:07 pm
Forum: General discussion
Topic: Mirror the screen of the smartphone
Replies: 11
Views: 326

Re: Mirror the screen of the smartphone

Ok. 1. Use bluetoothctl to pair your Bluetooth speaker. 2. Create a ~/.asoundrc file and enter the following: defaults.bluealsa.service "org.bluealsa" defaults.bluealsa.device "XX:XX:XX:XX:XX:XX" defaults.bluealsa.profile "a2dp" defaults.bluealsa.delay 10000 Use your speaker's bdaddr. Save the file....
by Douglas6
Sat Jul 13, 2019 10:50 pm
Forum: General discussion
Topic: Mirror the screen of the smartphone
Replies: 11
Views: 326

Re: Mirror the screen of the smartphone

Andyroo wrote:
Sat Jul 13, 2019 10:16 pm
Do you have a different one then?
It's gotten so easy, there's really no need for a guide. Start with Raspbian straight out of the box:
1. Use the Bluetooth icon on the desktop to pair your Bluetooth speaker.
2. Right click on the audio icon and select your Bluetooth speaker.

Done and done.
by Douglas6
Sat Jul 13, 2019 10:13 pm
Forum: General discussion
Topic: Mirror the screen of the smartphone
Replies: 11
Views: 326

Re: Mirror the screen of the smartphone

Please don't use that guide for a Bluetooth speaker on any recent version of Raspbian.

As for video over Bluetooth, that dog won't hunt.
by Douglas6
Sat Jul 13, 2019 12:17 pm
Forum: Beginners
Topic: Controlling the Pi with Android via Bluetooth
Replies: 6
Views: 120

Re: Controlling the Pi with Android via Bluetooth

You can use rfcomm and getty to create a terminal over a Bluetooth Serial link. See here: https://www.raspberrypi.org/forums/view ... 25#p955425
by Douglas6
Fri Jul 12, 2019 10:20 pm
Forum: Troubleshooting
Topic: Bluetooth issue when python script run from boot console
Replies: 13
Views: 246

Re: Bluetooth issue when python script run from boot console

No, I believe it's

Code: Select all

sleep 20; sudo python3 /home/pi/keypad_rpi/test_rfid.py 
with a semicolon between commands. Or you can put a sleep() at the top of the Python script.
by Douglas6
Fri Jul 12, 2019 9:44 pm
Forum: Troubleshooting
Topic: Bluetooth issue when python script run from boot console
Replies: 13
Views: 246

Re: Bluetooth issue when python script run from boot console

My guess is that the Bluetooth stack is not established, or the speaker is not connected when the program needs them. Try adding a 20-second pause to the start of your script.
by Douglas6
Fri Jul 12, 2019 2:18 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 212
Views: 4960

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

Sigh. Another "my language is better than your language" thread. What strikes me about this one is the OP's unsubstantiated 20x - 100x performance improvement claim. Any real-world evidence?
by Douglas6
Fri Jul 12, 2019 1:15 am
Forum: Networking and servers
Topic: BLE connection with an android
Replies: 11
Views: 682

Re: BLE connection with an android

सुखिनोऽभव
by Douglas6
Thu Jul 11, 2019 10:53 pm
Forum: Troubleshooting
Topic: No sound interfaces working, including Bluetooth
Replies: 4
Views: 101

Re: No sound interfaces working, including Bluetooth

Yuppers. You could try uninstalling PulseAudio and undoing any other changes you've made to sound system configuration files, but it might be easier and surer to start over.
by Douglas6
Wed Jul 10, 2019 10:42 pm
Forum: Troubleshooting
Topic: No sound interfaces working, including Bluetooth
Replies: 4
Views: 101

Re: No sound interfaces working, including Bluetooth

My recommendation is to flash a fresh new version of the OS. Then, don't install PulseAudio. Absolutely no need for a beginner to use that. Then use aplay to try to play .wav files. Then, if you are still having troubles, post a question here with specific software and output types you are trying to...
by Douglas6
Tue Jul 09, 2019 12:31 pm
Forum: Networking and servers
Topic: MQTT-SN over Bluetooth
Replies: 10
Views: 243

Re: MQTT-SN over Bluetooth

I found a few things, a lot of it built on micro:bits. I'm not sure I see the point in stretching MQTT(-SN) all the way out to the edge (sensors), vs. using good ole GATT services and some translation at the gateway. But my understanding is very low at this point.
by Douglas6
Tue Jul 09, 2019 11:45 am
Forum: Networking and servers
Topic: MQTT-SN over Bluetooth
Replies: 10
Views: 243

Re: MQTT-SN over Bluetooth

You need to draw the strong distinction between MQTT which uses TCP/IP and MQTT-SN (MQTT for sensor networks) which can use things like UDP/IP, ZigBee, Zwave and BLE. Sorry, I thought I was, by referencing MQTT, and not MQTT-SN. I believe the OP understands that as well. This thread is the first I'...
by Douglas6
Tue Jul 09, 2019 11:12 am
Forum: Networking and servers
Topic: MQTT-SN over Bluetooth
Replies: 10
Views: 243

Re: MQTT-SN over Bluetooth

Make sure you are using up-to-date examples. Anything mentioning 'pand', for example, is too old. Also, please post your results. I think MQTT over Bluetooth would be of some interest.
by Douglas6
Mon Jul 08, 2019 10:33 pm
Forum: Networking and servers
Topic: MQTT-SN over Bluetooth
Replies: 10
Views: 243

Re: MQTT-SN over Bluetooth

Technically, TCP/IP is possible over Bluetooth using BNEP (Bluetooth Network Encapsulation Protocol.) I haven't played with it in years and years, but I assume you could use the Network Access Profile (NAP) to create a small Personal Area Network (PAN), and run MQTT over that. Again, I can't help, b...
by Douglas6
Wed Jul 03, 2019 10:04 pm
Forum: Media centres
Topic: [Help needed] bluealsa with apt-x Support
Replies: 1
Views: 119

Re: [Help needed] bluealsa with apt-x Support

You'll need to decide on BlueALSA or PulseAudio; they WILL conflict with one another. BlueALSA is easiest, but I don't think it supports an AptX sink (https://github.com/Arkq/bluez-alsa/issues/142). I don't know about later versions of PulseAudio, but you'll need to uninstall BlueALSA first.
by Douglas6
Mon Jul 01, 2019 8:53 pm
Forum: Python
Topic: Using the 'OR' operator with GPIO and keyboard inputs
Replies: 24
Views: 562

Re: Using the 'OR' operator with GPIO and keyboard inputs

Non-blocking keyboard input in Python is a little tricky, but using gpiozero (https://gpiozero.readthedocs.io/en/stable/) instead of RPI.GPIO, you can setup a callback function for when a button is pressed, even if the program is waiting on the keyboard (I think).

Go to advanced search