hai007 dc2d249cc4 For the purpose of better understanding of the WiFi technology device used during Nearby Sharing, We'll log the above parameters into ClearCut server.
Storage increase will be:
1.Build version: take RQ3A.210805.001.A1 as example, it needs 18 bytes in one device, so need 36 bytes in two devices.
2.Incoming or outgoing conection (
    4 bytes tech +
    4 bytes band +
    4 bytes channel +
    6 bytes network_operator +
    2 bytes country_code +
    1 byte tdls +
    4 bytes try_counts +
    1 byte wifi_ap_status +
    4 bytes max_tx_speed +
    4 bytes max_rx_speed) = 34 bytes)
 So need 34*4 = 136 bytes in two directions initial connections and two directions bandwidth upgrades.

So there are total 172 bytes grows in each share.

(172 bytes in each sharing * 400000 shares/daily * 7 days/week) / GB = about 0.45 GB) (400000 was based on current shares/daily in Prod.)

PiperOrigin-RevId: 390282437
2021-08-11 20:57:25 -07:00
2020-06-24 11:09:47 -07:00
2020-06-24 11:09:47 -07:00
2020-10-22 11:30:33 -07:00

Nearby Connections Library

This is not an officially supported Google product.

Coathored by:

  • (Java/C++) Varun Kapoor “reznor”
  • (Java) Maria-Ines Carrera “marianines”
  • (Java) Will Harmon “xlythe”
  • (Java/C++/ObjC) Alex Kang “alexanderkang”
  • (Java/C++) Amanda Lee “ahlee”
  • (C++) Tracy Zhou “tracyzhou”
  • (ObjC) Dan Webb “dwebb”
  • (C++) John Kaczor “johngk”
  • (C++/ObjC) Edwin Wu “edwinwu”
  • (C++) Alexey Polyudov “apolyudov”

Status: Implemented in C++

Design reviewers: TODO

Implementation reviewer: TODO

Last Updated: TODO

Overview

Nearby Connections is a high level protocol on top of Bluetooth/WiFi that acts as a medium-agnostic socket. Devices are able to advertise, scan, and connect with one another over any shared medium (eg. BT <-> BT). Once connected, the two devices share a list of all supported mediums and attempt to upgrade to the one with the highest bandwidth (eg. BT -> WiFi). The connection is encrypted, reliable, and fully duplex. BYTE, FILE, and STREAM payloads are all supported and will be chunked & transferred internally and recombined on the receiving device. See Nearby Connections Overview for more information.

Checkout, build, test instructions

Checkout

pre-requisites: git

git clone https://github.com/google/nearby-connections
cd nearby-connections
git submodule update --init --recursive

this is a "source root" directory of the project

Build

pre-requisites: openssl, cmake, c++ toolchain (c++17-capable)

TODO

Running unit tests

TODO

Languages
C++ 97.6%
Objective-C 1.1%
Objective-C++ 0.6%
Starlark 0.3%
C 0.2%
Other 0.1%