From 087e735790332ff0e3e2ca754f692bf2871c8162 Mon Sep 17 00:00:00 2001 From: Lukas Kurz Date: Tue, 30 Jan 2024 19:23:03 +0100 Subject: [PATCH] Update technical section --- src/data.js | 14 ++++++- src/pages/protocol/index.astro | 38 ------------------- .../{protocol => technical}/discovery.md | 8 ++-- .../{protocol => technical}/encryption.md | 0 src/pages/technical/index.md | 16 ++++++++ src/pages/{protocol => technical}/logging.md | 7 +++- src/pages/{protocol => technical}/msgorder.md | 0 src/pages/{protocol => technical}/patch.md | 0 .../test-android-emulator.md | 0 9 files changed, 36 insertions(+), 47 deletions(-) delete mode 100644 src/pages/protocol/index.astro rename src/pages/{protocol => technical}/discovery.md (54%) rename src/pages/{protocol => technical}/encryption.md (100%) create mode 100644 src/pages/technical/index.md rename src/pages/{protocol => technical}/logging.md (83%) rename src/pages/{protocol => technical}/msgorder.md (100%) rename src/pages/{protocol => technical}/patch.md (100%) rename src/pages/{protocol => technical}/test-android-emulator.md (100%) diff --git a/src/data.js b/src/data.js index 312b8d2..a0beacf 100644 --- a/src/data.js +++ b/src/data.js @@ -26,8 +26,18 @@ export const headerData = { href: '/community', }, { - text: 'Protocol', - href: '/protocol', + text: 'Technical', + href: '/technical', + links: [ + { + text: 'Technical', + href: '/technical' + }, + { + text: "Logging", + href: "/technical/logging" + } + ] } ], actions: [ diff --git a/src/pages/protocol/index.astro b/src/pages/protocol/index.astro deleted file mode 100644 index de2b6db..0000000 --- a/src/pages/protocol/index.astro +++ /dev/null @@ -1,38 +0,0 @@ ---- -import { getCollection } from "astro:content"; -import Content from "~/components/widgets/Content.astro"; -import Hero from "~/components/widgets/Hero.astro"; -import { SITE } from "~/config.mjs"; -import Layout from "~/layouts/PageLayout.astro"; - -const meta = { - title: SITE.title, - description: SITE.description, - dontUseTitleTemplate: true, -}; - -const pages = await Astro.glob("./*.md"); ---- - - - - - -
- { - pages.map((page) => ( - - {page.frontmatter.title} - - )) - } -
-
-
-
diff --git a/src/pages/protocol/discovery.md b/src/pages/technical/discovery.md similarity index 54% rename from src/pages/protocol/discovery.md rename to src/pages/technical/discovery.md index 8935aa8..36f0103 100644 --- a/src/pages/protocol/discovery.md +++ b/src/pages/technical/discovery.md @@ -3,16 +3,14 @@ title: "Discovery" layout: ~/layouts/MarkdownLayout.astro --- -## Bluetooth (BLe Beacon) - -### Public Beacon +## Public Beacon | Type | Name | Description | | - | - | - | | `uint8` | ScenarioType | Must be `1` | | `uint8` | DeviceType | enum | | `uint8` | VersionAndFlags | `value >> 5 == 1` | -| `uint8` | _Reserved_ | ?? | +| `uint8` | DeviceStatus | ignored | | `uint8[6]` | MacAddress | Rfcomm connection | | `string` | DeviceName | Display-Name for discovery | -[See `CdpAdvertiseOptions`](https://github.com/ShortDevelopment/Nearby-Sharing-Windows/blob/c499d39cb121f49431ae43aa932957dc604bf6ea/ShortDev.Microsoft.ConnectedDevices/Transports/CdpAdvertiseOptions.cs) \ No newline at end of file +[See `BLeBeacon.cs`](https://github.com/nearby-sharing/android/blob/ba8c66bd6f0a0d2ad8852969f01b427e75e653a2/ShortDev.Microsoft.ConnectedDevices/Transports/BLeBeacon.cs) diff --git a/src/pages/protocol/encryption.md b/src/pages/technical/encryption.md similarity index 100% rename from src/pages/protocol/encryption.md rename to src/pages/technical/encryption.md diff --git a/src/pages/technical/index.md b/src/pages/technical/index.md new file mode 100644 index 0000000..8507670 --- /dev/null +++ b/src/pages/technical/index.md @@ -0,0 +1,16 @@ +--- +title: "Technical" +layout: ~/layouts/MarkdownLayout.astro +--- + +## Discovery +The sender discovers capable devices via a bluetooth-low-enery (BLE) [beacon](/technical/discovery). + +## Connection +The sender connects to the mac-address (specified in beacon) via `Rfcomm`. If a user entered the wrong address, the connection will fail but the receiving device can still be found as the beacon is visible anyway. + +In order to connect two devices via the `cdp`-protocol the [connect messages](/technical/msgorder) have to be exchanged. +During a successful connection the [encryption](/technical/encryption) is established. + +## Transport-Upgrade +After the connection is established the implementations exchange a list of possible alternative transports (e.g. `WiFi` or `WiFiDirect`) and try to upgrade to the faster transports (i.e. `WiFi`). diff --git a/src/pages/protocol/logging.md b/src/pages/technical/logging.md similarity index 83% rename from src/pages/protocol/logging.md rename to src/pages/technical/logging.md index b7acc11..9a2e1a7 100644 --- a/src/pages/protocol/logging.md +++ b/src/pages/technical/logging.md @@ -3,11 +3,14 @@ title: "Enable logging" layout: ~/layouts/MarkdownLayout.astro --- +## Windows +Windows 10 / 11 has the Connected-Devices-Platform build-in: + Service: `CDPSvc` Settings directory: `%LOCALAPPDATA%\ConnectedDevicesPlatform\` Settings directory: `C:\Windows\ServiceProfiles\LocalService\AppData\Local\ConnectedDevicesPlatform` -## Enable Logging +### Enable Logging 1. Create `.\CDPGlobalSettings.cdp.override` with this content: ```json { @@ -21,7 +24,7 @@ Get-Service *cdp* | Restart-Service ``` 3. See output at `.\CDPTraces.log` -## Trace via pipe +### Trace via pipe ``` \\\\.\\pipe\\CDPInOut ``` diff --git a/src/pages/protocol/msgorder.md b/src/pages/technical/msgorder.md similarity index 100% rename from src/pages/protocol/msgorder.md rename to src/pages/technical/msgorder.md diff --git a/src/pages/protocol/patch.md b/src/pages/technical/patch.md similarity index 100% rename from src/pages/protocol/patch.md rename to src/pages/technical/patch.md diff --git a/src/pages/protocol/test-android-emulator.md b/src/pages/technical/test-android-emulator.md similarity index 100% rename from src/pages/protocol/test-android-emulator.md rename to src/pages/technical/test-android-emulator.md