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

Wearable Bluetooth LE write characteristic fail on Tizen 5.5 #1477

Open
zeroxw opened this issue Jun 21, 2021 · 6 comments
Open

Wearable Bluetooth LE write characteristic fail on Tizen 5.5 #1477

zeroxw opened this issue Jun 21, 2021 · 6 comments
Assignees

Comments

@zeroxw
Copy link

zeroxw commented Jun 21, 2021

I wrote a web app for Samsung Wearable to connect to Bluetooth LE for reading data and also sending command to the device. it works fine on OS 2.3 but when I purchased a new watch which run OS 5.5 it’s no longer working.

There is no description about the issue in the docs Samsung provided: https://docs.tizen.org/application/web/api/5.5/device_api/mobile/tizen/bluetooth.html#BluetoothGATTCharacteristic 1

I also tried to write characteristic using Native app and also saw the same issue.


Detail of the error:
Error while getting value : Unknown Error
{
“code”: -1,
“name”: “UnknownError”,
“message”: “Error while getting value : Unknown Error”
}

Here the document which describe in detail of the issue: https://docs.google.com/document/d/1t532HyefOYMB26PbXFVrXMk3PCagD9Y59jvEGPBY3co/edit

Logs
https://drive.google.com/file/d/18u1JVgLeByDSO4u4FTbejvem05wgh6ex/view?usp=sharing
https://drive.google.com/file/d/1HWMv8SVsWAxVcDjtbRRxYYR8zoSoB0Hf/view?usp=sharing
https://drive.google.com/file/d/17cZ2O3-PU_J3gmBOYboRMlORWtM8kVn8/view?usp=sharing

Logs from native app

06-17 16:34:34.301 : Error / BLUETOOTH_HAL ( 15146 : 15146 ) : bt-hal-gatt-client.c: __hal_bluetooth_internal_write_cb(1613) > write Characteristic dbus failed Error:[Timeout was reached]
06-17 16:34:34.305 : Info / BLUETOOTH_FRWK_API ( 15276 : 15276 ) : bt-request-sender.c: __send_request_cb(449) > event_type[23], result= INTERNAL [0xfffffff7]
06-17 16:34:34.305 : Error / CAPI_NETWORK_BLUETOOTH ( 15276 : 15276 ) : bluetooth-gatt.c: _bt_handle_gatt_client_char_write_completed_event(4864) > GATT Char Write completed Failed event UUID [6e400002-b5a3-f393-e0a9-e50e24dcca9e] address [E3:8D]
06-17 16:34:34.305 : Info / $(appName) ( 15276 : 15276 ) : Write request failed

@annie-samsung
Copy link
Contributor

@pkosko, could you check on this issue reported?

@dh79pyun
Copy link
Contributor

Dear developer,

We are checking this issue with attached logs.
When we check the log, the opensource stack works abnormally in this situation.
But can't know the exact reason - only use the attached log.
So I want the additional information about this issue.

  1. Source code (Include API Calling sequence for BT Native API)
    or your testing app's tpk file and running method (This is the best way to result this issue. - Share the app and source code)
  2. Low level's low
  • You can get the log in next method
    A) Connect the target shell
    sdb root on
    sdb shell
    sh-3.2# btmon > /opt/etc/btmon.log &
    sh-3.2# journalctl -f --no-page _EXE=/usr/libexec/bluetooth/bluetoothd > /opt/usr/bluez.log &
    B) reproduce the issue.
    C) In Linux fetch that log files
    sdb pull /opt/etc/btmon.log
    sdb pull /opt/etc/bluez.log

@dantranv
Copy link

Hi @dh79pyun

I can send the tpk but it will require an external device to test (app running on Tizen Watch connect to external bluetooth device and execute write on this device).

Here is the source code of write characteristic.

app.js.txt

@dh79pyun
Copy link
Contributor

Dear developer,

Can you share the source code for Native app? (Because we don't have an enviornment to build web app)
"I also tried to write characteristic using Native app and also saw the same issue."

If you attach the native's source code, we can reproduce the issue in our local setup.

@dantranv
Copy link

Hi @dh79pyun

The native app I took from Samsung app sample (sample app couldn't accessible at this time, maybe it was removed)

https://docs.tizen.org/application/native/guides/connectivity/bluetooth/

Here is the app src, the app simply connect to external device and write characteristic.

QUS_Sports.zip

Notice that I got the same error on both native and web apps.

@ayushgarg-samsung
Copy link

Hi @dantranv

we checked the native app QUS_Sports.zip on our wearable (tizen 5.5).
It was working normally and was able to successfully write to the characteristic.
So the issue was not reproduced at our end even after multiple tries.

Hence, As dh79pyun mentioned earlier, could you share the low level logs to us.

You can follow the below method:
A) Reboot and Connect the target shell
sdb root on
sdb shell
sh-3.2# btmon > /opt/etc/btmon.log &
sh-3.2# journalctl -f --no-page _EXE=/usr/libexec/bluetooth/bluetoothd > /opt/usr/bluez.log &
B) reproduce the issue.
C) In Linux fetch that log files
sdb pull /opt/etc/btmon.log
sdb pull /opt/etc/bluez.log

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

No branches or pull requests

6 participants