Go to advanced search

by Douglas6
Sat Jul 13, 2019 11:07 pm
Forum: General discussion
Topic: Mirror the screen of the smartphone
Replies: 11
Views: 432

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: 432

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: 432

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: 166

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: 350

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: 350

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: 303
Views: 9525

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: 830

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: 142

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: 142

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: 365

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: 365

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: 365

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: 365

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: 225

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: 692

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).
by Douglas6
Mon Jul 01, 2019 6:15 pm
Forum: Python
Topic: Using the 'OR' operator with GPIO and keyboard inputs
Replies: 24
Views: 692

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

The getpass() function is blocking, right? That means your code will wait for keyboard input before ever testing for a button press. Have you tried holding down the button while entering an invalid password? That should prove that your problem is not with the if statement.
by Douglas6
Fri Jun 28, 2019 11:56 pm
Forum: Python
Topic: Trigger gpio when a device connects
Replies: 12
Views: 1124

Re: Trigger gpio when a device connects

For Bluetooth devices you can look at my github https://github.com/Douglas6/blueplayer. It primarily deals with a mediaPlayer, but also covers general Bluetooth connections and disconnections.
by Douglas6
Wed Jun 26, 2019 1:28 am
Forum: General discussion
Topic: Raspberry Pi 4 - Sleep Mode
Replies: 7
Views: 2072

Re: Raspberry Pi 4 - Sleep Mode

You seem to conflate the purposes of the Pi with your own purposes. By all means, look at alternatives. The Pi is not intended to replace the Edison. It's your responsibility to find a replacement.
by Douglas6
Wed Jun 26, 2019 12:18 am
Forum: Troubleshooting
Topic: Bluetooth Issue
Replies: 10
Views: 458

Re: Bluetooth Issue

Alright good. I'll start with transferring files from your Pi to another device. I wrote this up once as you have seemed to discover: https://www.raspberrypi.org/forums/viewtopic.php?p=675983#p675983. That was some time ago, so I'll try it again. I will be using a fresh install of Raspbian full. If ...
by Douglas6
Tue Jun 25, 2019 9:05 pm
Forum: Troubleshooting
Topic: Bluetooth Issue
Replies: 10
Views: 458

Re: Bluetooth Issue

I understand your frustration. It has been said that BlueZ (the Raspbian Bluetooth stack) is one of the best-kept secrets on the internet. Did I read correctly that the bluetooth on the Pi is but a template at this juncture and really has no features other than artifacts left behind by the engineers...
by Douglas6
Tue Jun 25, 2019 7:04 pm
Forum: Troubleshooting
Topic: Bluetooth Issue
Replies: 10
Views: 458

Re: Bluetooth Issue

I have been using Bluetooth on the Pi for about 5 years, and have had few problems, after researching the right way to do things. Bluetooth can be used for a wide range of functionality; audio streaming, file transfer, networking, serial communications, HID connections, etc. None of these are config...
by Douglas6
Sun Jun 23, 2019 5:15 pm
Forum: Python
Topic: Trigger gpio when a device connects
Replies: 12
Views: 1124

Re: Trigger gpio when a device connects

For Bluetooth devices it should not be difficult. You can monitor the BlueZ D-Bus bus for connection signals.

No idea about Wi-Fi though.
by Douglas6
Thu Jun 20, 2019 11:19 pm
Forum: General discussion
Topic: Drug testing using Raspberry Pi
Replies: 20
Views: 1110

Re: Drug testing using Raspberry Pi

Remember, you'll not only need sensors for the drugs you want to test for, you'll need a supplier for the drugs you want to test for.
by Douglas6
Thu Jun 20, 2019 9:26 pm
Forum: General discussion
Topic: Getting IP from headless RPi
Replies: 30
Views: 1487

Re: Getting IP from headless RPi

deepo wrote:
Thu Jun 20, 2019 9:14 pm
It makes it a little hard to read, but it works
Ah, sorry about that. I use nRF Connect on my Android, and it displays the data both in hex and ascii.

Go to advanced search