Coder Social home page Coder Social logo

Comments (8)

barbibulle avatar barbibulle commented on June 16, 2024

Hi. Thanks for reporting this. We'll take a look shortly to see how that should be fixed.

from golden-gate.

nilstk avatar nilstk commented on June 16, 2024

Any news on this issue @barbibulle ? It happens to me on all my devices (Samsung S7, S8, Google Pixel) and the CoAP message is displayed locally (sending device) only. I'd expected that it gets transmitted to the other (receiving) device. Nevertheless, in the logcat (of the receiving device) I can see some data gets transmitted (encrypted) ... it just never reaches the UI ... any idea where to look for an issue?

from golden-gate.

ShawnW858 avatar ShawnW858 commented on June 16, 2024

hello Nils, Could you share more info of your peripheral device? for the error exception, it seems like the golden gate android app was not able to subscribe the CCCD of Gattlink service on the peer device.

from golden-gate.

nilstk avatar nilstk commented on June 16, 2024

@ShawnW858
Sure, please find attached the whole adb log of my central device (Pixel 3a) connected to a SPro88 that acts as peripheral.

Currently, there are two issues:

  • the mentioned exception above
  • and a send coap message is received on the same device only (even it gets transmitted to the other, connected device apparently)

To me the above exception ("descriptor must not be null" and its following errors) appears to be sort of a racing condition and the descriptor and its service is found later on. Nevertheless, I cannot receive a coap message sent from the peripheral device to central and vice-versa. Taking a closer look at the lower layers and RxSource here, I see that data is received, but it is not forwarded to the UI for unknown reasons. Any idea about that issue? We tested it with several devices now (S7, S8 and Pixel).

Also, I was surprised to see two MAC addresses for the same device. For privacy reasons, I replaced all MAC address with fixed strings like PRIVATE-MAC-SPRO88 or PRIVATE-MAC-SPRO88-NO2 .

Thanks for any help :) !

Log_Pixel_asCentral_modified_mac.txt

from golden-gate.

ShawnW858 avatar ShawnW858 commented on June 16, 2024

I went through your log and it seems like the connection was set up successfully.
StackPeer$getDtlsEventObservable-[main] StackPeer with key BluetoothAddressNodeKey(value=PRIVATE-MAC-S88PRO-NO2) Tls status changed to TLS_STATE_HANDSHAKE StackPeer$getDtlsEventObservable-[main] StackPeer with key BluetoothAddressNodeKey(value=PRIVATE-MAC-S88PRO-NO2) Tls status changed to TLS_STATE_SESSION StackPeer$connect-[main] StackPeer with key BluetoothAddressNodeKey(value=PRIVATE-MAC-S88PRO-NO2) connection has updated its status to CONNECTED
You probably can debug further on the CoAP layer and try with a simple CoAP request and response. You could check if the filter mode of CoAP endpoint is set correctly. Also it's possible that it's a string parsing issue on the example app UI.

Thanks

from golden-gate.

nilstk avatar nilstk commented on June 16, 2024

@ShawnW858 @barbibulle

Hi Shawn,
is there an updated example app available maybe? I tried your provided example app with numerous devices (S7, S8, Pixel, ...) without success now. Sometimes, there is even no connection at all and the above exception along with the GattServiceNotFound exception persists.

If there is a connection between the devices (in my case SPRO88 as peripheral and Pixel as central), hitting the "send coap request over dtls" on the connected peripheral device, results in a received message on the lower layers only and and it has no effect on the UI at all (I'd assume a message like "Hello world!" in the UI of central). You may see it in the logs as RxSource received data.

Therefore, please find attached the log files and a screenshot of the app after I sent a coap message to central.
Is this a device issue or version issue of Android maybe? Both devices have Android 10 at least. May I ask for which version you developed the Android app originally?

Central_Pixel_to_Perip_SPro88_defaultExampleAppLog.txt

Screenshot_ExampleApp_after_received_coap_message_20210729-120128

from golden-gate.

barbibulle avatar barbibulle commented on June 16, 2024

Hi Nils. Once you have a connection between your two phones (one in the Central role and the other in the Peripheral role), you should indeed be able to send a CoAP request from one to the other and the UI will show the response. I have tested with two phones running the test app built from the tip of the main branch and it works as expected.
(I'm testing on two devices running Android 8.1, I'll try to find other devices with more recent versions to test with)
Here's what it should look like:
Screenshot_20210729-163039

Regarding the race condition you're mentioning, I'll take a look to see if I can find what could be at cause and if I can replicate it.

from golden-gate.

nilstk avatar nilstk commented on June 16, 2024

@barbibulle any news on your testing? Can you confirm the issues with newer Android versions? Any ideas how to resolve it?

from golden-gate.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.