Closed IgorDePaula closed 3 years ago
Going to need substantially more information than you've provided:
Based on your environment, the issue could be anything:
That error message looks like more of a React Native issue, and not a Blueooth Classic library issue - it specifically says you're rendering a child component incorrectly.
This is the mistery, I only put script to scan bluetooth and log him, not write components on screen. But I resolved with another library. Sorry, and Thank you very much for your attention.
Glad you got it working man, sorry I couldn't help.
No problem. Thank you very much for your attention.
I decide try again this lib, but I not got success.
Now is another error:
The code:
Is only this of code. I try connect on ESP32, and sometimes I got error of wrong pin/password, but Android I try pair or connect and I receive this same error, and not appear prompt to I write some pin.
I'll be completely honest, I don't really test or use the pairDevice
in my app, I trust that the device is already paired through the Android Bluetooth settings. Have skipping the pairing to see if that's the issue? If it is, I'd need to play around with it a little to see what's up - although not really a top priority for me at this time.
If you find that the pairing has issues and you fix them, feel free to submit a PR for it.
Anyhow, following the log and the code:
to aki
is logged so that's goodESP32
is logged, which I don't see there so I'm assuming it's from the setDevice
state functionERROR: IOException
is logged which I'm guessing is coming from the device2.connect()
catchYou're connecting with the default configuration:
Looking at the documentation for this chip https://www.espressif.com/sites/default/files/documentation/esp32_bluetooth_architecture_en.pdf
it doesn't look like it supports RFCOMM protocol (even thought it's mentioned): Below are the Classic BT profiles and protocols currently supported in the Host Stack. • Profiles: GAP, A2DP(SNK), AVRCP(CT) • Protocols: L2CAP, SDP, AVDTP, AVCTP
If this is actually the case, there are two options:
RfcommConnectorThreadImpl
can be copied and modified for L2CapConnectorThreadImpl
which may workRfcommConnectorThreadImpl
can be modified to accept another property to determine rfcomm
or l2cap
in which case it would need to be renamed to something better SerialConnectorThreadImpl
? ProtocolConnectorThreadImpl
? Or something else entirely is going on.
I would suggest you take a look at the documentation and either:
Override Auto Loading
feature to create your own L2CapConnectorThreadImpl
and use it within your own appanyhow, look forward to more of your troubleshooting.
I comprehend, and I would like share a feedback. I tried using the serial bluetooth code on ESP32, and the same code on RN, and I got this error:
But, any form, I got success using the react-native-ble-manager lib. Thank you for your complete attention.
Well ble and classic are two completely different things. That error leads me to believe your Bluetooth adapter was off completely, and you weren't catching the exception.
Glad it's working though.
Get Outlook for Androidhttps://aka.ms/ghei36
From: Igor C. de Paula @.> Sent: Tuesday, September 14, 2021 7:07:53 PM To: kenjdavidson/react-native-bluetooth-classic @.> Cc: Ken Davidson @.>; State change @.> Subject: Re: [kenjdavidson/react-native-bluetooth-classic] I can't describe this bug, but don't works (#131)
I comprehend, and I would like share a feedback. I tried using the serial bluetooth code on ESP32, and the same code on RN, and I got this error:
But, any form, I got success using the react-native-ble-manager lib. Thank you for your complete attention.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkenjdavidson%2Freact-native-bluetooth-classic%2Fissues%2F131%23issuecomment-919572908&data=04%7C01%7C%7Cc21c456a87e245e4270f08d977d47b8a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637672576752307136%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6tP%2B7vRupb6ndynBMsfY77TOEAMD4W7KPj2F%2BJVYv3I%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABPMJL3QELESOXDYZBP3S2DUB7IUTANCNFSM5DQU3XUQ&data=04%7C01%7C%7Cc21c456a87e245e4270f08d977d47b8a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637672576752317133%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=PPvghltZ80L%2FHPOe1xQdPbpbmIcIDzmUH4Ry%2BPV1bCo%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7Cc21c456a87e245e4270f08d977d47b8a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637672576752317133%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WxmptSQ95saKMHEmVGZaZ8WYlGrQQr4OzHZppGoCxM4%3D&reserved=0 or Androidhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7Cc21c456a87e245e4270f08d977d47b8a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637672576752327120%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=d0cnl6xRW3I6DCf5nIgWrhXRMbYpMXnD%2F%2FvxoReL80c%3D&reserved=0.
Mobile Device Environment Provide a list of operating systems on which this issue is relevant.
Application Environment Provide information about your development environment:
To Reproduce Steps to reproduce the behavior:
Expected behavior I expected show a list decices available
Screenshots If applicable, add screenshots to help explain your problem.