New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 728538 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Newblue: polish gatt server

Project Member Reported by josephsih@chromium.org, Jun 1 2017

Issue description

Polish the gatt server in newblue to make sure it works as expected.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/newblue/+/1de51c1960fc48de3c1c19a4983ab3c5e941d4f9

commit 1de51c1960fc48de3c1c19a4983ab3c5e941d4f9
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu Jun 08 06:45:24 2017

att: convert files into unix file format

This patch converts the att.c and att.h files in unix file format
instead of the original dos format. This makes the file format
be consistent for all files.

BUG=chromium:728538
TEST=Use grep to verify

Before applying this patch:
  $ grep -lr $(printf "\r") --include="*.[c|h]"
  att.h
  att.c

After applying this patch:
  $ grep -lr $(printf "\r") --include="*.[c|h]"
  # It shows nothing.

Change-Id: I6cbd8e31027cc2e998c4aceb8cd3f3c1ab038387
Reviewed-on: https://chromium-review.googlesource.com/520964
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Dmitry Grinberg <dmitrygr@google.com>

[modify] https://crrev.com/1de51c1960fc48de3c1c19a4983ab3c5e941d4f9/att.c
[modify] https://crrev.com/1de51c1960fc48de3c1c19a4983ab3c5e941d4f9/att.h

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/newblue/+/6bb428622358068610dd19c4e7b11adacb4d0eab

commit 6bb428622358068610dd19c4e7b11adacb4d0eab
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu Jun 08 06:45:24 2017

att: fixed the ordering of executing penOp.origOpcode = 0

We should set penOp.origOpcode to 0 after

    if (conn->srv.penOp.origOpcode == ATT_OPCODE_WRITE_REQ)

instead of prior to the condition statement in attSrvWriteContinue()
function.

BUG=chromium:728538
TEST=None

Change-Id: I366e6b0aa25c4419b9eb13ccd45c3ba84c716c40
Reviewed-on: https://chromium-review.googlesource.com/520967
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Dmitry Grinberg <dmitrygr@google.com>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/6bb428622358068610dd19c4e7b11adacb4d0eab/att.c

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/newblue/+/b22cb779043cd7c963a7fcbc10d48ba84bea4bfa

commit b22cb779043cd7c963a7fcbc10d48ba84bea4bfa
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu Jun 08 06:45:24 2017

gatt: assigns indF callback

When creating a gatt work item in gattEnqueueSrvIndCall(), we need
to assign a proper indF callback to prevent the segmentation fault.

BUG=chromium:728538
TEST=None

Change-Id: Iaf88f6edfb0bc7e08d946c35ea359c31f0a009c2
Reviewed-on: https://chromium-review.googlesource.com/520968
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Dmitry Grinberg <dmitrygr@google.com>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/b22cb779043cd7c963a7fcbc10d48ba84bea4bfa/gatt.c

Project Member

Comment 4 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/newblue/+/b22cb779043cd7c963a7fcbc10d48ba84bea4bfa

commit b22cb779043cd7c963a7fcbc10d48ba84bea4bfa
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu Jun 08 06:45:24 2017

gatt: assigns indF callback

When creating a gatt work item in gattEnqueueSrvIndCall(), we need
to assign a proper indF callback to prevent the segmentation fault.

BUG=chromium:728538
TEST=None

Change-Id: Iaf88f6edfb0bc7e08d946c35ea359c31f0a009c2
Reviewed-on: https://chromium-review.googlesource.com/520968
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Dmitry Grinberg <dmitrygr@google.com>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/b22cb779043cd7c963a7fcbc10d48ba84bea4bfa/gatt.c

Project Member

Comment 5 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/newblue/+/4143a8c982de8246b6bc7a2510791dad5918718f

commit 4143a8c982de8246b6bc7a2510791dad5918718f
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu Jun 08 06:45:25 2017

hci: fixed a name typo in hciLeSetAdvParamsSync

BUG=chromium:728538
TEST=None

Change-Id: Ic9a78f716777486344a114d9a92a731e4c918a8a
Reviewed-on: https://chromium-review.googlesource.com/525732
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Dmitry Grinberg <dmitrygr@google.com>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/4143a8c982de8246b6bc7a2510791dad5918718f/hci.c

Project Member

Comment 6 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/newblue/+/4f1e106c96d72a1b5ac4b79bc8facf81b9458edb

commit 4f1e106c96d72a1b5ac4b79bc8facf81b9458edb
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu Jun 08 06:45:25 2017

test.c: implement Current Time Service

This patch implements the required functions to support a current
time service. Basically, this service verifies that the following
gatt operations work correctly
- Read a characteristic value.
- Write a characteristic value.
- Read CCCD properties of a descriptor.
- Write CCCD properties of a descriptor.
- Server initiated notifications work.

BUG=chromium:728538
TEST=Manual test as below

1. Run nRF Connect
   Install and run "nRF Connect" in an android device.

2. Connect
   - Tap on the upper right icon to Refresh.
   - When seeing "Nb.t" on the screen, tap on CONNECT icon.
   - Tap on PAIR button when seeing a pop-up window for paring request.
   - You would see a tab named NB.T

3. Examine GAP.
   - Tap on Generic Access which would show more characteristics.
   - Tap on Device Name, it would show "SuperLongDeviceName...."
   - Tap on Appearance, it would show "Generic Watch".
   - Tap on Peripheral Preferred Connection Parameters, it would show
     Connection Interval: 25 ms - 37.5 ms
     Slave Latency: 40
     Supervision Timeout Multiplier: 400

4. Examine GATT.
   - Tap on Current Time Service. It would show more characteristics.
   - Tap on Current Time. It would show the date time, day of week,
     etc. Note that the CCCD would show "Notifications and indications
     disabled" at this time.
   - Tap on the notification icon of Current Time, the gatt server
     would start notifying the android app about the time for every
     5 seconds. Note that the CCCD would show "Notifications enabled".
   - Tap on the notification icon of Current Time again, the gatt
     server would stop the notification. Note that the CCCD would
     show "Notifications and indications disabled" again.
   - Tap on Local Time Information. It would show UTC+8, and
     Daylight Time(+1h).
   - Tap on the write button of Local Time Information. Input 0 and 0
     to reset the Time Zone and Daylight Time. Observe that it would
     show UTC+0 and Standard Time.

Change-Id: If7d489cb0a0c46b92fb9d87a7fd2371b5b38a5c3
Reviewed-on: https://chromium-review.googlesource.com/520969
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Dmitry Grinberg <dmitrygr@google.com>

[modify] https://crrev.com/4f1e106c96d72a1b5ac4b79bc8facf81b9458edb/test.c

Next things to do for gatt server:
- verify long characteristics 
- persistent notifications across connections


Sign in to add a comment