meshtastic / js

JS/TS library for interfacing with Meshtastic devices
https://meshtastic.org
GNU General Public License v3.0
74 stars 36 forks source link

GATT operation not authorized #2

Closed chucknitro closed 3 years ago

chucknitro commented 3 years ago
thepoweroftwo commented 3 years ago

Oh yeah. I've come across this error before on Windows. Unfortunately it is beyond the control of the library, this message gets returned by the browser API itself. It occurs when the library tries to send the first message to the device.

What you can try:

The web bluetooth API is still kind of experimental, i'll start testing with my devices again. Let me know what you find, maybe I have overseen something.

chucknitro commented 3 years ago

Thanks. Managed to get passed that error.

Note the read of8ba2bcc2-ee02-4a55-a531-c525c5e454d5 show nothing - was expecting to see hex zero.

Now I have

"Error: Error in meshtasticjs.IBLEConnection.connect: Error in meshtasticjs.IMeshDevice.onConnected: Error in meshtasticjs.IBLEConnection.readFromRadio: Error in meshtasticjs.IMeshDevice.handleFromRadio: Error in meshtasticjs.ProtobufHandler.fromProtobuf: invalid wire type 4 at offset 19 at EventTarget.connect (meshtastic.js:2)"

thepoweroftwo commented 3 years ago

Note the read of 8ba2bcc2-ee02-4a55-a531-c525c5e454d5 show nothing - was expecting to see hex zero.

My bad. I just tried and It seems to return actually nothing if there's no message, not even hex 0.

You can try this special build and paste the console output here, then we have a chance to debug the protocol buffers: meshtastic.zip

Note: This prints the raw hex protobufs of the device's config and received messages. Make sure they don't contain sensitive information.

chucknitro commented 3 years ago

Thanks again for your prompt response.

Your zip file worked great. I went back and downloaded the GIT. That works!!!! My bad 👍

Getting some "fromRadio" events.

geeksville commented 3 years ago

yeah - for no message available, we return an empty protobuf (which is zero bytes long)