by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 31 2019 14:20
    stonehippo edited #401
  • Jan 31 2019 14:17
    stonehippo opened #401
  • Jan 29 2019 18:49
    leo-tavares closed #400
  • Jan 29 2019 15:39
    leo-tavares edited #400
  • Jan 29 2019 15:37
    leo-tavares edited #400
  • Jan 29 2019 15:33
    leo-tavares edited #400
  • Jan 29 2019 15:31
    leo-tavares edited #400
  • Jan 29 2019 15:31
    leo-tavares opened #400
  • Jan 28 2019 19:17
    paulreimer closed #398
  • Jan 26 2019 19:05
    bhenav edited #399
  • Jan 26 2019 18:34
    bhenav edited #399
  • Jan 26 2019 18:33
    bhenav edited #399
  • Jan 26 2019 18:32
    bhenav edited #399
  • Jan 26 2019 18:25
    bhenav edited #399
  • Jan 26 2019 18:24
    bhenav edited #399
  • Jan 26 2019 18:21
    bhenav edited #399
  • Jan 26 2019 18:20
    bhenav opened #399
  • Jan 26 2019 00:03
    paulreimer opened #398
  • Jan 25 2019 23:46
    paulreimer opened #397
  • Jan 25 2019 23:20
    ChrisEdson opened #396
Aly Abdelrahman
@abdelrahmanaly
hello
I am confused on how I can write with react-native-ble-plx
thank you
Dariusz Seweryn
@dariuszseweryn
What exactly gets you confused?
Aly Abdelrahman
@abdelrahmanaly
when I connect to the device
I get device promise, but If I want to write, I am wondering how I can dynamically get the device's UUID, and characteristic UUID so I can write to the bluetooth module
Dariusz Seweryn
@dariuszseweryn
And what google tells you about how to discover BLE devices and how to discover characteristics they use?
Antonio de Perio
@adeperio_twitter
Hi, I keep having a problem with BLEManager.connectDevice. I keep getting an Operation Timed Out error, but no detail or error message to help me debug the problem
Is there a way to get more detail about why a device is timing out?
I"ve increased the timeout to a minute as well and that doesn;t help so something is happening internally that I don't have any visibility on
Dariusz Seweryn
@dariuszseweryn
it's an operation timing out so the app cannot connect in time to your peripheral
psi
@annazus
This library is great! Thank you. My question has to do with deviceId on iOS. Once I pair with a device, can I use the stored deviceId to reconnect with the device in the future?
Assuming the device is in advertising mode and connectable.
Dariusz Seweryn
@dariuszseweryn
@annazus Yes, it should be so
psi
@annazus
Thanks @dariuszseweryn
psi
@annazus
When I scan for a new BLE device, the first time usually neither localName and or name are available on the device. After I connect to it and then say scan again - the device name and localName are available. On occasion even the manufacturer data is missing . The strange part is I can see those fields using a BLE scanner app like nRF connect.
Any tips on how I can obtain localName, name and manufacturer data consistently like nRF connect does?
Dariusz Seweryn
@dariuszseweryn
I expect you have to aggregate data for a particular peripheral. iOS for instance is known for populating localName asynchronously
psi
@annazus
Yes, that makes sense. Thanks again.
Christian Bongardt
@chrbongardt
Hi guys, I'm experiencing some strange issue. When I start the device scan, if I update the react state of the current view, I never get any results on the callback.
Any tips?
Christian Bongardt
@chrbongardt
I fixed it by declaring the BLEManager outside of my stateless component
Andrew Sadowski
@andrewsadowski
I recently upgraded from RN 59.1 (with RN-ble-plx at V.1.0.3) to RN 62 (with RN-ble-plx at V.2.0.0) and i'm getting a BleError of Operation Cancelled when calling monitorCharacteristicForDevice. Basically it seems like its timing out and cancelling the interaction. Is there anything that has changed that could account for this, between V1 and V2? Checked again on my previous version and everything worked as expected. When monitoring the native logs, I see this error: ConnectionOperationQueue: Queue's awaitRelease() has been interrupted abruptly while it wasn't released by the release() method. Thanks!
Nishith
@nishith987_twitter
Hey @dariuszseweryn , I am working on connecting multiple sensors (esp32) to android and ios devices, does react-native-ble-plx allow me to connect and receive data between multiple sensors in a given time
João Vítor Pimentel da Silva
@joaovit1_gitlab
Hello, I'm having some problems when I try to retrieve some data from the device object to my stateless component useState hook, I tried a lot of things, but anything works
image.png
Here's what I have right now, setDevice doesn't work
Christian Bongardt
@chrbongardt
Hey João, can you share the rest of your controller? I had similar issues.
In my case it was due because of where I declared the ble manager.
Dariusz Seweryn
@dariuszseweryn
@nishith987_twitter It should be possible
@andrewsadowski Try targeting latest master and check if it is still the case
Andrew Sadowski
@andrewsadowski
Thanks @dariuszseweryn . Is there a newer version beyond 2.0.0? Looking at Master's package.json and it looks like that is the most current version.
Dariusz Seweryn
@dariuszseweryn
Andrew Sadowski
@andrewsadowski
Ah, thank you
Nishith
@nishith987_twitter
yeah Thank you @dariuszseweryn
Aly Abdelrahman
@abdelrahmanaly
Hello all, I am new to javascript so I am having some issues with promises. I'm trying to return my device.id to another component in my react-native file. I keep finding when I return from startDeviceConnection I always get null or undefined. But I am confused on a proper way of returning device.id
williamgoodhew
@williamgoodhew
Hi - I am able to connect to my Bluetooth external device from my phone. I am when I call .connectToDevice() it is connecting properly. In the documentation for the Bluetooth device it says after connecting the phone needs to ask for the token. The token is hexadecimal (0x06 0x01). How do I send this command from the Phone to the Bluetooth device. This is what the device documentation says "The connection between the CCU and the mobile phone is BLE 4.0 and compatible. The
mobile phone should actively establish a connection with the CCU through BLE MAC after
scanning code. After the connection is established, the mobile phone immediately sends the
command of get TOKEN (0x06 0x01) to get TOKEN."
_fantasticDev_
@SnakeGeneral
Hello everyone
const bleManager = new BleManager();
useEffect(() => {
    const subscription = bleManager.onStateChange(async (state) => {
        if (state === 'PoweredOn') {
            const permission = await requestLocationPermission();
            if(permission){
                scanAndConnect();
                subscription.remove();
            }
        }
    }, true);
});

const scanAndConnect = () => {
    console.log('scan start');
    bleManager.startDeviceScan(null, null, (error, device) => {
        console.log('scan started');
        if (error) {
            console.log('error:' + error);
        }

        if(device.name != null){
            console.log(device.name);
        }

        if (device.name === 'TI BLE Sensor Tag' ||
            device.name === 'SensorTag') {
            bleManager.stopDeviceScan();
        }
    });
}

return (
    <Background>
        <Logo/>
        <Header>Let’s start</Header>
        <Paragraph>
            Let's start by clicking start button, so app will start bluetooth.
        </Paragraph>
        <Button mode="outlined" onPress={() => console.log('start pressed')}>
            Start
        </Button>
        <Button mode="outlined" onPress={() => console.log('logout pressed')}>
            Logout
        </Button>
    </Background>
);
This code can't scan devices
Please help me
Dariusz Seweryn
@dariuszseweryn
@williamgoodhew Usually this means a characteristic write
@SnakeGeneral Is scan start logged?
Aly Abdelrahman
@abdelrahmanaly
How do you guys reference the class device in order to retrieve device.id?
My apologize let me explain in a better way, how do you save device.id so that you can read better without connecting. I’m trying to use bleManger and sending in device.id instead of connecting, catching a promise and going down till I reach characteristics.
_fantasticDev_
@SnakeGeneral
@dariuszseweryn Yes
Aly Abdelrahman
@abdelrahmanaly
@dariuszseweryn my apologize as well for not responding before when I asked a question. I completely missed the notification.
Dariusz Seweryn
@dariuszseweryn
@SnakeGeneral What OS?
@abdelrahmanaly Characteristics are only available after device has been connected and service discovery was performed
Aly Abdelrahman
@abdelrahmanaly
Screen Shot 2020-06-26 at 12.09.49 PM.png
I've already done that
I am unable to return the result. I can't catch it/ I can only use console.log to print it. but I would like to return it as a value for another function.
I am having issues returning anything in startdevicescan(), whether its a characteristics values or device.id for future use.