Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpradio bluetooth cant connect #47

Open
ikoydg opened this issue Oct 4, 2018 · 22 comments
Open

mpradio bluetooth cant connect #47

ikoydg opened this issue Oct 4, 2018 · 22 comments

Comments

@ikoydg
Copy link

ikoydg commented Oct 4, 2018

its working but, i want to broadcast songs via my phone bluetooth

after pairing and connecting my phone to the RPI 3, it disconnect and cant connect now.
MPRADIO is the name of the rpi bluetooth.
any solution here.

@morrolinux
Copy link
Owner

Hi, is it a fresh install from the repo?
Could you try my latest full raspbian-mpradio image and see how does it compare? Does it work? Thanks!

@morrolinux
Copy link
Owner

PS: when you use the SD card image, you need to wait for it to reboot after first boot after flashing. :)

@ikoydg
Copy link
Author

ikoydg commented Oct 4, 2018

its already working, it transmit song and my radio can receive it. works perfectly except for the BLUETOOTH part.

on my phone side, already paired with MPRADIO bluetooth but cant connect.
on RPI 3 side, cant also connect, but it is paired already.

it can connect before i install MPRADIO, after installation of mp radio, fm transmitter works fine (auto start) but cant connect to bluetooth na.

what file do you need?

@morrolinux
Copy link
Owner

Yeah, I was asking you to try my full system sdcard image to test out Bluetooth functionality. If you have a spare sdcard, please do. I really need to understand something, and that's the most efficient way for me to do it, with all the variables involved.
Anyway have you checked on the diagnostic commands I posted in the "troubleshooting" section of the README.md? Anything off?

@ikoydg
Copy link
Author

ikoydg commented Oct 4, 2018

hmm, kinda weird, i install your img 1.1 version. it work. it transmit my music over my phone to rpi(MPRADIO) via bluetooth. thanks for this

but the APP is not working. "BT CONNECTION ERROR" (im connected,media)
cant change frequency via phone. hope you fix this. this is kinda great. or any fix for this?

for meantime will change config via ssh.

BTW sometimes i just boot to "You are in emergency mode...............................please enter to continue"
no buttons are working here. i just unplug ang replug the RPI. i run my RPI headless, i just notice this when i plug it into a monitor.

@morrolinux
Copy link
Owner

The full image is a few commits behind this repo, so I figure there's an issue with something introduced lately. I'll have to figure out what.
As for the app: the frequency cannot be changed because the image you downloaded is configured in read only mode, therefore the settings file cannot be changed. You can solve this issue by simply attaching a FAT32 usb key with a copy of mpradio.conf in it.
Or just use "utility/roswitch.sh rw" to make it rw

@morrolinux
Copy link
Owner

Just let me know if you succeed

@ikoydg
Copy link
Author

ikoydg commented Oct 5, 2018

sorry for my bad english. i cant explain it properly. but i will try.

i attached the screenshot of the app. as you can see, its paired and connected to the bluetooth. but the app cant detect it.
it do the "utility/roswitch.sh rw".
my phone is connect to mpradio, connected for medua audio
i restarted several times.

when i go to menu then select the SETTINGS, the app crashes.

43206438_2176567032628352_3489146944968720384_n

@ikoydg
Copy link
Author

ikoydg commented Oct 5, 2018

hope this helps. i read the troubleshooting part.
i also try,
sudo systemctl start bt-setup
sudo systemctl enable bt-setup

its still INACTIVE

adsdasasdsadasdasddsa

@morrolinux
Copy link
Owner

What smartphone/Android version are you on?
Have you got the chance to try on another device?
As for the bt-setup service: It's fine for it to be inactive, It's a oneshot script that configures the interface and then quit

@ikoydg
Copy link
Author

ikoydg commented Oct 6, 2018

tried on my 3 phones.
2pcs 0+ (O plus) ultra 3.0
1pc samsung galaxy note 4 android 6.0.1

still no luck.

i also reburn/rewrite?? the image on sd card.
still no luck...

@morrolinux
Copy link
Owner

Umh alright.. that's leading me to think it's a raspberry-side issue rather than an App issue.
I would need the output of the following commands:

systemctl status dbus-org.bluez.service
systemctl status obexpushd.service
systemctl status rfcomm.service
systemctl status simple-agent.service

If "mpradio" bluetooth device is paired to your phone, the App will start looking for it in the device list, and then attempt to connect through rfcomm. If rfcomm service is not rounning, that's one possible reason why you get the error from the app.

@ikoydg
Copy link
Author

ikoydg commented Oct 7, 2018

Here are the results, hope this helps.

