Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 31 14:20
    stonehippo edited #401
  • Jan 31 14:17
    stonehippo opened #401
  • Jan 29 18:49
    leo-tavares closed #400
  • Jan 29 15:39
    leo-tavares edited #400
  • Jan 29 15:37
    leo-tavares edited #400
  • Jan 29 15:33
    leo-tavares edited #400
  • Jan 29 15:31
    leo-tavares edited #400
  • Jan 29 15:31
    leo-tavares opened #400
  • Jan 28 19:17
    paulreimer closed #398
  • Jan 26 19:05
    bhenav edited #399
  • Jan 26 18:34
    bhenav edited #399
  • Jan 26 18:33
    bhenav edited #399
  • Jan 26 18:32
    bhenav edited #399
  • Jan 26 18:25
    bhenav edited #399
  • Jan 26 18:24
    bhenav edited #399
  • Jan 26 18:21
    bhenav edited #399
  • Jan 26 18:20
    bhenav opened #399
  • Jan 26 00:03
    paulreimer opened #398
  • Jan 25 23:46
    paulreimer opened #397
  • Jan 25 23:20
    ChrisEdson opened #396
Dariusz Seweryn
@dariuszseweryn
@andrewsadowski @snuuve check Wikis of RNBle and RxAndroidBle
Adam Goldschmidt
@AdamGold
Hi! Trying to send 0 to the peripheral does not work (every other digit works).
Using Buffer.from([5, 0, null]) does not actually send 0. Buffer.from([5, 2, null]) works.
Any ideas?
Dariusz Seweryn
@dariuszseweryn
Buffer.from([5, 0]).toString('base64')
That is what I would expect
That is a question for Buffer experts
Adam Goldschmidt
@AdamGold
Yeah tried that, didn't work
JWeissmuller
@JWeissmuller
Hello, I'm just getting started at this, is this library appropriate for reading from an already paired bluetooth device? I'm trying to read from a barcode scanner.
Kevin Zou
@MingchaoZou_twitter
Hey, this morning, I opened the xcode, it automatically installed some packages.
Then my app failed to build because of the code from 'react-native-ble' library using "canSendWriteWithoutResponse"
image.png
Web Solutions
@ITsolution-git

Hi @dariuszseweryn and everyone
Knowing that you are super busy, I have one question.

How can I request permission in Android for BLE? I don't have any issues on IOS and other android devices but only Samsung S8 devices keeps responding "Not authorized to access BLE" when I try to scan.

Not sure I am describing the issue properly but seems like I have to do something to do with requesting permission. I added android.permission.BLUETOOTH and _ADMIN in manifest.

Thanks a lot.

Diego H. Gurpegui
@diegogurpegui

Check by adding this permission:

 <uses-permission-sdk-23 android:name="android.permission.ACCESS_COARSE_LOCATION"/>

I don't remember if we added it for BLE or for something else

Dariusz Seweryn
@dariuszseweryn
Google android runtime permissions
Diego H. Gurpegui
@diegogurpegui

Hello, I'm just getting started at this, is this library appropriate for reading from an already paired bluetooth device? I'm trying to read from a barcode scanner.

I don't think so. I mean, you need to pair with the device from the react-native app. If the BLE device was paired somewhere else I don't think you can read it. But I didn't try it

Web Solutions
@ITsolution-git
@diegogurpegui I have already added it.
@dariuszseweryn https://facebook.github.io/react-native/docs/permissionsandroid
I can't find BLE related runtime permission from the link above.
Dariusz Seweryn
@dariuszseweryn
It's location for BLE
Web Solutions
@ITsolution-git
I solved that issue by requesting runtime location permission. Thanks @dariuszseweryn
Andy R.
@adrphlhome_gitlab

Hello everyone and @dariuszseweryn

After I write command to the device, the device starts to send data back. But it timed out after a few seconds or after around 100 bytes or 15-20 onMonitor fire. I am studying the source code of the module but not sure what the issue is.

I am not sure if it's byte limit or timeout limit.

Can you please help me sort out the situation?
Thanks!

Dariusz Seweryn
@dariuszseweryn
It is most probably an implementation detail of your peripheral. I do not know all peripherals
Diego H. Gurpegui
@diegogurpegui
Hey everyone!
Does anyone have a problem with a device disconnecting extremely often? It happens on iOS (probably started from iOS 13 upgrade).
The disconnect even keeps firing every few minutes sometimes (with error = null, but I think it's a known problem of iOS)
Andy R.
@adrphlhome_gitlab
@dariuszseweryn the device keeps sending data to the same Notification UUID for over 30 mins.
Could you help me with how this kind of data streaming should be built on both RN and the peripheral? Or any reference link?
Thank you!
Dariusz Seweryn
@dariuszseweryn
The question you asked is quite general. We have a sample app here https://github.com/Cierpliwy/SensorTag
AFAIR it does showcase usage of notifications
Adam Goldschmidt
@AdamGold
I believe I'm getting the same behavior since iOS 13 - the data isn't being sent after X seconds.
I timed it to be about 10-15 seconds
It's the first time I'm experiencing this.
xdrcix
@xdrcix
Hello guys!
I am currently stuck trying to convert the base64 message encoding into an Ascii string. Is there a specific library that people are using with react-native to accomplish this task?
Web Solutions
@ITsolution-git
Hi @AdamGold. Yes that's what I have experienced as well. Not sure how to sort it out. I hope we can keep update each other how it's going. Thanks!
@xdrcix
const Buffer = require('buffer').Buffer; // in react native to get nodejs like Buffer module
You can convert various encoding 'hex' 'base64' 'ascii'
base64 to ascii => Buffer.from(base64Value, 'base64').toString('ascii')
Replace from and to format with any encoding you want to convert to.
Adam Goldschmidt
@AdamGold
Hi @ITsolution-git , do you get any response from the peripheral?
I am getting a response but I checked and the data is not being sent.
xdrcix
@xdrcix
@ITsolution-git Thank you! I am very new to ble so I feel like I'm getting stuck on simple methods. If I want to write something to a bluetooth device how do I choose between the two functions writeCharacteristic(With/Without)ResponseForService? I know that I must pass the serviceuuid, characteristicuuid, and I assume the actual message that needs to be passed. However, I am unsure how the parameter Base64 comes into plan in a normal write request.
Dariusz Seweryn
@dariuszseweryn
@xdrcix Check project's Wiki, there is an example
xdrcix
@xdrcix

So I'm trying to follow this blog post https://www.polidea.com/blog/ReactNative_and_Bluetooth_to_An_Other_level/.

Currently, I can connect to my bluetooth device and receive a message transmitted; however, I want to link a button press to a write request and I am having trouble doing so. I'm unsure how I can call a write request in this particular sequence. Also to how exactly would you disconnect from the device?

ShannonManoka
@ShannonManoka
Hi, I am building an app to control a robot from a phone, I am pretty new in react native. I installed the package but I don't understand how to use it. How am I 'building' a button to connect my phone to a bluetooth device. I already add the bluetooth permission.
gtpark65
@gtpark65
is there way to continue read the value from ble device without notify characterisitic?
Web Solutions
@ITsolution-git
@gtpark65 No. you need to use notify to subscribe the data from device.
sendroids-yangbo
@1051435548
Can I connect any scanned deviceļ¼Ÿ
Dariusz Seweryn
@dariuszseweryn
No, beacons are usually not connectable
andiskim
@andiskim
Hi everyone!
Is there a way to use the react-native-ble-plx package to connect to a Raspberry Pi and then allow input for the wifi password (using the react-native-ble-plx package) ? I was able to already successfully connect my iPhone to a Raspberry Pi
gregChambers99
@gregChambers99
Hey I'm having trouble getting raw values to write to the device..is there a sample I can see on how to encode and decode raw values. Not the base64 part but the raw values coming from my device
Dariusz Seweryn
@dariuszseweryn
Check wiki
rdarbas
@rdarbas

Hi everyone,
We are working on a mobile application for industrial swimming pool company, the purpose of the application is to be able to control water treatment devices via Bluetooth.

We use your library on our application and we would like to ask you questions about some issues.

We would like to know how to support bonding ?
Dariusz Seweryn
@dariuszseweryn

We would like to know how to support bonding ?

It is handled automatically by the OS when the peripheral triggers it or responds with INSUFFICIENT_AUTH GATT code

rdarbas
@rdarbas
Thank you @dariuszseweryn