Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Issue 2183523006: Chrome OS uWeave Characteristics Server (Closed)

Created:
4 years, 4 months ago by jingxuy
Modified:
4 years ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@migration
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Chrome OS uWeave Characteristics Server NOTE: This CL is for review of design purpose. It will be split up into 3 smaller CLs. The Server serves RX and TX characteristic as specified by uWeave protocol. For every device that tries to connect to the Server, the Server spins off a ServerConnection to communicate with that device. The Server advertise itself through an AdvertisementRotator which rotate both EID seed and EID and devices. TODO(jingxuy): attach updated public design doc here. BUG=631853

Patch Set 1 #

Total comments: 36

Patch Set 2 : Added comprehensive comments for classes and methods #

Patch Set 3 : addressed a TODO so now server connection actually receives packets #

Patch Set 4 : change GetEid to take RemoteDevice #

Total comments: 37

Patch Set 5 : fixed bugs in server connection #

Total comments: 2

Patch Set 6 : most recent version of the server #

Patch Set 7 : added channel #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1193 lines, -0 lines) Patch
M components/proximity_auth/ble/BUILD.gn View 1 2 3 4 5 3 chunks +9 lines, -0 lines 0 comments Download
A components/proximity_auth/ble/bluetooth_low_energy_advertisement_rotator.h View 1 2 3 4 5 1 chunk +89 lines, -0 lines 0 comments Download
A components/proximity_auth/ble/bluetooth_low_energy_advertisement_rotator.cc View 1 2 3 4 5 1 chunk +130 lines, -0 lines 0 comments Download
A components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h View 1 2 3 4 5 1 chunk +63 lines, -0 lines 0 comments Download
A components/proximity_auth/ble/bluetooth_low_energy_weave_channel.h View 1 2 3 4 5 6 1 chunk +56 lines, -0 lines 0 comments Download
A components/proximity_auth/ble/bluetooth_low_energy_weave_channel.cc View 1 2 3 4 5 6 1 chunk +28 lines, -0 lines 0 comments Download
A components/proximity_auth/ble/bluetooth_low_energy_weave_server.h View 1 2 3 4 5 6 1 chunk +235 lines, -0 lines 0 comments Download
A components/proximity_auth/ble/bluetooth_low_energy_weave_server.cc View 1 2 3 4 5 1 chunk +298 lines, -0 lines 0 comments Download
A components/proximity_auth/ble/bluetooth_low_energy_weave_server_connection.h View 1 2 3 4 5 1 chunk +121 lines, -0 lines 0 comments Download
A components/proximity_auth/ble/bluetooth_low_energy_weave_server_connection.cc View 1 2 3 4 5 1 chunk +164 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 19 (5 generated)
jingxuy
Please review the general design and make suggestions. I will break it down to smaller ...
4 years, 4 months ago (2016-07-27 00:25:42 UTC) #4
rkc
Do split these into smaller CLs, trying to get one large logical piece of work ...
4 years, 4 months ago (2016-07-27 00:56:34 UTC) #5
Kyle Horimoto
Jing, I'll look over this CL tomorrow toward the end of the day. I'll be ...
4 years, 4 months ago (2016-07-27 06:34:53 UTC) #7
Kyle Horimoto
https://codereview.chromium.org/2183523006/diff/1/components/proximity_auth/ble/bluetooth_low_energy_advertisement_rotator.h File components/proximity_auth/ble/bluetooth_low_energy_advertisement_rotator.h (right): https://codereview.chromium.org/2183523006/diff/1/components/proximity_auth/ble/bluetooth_low_energy_advertisement_rotator.h#newcode28 components/proximity_auth/ble/bluetooth_low_energy_advertisement_rotator.h:28: class BluetoothLowEnergyAdvertisementRotator { There should just be one EidGenerator ...
4 years, 4 months ago (2016-07-27 17:58:49 UTC) #8
jingxuy
https://codereview.chromium.org/2183523006/diff/1/components/proximity_auth/ble/bluetooth_low_energy_advertisement_rotator.cc File components/proximity_auth/ble/bluetooth_low_energy_advertisement_rotator.cc (right): https://codereview.chromium.org/2183523006/diff/1/components/proximity_auth/ble/bluetooth_low_energy_advertisement_rotator.cc#newcode11 components/proximity_auth/ble/bluetooth_low_energy_advertisement_rotator.cc:11: typedef BluetoothLowEnergyAdvertisementRotator::Advertisement Advertisement; On 2016/07/27 00:56:33, rkc wrote: > ...
4 years, 4 months ago (2016-07-27 23:31:48 UTC) #9
jingxuy
https://codereview.chromium.org/2183523006/diff/1/components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h File components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h (right): https://codereview.chromium.org/2183523006/diff/1/components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h#newcode49 components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h:49: uint16_t GetEid() { return 42; } On 2016/07/27 23:31:48, ...
4 years, 4 months ago (2016-07-28 22:09:03 UTC) #10
Kyle Horimoto
https://codereview.chromium.org/2183523006/diff/60001/components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h File components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h (right): https://codereview.chromium.org/2183523006/diff/60001/components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h#newcode50 components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h:50: uint16_t GetEid(const RemoteDevice& device) { return 42; } 1) ...
4 years, 4 months ago (2016-07-29 03:15:40 UTC) #11
jingxuy
https://codereview.chromium.org/2183523006/diff/60001/components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h File components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h (right): https://codereview.chromium.org/2183523006/diff/60001/components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h#newcode50 components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h:50: uint16_t GetEid(const RemoteDevice& device) { return 42; } On ...
4 years, 4 months ago (2016-07-29 18:45:43 UTC) #12
Kyle Horimoto
https://codereview.chromium.org/2183523006/diff/60001/components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h File components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h (right): https://codereview.chromium.org/2183523006/diff/60001/components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h#newcode50 components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h:50: uint16_t GetEid(const RemoteDevice& device) { return 42; } On ...
4 years, 4 months ago (2016-07-29 19:04:18 UTC) #13
jingxuy
https://codereview.chromium.org/2183523006/diff/60001/components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h File components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h (right): https://codereview.chromium.org/2183523006/diff/60001/components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h#newcode50 components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h:50: uint16_t GetEid(const RemoteDevice& device) { return 42; } On ...
4 years, 4 months ago (2016-07-29 20:26:02 UTC) #14
Kyle Horimoto
https://codereview.chromium.org/2183523006/diff/60001/components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h File components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h (right): https://codereview.chromium.org/2183523006/diff/60001/components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h#newcode50 components/proximity_auth/ble/bluetooth_low_energy_eid_generator.h:50: uint16_t GetEid(const RemoteDevice& device) { return 42; } On ...
4 years, 4 months ago (2016-07-29 21:07:46 UTC) #15
Kyle Horimoto
https://codereview.chromium.org/2183523006/diff/60001/components/proximity_auth/ble/bluetooth_low_energy_weave_server.h File components/proximity_auth/ble/bluetooth_low_energy_weave_server.h (right): https://codereview.chromium.org/2183523006/diff/60001/components/proximity_auth/ble/bluetooth_low_energy_weave_server.h#newcode131 components/proximity_auth/ble/bluetooth_low_energy_weave_server.h:131: bool HasDevice(std::string device_address); On 2016/07/29 21:07:46, Kyle Horimoto wrote: ...
4 years, 4 months ago (2016-07-29 21:11:34 UTC) #16
rkc
Sorry I haven't been able to get to this till now. I'm only reviewing the ...
4 years, 4 months ago (2016-08-02 01:09:21 UTC) #17
rkc
4 years, 4 months ago (2016-08-02 22:14:24 UTC) #18
https://codereview.chromium.org/2183523006/diff/80001/components/proximity_au...
File components/proximity_auth/ble/bluetooth_low_energy_weave_server.cc (right):

https://codereview.chromium.org/2183523006/diff/80001/components/proximity_au...
components/proximity_auth/ble/bluetooth_low_energy_weave_server.cc:295:
adapter_->RegisterAdvertisement(
On 2016/08/02 01:09:21, rkc wrote:
> This won't work. You can only advertise one advertisement at a time on Chrome
> OS.
> You will need to unregister the previous advertisement and then re-register
it.
> 
> This also means that some concept of timing will be involved. If you just
> register and unregister, the adapter may not have advertised yet.
> 
> The adapter advertises once approximately every 1.2s. There 'currently' is no
> way to change this, but there will be at some point relatively soon.

Just to clarify, after some digging around in the kernel code, it does seem like
we can do multiple advertisements. We can do a max of 5 at a time, and they will
run rotated by the kernel with a 1.28s interval between each.

Powered by Google App Engine
This is Rietveld 408576698