Unable to read data from bluetooth device. A terminal app available on playstore is successfully receiving the data #199
Answered
by
kenjdavidson
nickanimate
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Check some old issues regarding esp32. It's normally a delimiter issue. I'm on vaca and can't help until next week, but it should work with the correct delimiter.
/n is default
/n/r may be required
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: nickanimate ***@***.***>
Sent: Monday, August 29, 2022 4:11:22 AM
To: kenjdavidson/react-native-bluetooth-classic ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [kenjdavidson/react-native-bluetooth-classic] Unable to read data from bluetooth device. A terminal app available on playstore is successfully receiving the data (Discussion #199)
I am using ESP32 as a bluetooth device. Running app on my Samsung phone with android 12.0. Functional components of React native are used. Device is successfully connecting and writing data but read is not working at all
I have tried separately -
1. let a = await RNBluetoothClassic.readFromDevice(address)
2. let a = await connectedDevice.read()
3. RNBluetoothClassic.addEventListener(BluetoothEventType, readFn())
readFn() => {
let a = RNBluetoothClassic.readFromDevice(address);
console.log(value);
}
In all these cases I am receiving null values
—
Reply to this email directly, view it on GitHub<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkenjdavidson%2Freact-native-bluetooth-classic%2Fdiscussions%2F199&data=05%7C01%7C%7Ceb19d50339394ab4e46108da89a6d37f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637973646854251239%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=p78PjobnwvY9AvugQ78s1aojU0EgJ52Pbirolqdet90%3D&reserved=0>, or unsubscribe<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABPMJLYDF4RSOIEX6X4TG4LV3SEEVANCNFSM575GG6TA&data=05%7C01%7C%7Ceb19d50339394ab4e46108da89a6d37f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637973646854251239%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xRG1Bo5zskOVv9Z67NBtRVP2AR41hKE54kFy2o%2Fg9RY%3D&reserved=0>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Um. I think if you send a null or empty delimiter it will just send all the data to the end of what it has. I'm not 100 percent sure if I implemented that, but that was the plan.
Although it goes against my judgment of the name StringDelimitedDeviceCinnectionImpl.
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: nickanimate ***@***.***>
Sent: Friday, September 2, 2022 1:35:42 AM
To: kenjdavidson/react-native-bluetooth-classic ***@***.***>
Cc: Ken Davidson ***@***.***>; Comment ***@***.***>
Subject: Re: [kenjdavidson/react-native-bluetooth-classic] Unable to read data from bluetooth device. A terminal app available on playstore is successfully receiving the data (Discussion #199)
Hey! Adding Delimiter solved the issue. Thanks for the save!! Also, can we do something from front-end to read the data without delimiter?
—
Reply to this email directly, view it on GitHub<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkenjdavidson%2Freact-native-bluetooth-classic%2Fdiscussions%2F199%23discussioncomment-3533014&data=05%7C01%7C%7C6fc019425f064b35bcba08da8ca4fa74%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637976937445956654%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xX5fCpp05n484qHBPKZqz4puIC8QCr3jAMMyIn2a6p4%3D&reserved=0>, or unsubscribe<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABPMJL6RC7BF5PK4VTC4MP3V4GG25ANCNFSM575GG6TA&data=05%7C01%7C%7C6fc019425f064b35bcba08da8ca4fa74%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637976937445956654%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=89YPyaXpJRchMxtsrNkVBtWse2d4GJcx02s%2BIweVDL8%3D&reserved=0>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
kenjdavidson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using ESP32 as a bluetooth device. Running app on my Samsung phone with android 12.0. Functional components of React native are used. Device is successfully connecting and writing data but read is not working at all
I have tried separately -
readFn() => {
let a = RNBluetoothClassic.readFromDevice(address);
console.log(value);
}
In all these cases I am receiving null values
Beta Was this translation helpful? Give feedback.
All reactions