Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to configure UUID in SerialSocket.java #47

Open
suoko opened this issue Mar 9, 2024 · 4 comments
Open

How to configure UUID in SerialSocket.java #47

suoko opened this issue Mar 9, 2024 · 4 comments
Labels
question Further information is requested

Comments

@suoko
Copy link

suoko commented Mar 9, 2024

Hi,
I was able to configure the original app where you can insert devices while using configuring the app on the phone.
I see that this app does not allow to do so, but you have to put the UUIDs in the code.
I tried putting Service UUID, Read Characteristic UUID and Write Characteristic UUID taken from the full app into the serialSocket.java file as below:

    private static final UUID BLUETOOTH_LE_TIO_SERVICE          = UUID.fromString("xxxx-xxxx-xxxx-xxxx-xxxx");
    private static final UUID BLUETOOTH_LE_TIO_CHAR_TX          = UUID.fromString("yyyy-xxxx-xxxx-xxxx-xxxx"); // WNR
    private static final UUID BLUETOOTH_LE_TIO_CHAR_RX          = UUID.fromString("zzzz-xxxx-xxxx-xxxx-xxxx"); // N
    private static final UUID BLUETOOTH_LE_TIO_CHAR_TX_CREDITS  = UUID.fromString("yyyy-xxxx-xxxx-xxxx-xxxx"); // W
    private static final UUID BLUETOOTH_LE_TIO_CHAR_RX_CREDITS  = UUID.fromString("zzzz-xxxx-xxxx-xxxx-xxxx"); // I

I considered RX as READ, and TX as WRITE, but I got "read credits characteristic not found".
What am I missing ? Thanks

@suoko
Copy link
Author

suoko commented Mar 9, 2024

Sometimes I have GATT status 133
Sometimes I have "read characteristic CCCD descriptor not writable

@kai-morich
Copy link
Owner

LE_TIO is not a good example to clone from, as this has special flow control credits. Better try with the simpler ones.

@kai-morich kai-morich added the question Further information is requested label Mar 23, 2024
@suoko
Copy link
Author

suoko commented Apr 20, 2024

simpler ones

Thanks, but what are you referring to with "simpler ones" ?

These are data I got from BLE-SCAN which are the same as those used in the full-version app

ble-scan  -d 48:87:2D:11:5A:4B 
Started general BLE scan

48:87:2D:11:5A:4B (rssi=-65): ELEGOO BT16

Finished general BLE scan
Started deep scan of 48:87:2D:11:5A:4B

Found device 48:87:2D:11:5A:4B: ELEGOO BT16 (out of 1)
SERVICE 0000ffe0-0000-1000-8000-00805f9b34fb (Handle: 1): Vendor specific
     CHARACTERISTIC 0000ffe2-0000-1000-8000-00805f9b34fb (Handle: 5): Vendor specific ['write-without-response']
     CHARACTERISTIC 0000ffe1-0000-1000-8000-00805f9b34fb (Handle: 2): Vendor specific ['notify']
         DESCRIPTOR 00002902-0000-1000-8000-00805f9b34fb (Handle: 4): Client Characteristic Configuration

Completed deep scan of 48:87:2D:11:5A:4B

@kai-morich
Copy link
Owner

you need a mixture of Cc245XDelegate and MicrochipDelegate class. UUIDs from the first, but separate characteristics from the second.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants