-
Notifications
You must be signed in to change notification settings - Fork 289
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
RFCOMM Support #40
Comments
Is there anything magical about that UUID (in the Pi python app)? I have a very similar example but I can't get the library to list() my device. My own service uses the SERIAL_PORT class and profile (it's based on the same example). |
@mvellon I don't think there is anything magical about the UUID you should be able to use any. But to get my pi python app to work, be discoverable and use SERIAL_PORT I had to do a few things. First I had to run the bluetooth daemon in compatibility mode by adding a "-C" after the bluetoothd line in /etc/systemd/system/dbus-org.bluez.service and then enable serial profile by running "sudo sdptool add SP" Then to make the device visible run "sudo hciconfig hci0 piscan" I got this info from here and here Hope that helps. |
Yep, I've done all that. I can connect to it from another Pi, but not iOS. I will continue to experiment.
Thanks for the quick response tho!
…Sent from my iPad
On Sep 5, 2017, at 5:11 PM, Jeremy Storer ***@***.***> wrote:
@mvellon I don't think there is anything magical about the UUID you should be able to use any. But to get my pi python app to work, be discoverable and use SERIAL_PORT I had to do a few things.
First I had to run the bluetooth daemon in compatibility mode by adding a "-C" after the bluetoothd line in /etc/systemd/system/dbus-org.bluez.service and then enable serial profile by running "sudo sdptool add SP"
Then to make the device visible run "sudo hciconfig hci0 piscan"
I got this info from here and here
Hope that helps.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
No worries. I've only used it with Android so far. I feel like SPP may not be supported on IOS |
@mvellon Did you end up getting it to work with IOS? |
No. I think that iOS has limited support for classic Bluetooth. If you’re not a “blessed” iOS perisperhal, you generally need to go the BLE route with GATT advertisements/services/characteristics.
…--
Manny Vellon, CTO/Partner
1501 Fourth Avenue
Suite 2900
Seattle, Washington 98101
425-241-2796 Direct
Level11.com
On Sep 11, 2017, at 9:14 AM, Jeremy Storer ***@***.***> wrote:
@mvellon <https://github.com/mvellon> Did you end up getting it to work with IOS?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#40 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ACXW6mNNbx2RJIJ8c9LGwqDPDpn0iTPkks5shVxJgaJpZM4NUtKU>.
|
Oh, and iOS doesn’t seem to support RFCOMM in its BLE stack.
…--
Manny Vellon, CTO/Partner
1501 Fourth Avenue
Suite 2900
Seattle, Washington 98101
425-241-2796 Direct
Level11.com
On Sep 11, 2017, at 9:15 AM, Manny Vellon ***@***.***> wrote:
No. I think that iOS has limited support for classic Bluetooth. If you’re not a “blessed” iOS perisperhal, you generally need to go the BLE route with GATT advertisements/services/characteristics.
--
Manny Vellon, CTO/Partner
<UNADJUSTEDNONRAW_thumb_5.jpg>
1501 Fourth Avenue
Suite 2900
Seattle, Washington 98101
425-241-2796 Direct
Level11.com <http://level11.com/>
> On Sep 11, 2017, at 9:14 AM, Jeremy Storer ***@***.*** ***@***.***>> wrote:
>
> @mvellon <https://github.com/mvellon> Did you end up getting it to work with IOS?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub <#40 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ACXW6mNNbx2RJIJ8c9LGwqDPDpn0iTPkks5shVxJgaJpZM4NUtKU>.
>
|
what do i have to do to connect RFCOMM correctly? my remote RFCOMM service works fine with other bluetooth terminal apps (such as) however, after adding a TextInput to the example app, and then calling |
@pstanton |
i'll try appending "\r\n" .. like i said the server seems to work with other android terminals so was expecting it to be easy. there's no character encoding necessary? also, have you had any luck with iOS? using BLE perhaps? we're trying to BLE/uart/serial if RFCOMM doesn't work... |
ah, the line break! that works .. for the TX anyway. I cant seem to read data, i have set up listeners:
but nothing is logged |
I am using essentially the python RFCOMM server I posted above and all I am doing in my RN app after connecting is setting up a listener with a newline delimiter, very similar to you and this all works fine for me.
I use text written to my bluetooth server to stop/start my sending of data. ie.
Then as the RN app is listening for a newline delimiter from my RFCOMM server I am sending my data with a \n appended to it ie.
Regarding using IOS and RFCOMM I haven't tried doing it myself yet but I did find this issue talking about adding in your specific service UUID in the IOS code. I will be testing this out soon once an iphone arrives in the mail. |
@storerjeremy Hey, I am trying to communicate with the raspberry pi with my RN application over a serial connection but i am not getting the pairing and connecting part of the RN code. I have a similar code for the RFCOMM server but still I am not able to find the solution. Can u please help me out with the RN side code. Thank you!! |
@pstanton Hey, did the |
Will this library connect an Android phone and an RFCOMM server?
The text was updated successfully, but these errors were encountered: