Closed chucknitro closed 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:
Remove the device from windows bluetooth settings and pair again (if it's not shown there, go to Device Manager, click "View" in the top menu, select "show hidden devices" and then uninstall the device)
Open the site chrome://bluetooth-internals and try to connect to the device and read from a characteristic from there:
6ba1b218-15a8-461f-9fa8-5dcae273eafd
8ba2bcc2-ee02-4a55-a531-c525c5e454d5
, there should appear values other than 0x000000 if you have more than one mesh device running and sending packetsAs a last step: Reflash the firmware of your device (maybe it has something to do with bluetooth key store on it)
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.
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)"
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.
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.
yeah - for no message available, we return an empty protobuf (which is zero bytes long)