systemctl status dbus-org.bluez.service
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-10-06 06:17:10 UTC; 20h ago
Docs: man:bluetoothd(8)
Main PID: 659 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─659 /usr/lib/bluetooth/bluetoothd -C
Oct 06 06:17:10 raspberrypi.local bluetoothd[659]: Starting SDP server
Oct 06 06:17:11 raspberrypi.local bluetoothd[659]: Bluetooth management interface 1.14 initialized
Oct 06 06:17:11 raspberrypi.local bluetoothd[659]: Failed to obtain handles for "Service Changed" characteristic
Oct 06 06:17:11 raspberrypi.local bluetoothd[659]: Sap driver initialization failed.
Oct 06 06:17:11 raspberrypi.local bluetoothd[659]: sap-server: Operation not permitted (1)
Oct 06 06:17:11 raspberrypi.local bluetoothd[659]: Endpoint registered: sender=:1.7 path=/A2DP/SBC/Source/1
Oct 06 06:17:11 raspberrypi.local bluetoothd[659]: Endpoint registered: sender=:1.7 path=/A2DP/SBC/Sink/1
Oct 07 03:12:23 raspberrypi.local bluetoothd[659]: Endpoint registered: sender=:1.7 path=/A2DP/SBC/Sink/2
Oct 07 03:13:00 raspberrypi.local bluetoothd[659]: D-Bus failed to register /org/bluez/hci0/dev_D8_6C_02_84_9E_F3/player0 path
Oct 07 03:13:22 raspberrypi.local bluetoothd[659]: /org/bluez/hci0/dev_D8_6C_02_84_9E_F3/fd0: fd(28) ready

pi@raspberrypi:~ $ systemctl status obexpushd.service
● obexpushd.service - obex file transfer service
Loaded: loaded (/etc/systemd/system/obexpushd.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-10-06 06:17:14 UTC; 21h ago
Main PID: 756 (obexpushd)
CGroup: /system.slice/obexpushd.service
└─756 /usr/bin/obexpushd -B -n -o /pirateradio/ -s /bin/file_storage.sh -t FTP
Oct 06 06:17:14 raspberrypi.local systemd[1]: Started obex file transfer service.
Oct 06 06:17:14 raspberrypi.local obexpushd[756]: obexpushd 0.11.2 Copyright (C) 2006-2010 Hendrik Sattler
Oct 06 06:17:14 raspberrypi.local obexpushd[756]: This software comes with ABSOLUTELY NO WARRANTY.
Oct 06 06:17:14 raspberrypi.local obexpushd[756]: This is free software, and you are welcome to redistribute it
Oct 06 06:17:14 raspberrypi.local obexpushd[756]: under certain conditions.
Oct 06 06:17:14 raspberrypi.local obexpushd[756]: Listening on bluetooth/[00:00:00:00:00:00]:9

pi@raspberrypi:~ $ systemctl status rfcomm.service
● rfcomm.service - RFCOMM service
Loaded: loaded (/etc/systemd/system/rfcomm.service; disabled; vendor preset: enabled)
Active: inactive (dead)

pi@raspberrypi:~ $ systemctl status simple-agent.service
● simple-agent.service - simple-agent service
Loaded: loaded (/etc/systemd/system/simple-agent.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-10-06 06:17:14 UTC; 21h ago
Main PID: 755 (simple-agent)
CGroup: /system.slice/simple-agent.service
└─755 /usr/bin/python /bin/simple-agent
Oct 06 06:17:14 raspberrypi.local systemd[1]: Started simple-agent service.
Oct 06 06:17:14 raspberrypi.local bash[755]: mesg: ttyname failed: Inappropriate ioctl for device

@morrolinux
Copy link
Owner

just for testing purposes... when you're connnected on the CLI, try issuing
systemctl start rfcomm.service
and check if it's running with
systemctl status rfcomm.service
if it is, you can try pairing your phone again and the app should work.
Then we would have to figure out why it isn't starting automatically upon boot

@ikoydg
Copy link
Author

ikoydg commented Oct 9, 2018

busy week :)
app still not working my friend.

@morrolinux
Copy link
Owner

was the service running or not?

@ikoydg
Copy link
Author

ikoydg commented Oct 10, 2018

i do status first, and the service is not running.
then i start the service and check it again, and its active and running, tried again to pair other phones ( i borrowed my friend android phone, just for troubleshoot but still no work)

tried it on my phone still not working.

any logs? or something i can show?

thanks

@morrolinux
Copy link
Owner

Did it fail at pairing? Or just with the app?

@ikoydg
Copy link
Author

ikoydg commented Oct 10, 2018

successfully paired and playing audio via bluetooth.
but the app is always crushing.

its ok for me na. for meantime i use ssh and edit pirateradio.config via ssh.
its ok to closed for now.

thanks..

@morrolinux
Copy link
Owner

I guess I'll have to investigate that further... keep you updated if I make progress

@morrolinux
Copy link
Owner

Bluetooth audio should work fine
The app crash could also be an Android app problem because of storage path

@morrolinux
Copy link
Owner

Have you tried bluetooth audio yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants