{"action":"created","comment":{"url":"https://api.github.com/repos/tock/tock/pulls/comments/185325664","pull_request_review_id":116682529,"id":185325664,"diff_hunk":"@@ -836,19 +548,27 @@ where\n         &self,\n         command_num: usize,\n         data: usize,\n-        _: usize,\n+        interval: usize,\n         appid: kernel::AppId,\n     ) -> ReturnCode {\n         match command_num {\n-            // Start periodic advertisments\n+            // Start periodic advertisements\n             0 => self.app\n                 .enter(appid, |app, _| {\n                     if let Some(BLEState::Initialized) = app.process_status {\n-                        app.process_status = Some(BLEState::AdvertisingIdle);\n-                        app.random_nonce = self.alarm.now();\n-                        app.set_next_alarm::<A::Frequency>(self.alarm.now());\n-                        self.reset_active_alarm();\n-                        ReturnCode::SUCCESS\n+                        let pdu_type = data as AdvPduType;\n+                        match pdu_type {\n+                            ADV_IND | ADV_NONCONN_IND | ADV_SCAN_IND => {","path":"capsules/src/ble_advertising_driver.rs","position":664,"original_position":664,"commit_id":"301f971f30239af430262b804a9487fa93289c2c","original_commit_id":"301f971f30239af430262b804a9487fa93289c2c","user":{"login":"brghena","id":235448,"avatar_url":"https://avatars3.githubusercontent.com/u/235448?v=4","gravatar_id":"","url":"https://api.github.com/users/brghena","html_url":"https://github.com/brghena","followers_url":"https://api.github.com/users/brghena/followers","following_url":"https://api.github.com/users/brghena/following{/other_user}","gists_url":"https://api.github.com/users/brghena/gists{/gist_id}","starred_url":"https://api.github.com/users/brghena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brghena/subscriptions","organizations_url":"https://api.github.com/users/brghena/orgs","repos_url":"https://api.github.com/users/brghena/repos","events_url":"https://api.github.com/users/brghena/events{/privacy}","received_events_url":"https://api.github.com/users/brghena/received_events","type":"User","site_admin":false},"body":"Shouldn't it be an error to be ADV_IND or ADV_SCAN_IND modes since we don't support scan requests/responses or connections?","created_at":"2018-05-01T20:31:22Z","updated_at":"2018-05-01T20:57:30Z","html_url":"https://github.com/tock/tock/pull/855#discussion_r185325664","pull_request_url":"https://api.github.com/repos/tock/tock/pulls/855","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/tock/tock/pulls/comments/185325664"},"html":{"href":"https://github.com/tock/tock/pull/855#discussion_r185325664"},"pull_request":{"href":"https://api.github.com/repos/tock/tock/pulls/855"}}},"pull_request":{"url":"https://api.github.com/repos/tock/tock/pulls/855","id":178256878,"html_url":"https://github.com/tock/tock/pull/855","diff_url":"https://github.com/tock/tock/pull/855.diff","patch_url":"https://github.com/tock/tock/pull/855.patch","issue_url":"https://api.github.com/repos/tock/tock/issues/855","number":855,"state":"open","locked":false,"title":"BLE/Construct AdvData payload in userland","user":{"login":"niklasad1","id":14157425,"avatar_url":"https://avatars1.githubusercontent.com/u/14157425?v=4","gravatar_id":"","url":"https://api.github.com/users/niklasad1","html_url":"https://github.com/niklasad1","followers_url":"https://api.github.com/users/niklasad1/followers","following_url":"https://api.github.com/users/niklasad1/following{/other_user}","gists_url":"https://api.github.com/users/niklasad1/gists{/gist_id}","starred_url":"https://api.github.com/users/niklasad1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklasad1/subscriptions","organizations_url":"https://api.github.com/users/niklasad1/orgs","repos_url":"https://api.github.com/users/niklasad1/repos","events_url":"https://api.github.com/users/niklasad1/events{/privacy}","received_events_url":"https://api.github.com/users/niklasad1/received_events","type":"User","site_admin":false},"body":"### Pull Request Overview\r\n\r\nThis pull request implements #716 with some additional tweaks such as the kernel only is responsible for generation of `AdvA` and userland manages the rest!\r\n\r\n### Testing Strategy\r\n\r\nThis pull request was tested by:\r\n* `ble_advertising`\r\n* `ble_passive_scanning`\r\n* `all ble tests added in this PR`\r\n\r\n### TODO or Help Wanted\r\n\r\nLibtock management of buffers needs to review pretty carefully which is rather ugly now!\r\n\r\n### Documentation Updated\r\n\r\n- [X] Kernel: Updated the relevant files in `/docs`, or no updates are required.\r\n- [X] Userland: Added/updated the application README, if needed.\r\n\r\n### Formatting\r\n\r\n- [X] Ran `make formatall`.\r\n","created_at":"2018-03-29T08:17:04Z","updated_at":"2018-05-01T20:57:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"42efcd1bc580ca2e52a60d50b09cd1f406008c11","assignee":{"login":"alevy","id":4689,"avatar_url":"https://avatars1.githubusercontent.com/u/4689?v=4","gravatar_id":"","url":"https://api.github.com/users/alevy","html_url":"https://github.com/alevy","followers_url":"https://api.github.com/users/alevy/followers","following_url":"https://api.github.com/users/alevy/following{/other_user}","gists_url":"https://api.github.com/users/alevy/gists{/gist_id}","starred_url":"https://api.github.com/users/alevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alevy/subscriptions","organizations_url":"https://api.github.com/users/alevy/orgs","repos_url":"https://api.github.com/users/alevy/repos","events_url":"https://api.github.com/users/alevy/events{/privacy}","received_events_url":"https://api.github.com/users/alevy/received_events","type":"User","site_admin":false},"assignees":[{"login":"alevy","id":4689,"avatar_url":"https://avatars1.githubusercontent.com/u/4689?v=4","gravatar_id":"","url":"https://api.github.com/users/alevy","html_url":"https://github.com/alevy","followers_url":"https://api.github.com/users/alevy/followers","following_url":"https://api.github.com/users/alevy/following{/other_user}","gists_url":"https://api.github.com/users/alevy/gists{/gist_id}","starred_url":"https://api.github.com/users/alevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alevy/subscriptions","organizations_url":"https://api.github.com/users/alevy/orgs","repos_url":"https://api.github.com/users/alevy/repos","events_url":"https://api.github.com/users/alevy/events{/privacy}","received_events_url":"https://api.github.com/users/alevy/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":820349457,"url":"https://api.github.com/repos/tock/tock/labels/P-Significant","name":"P-Significant","color":"a80a31","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/tock/tock/pulls/855/commits","review_comments_url":"https://api.github.com/repos/tock/tock/pulls/855/comments","review_comment_url":"https://api.github.com/repos/tock/tock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tock/tock/issues/855/comments","statuses_url":"https://api.github.com/repos/tock/tock/statuses/301f971f30239af430262b804a9487fa93289c2c","head":{"label":"tock:ble/construct-payload-in-userland","ref":"ble/construct-payload-in-userland","sha":"301f971f30239af430262b804a9487fa93289c2c","user":{"login":"tock","id":34076064,"avatar_url":"https://avatars1.githubusercontent.com/u/34076064?v=4","gravatar_id":"","url":"https://api.github.com/users/tock","html_url":"https://github.com/tock","followers_url":"https://api.github.com/users/tock/followers","following_url":"https://api.github.com/users/tock/following{/other_user}","gists_url":"https://api.github.com/users/tock/gists{/gist_id}","starred_url":"https://api.github.com/users/tock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tock/subscriptions","organizations_url":"https://api.github.com/users/tock/orgs","repos_url":"https://api.github.com/users/tock/repos","events_url":"https://api.github.com/users/tock/events{/privacy}","received_events_url":"https://api.github.com/users/tock/received_events","type":"Organization","site_admin":false},"repo":{"id":36428094,"name":"tock","full_name":"tock/tock","owner":{"login":"tock","id":34076064,"avatar_url":"https://avatars1.githubusercontent.com/u/34076064?v=4","gravatar_id":"","url":"https://api.github.com/users/tock","html_url":"https://github.com/tock","followers_url":"https://api.github.com/users/tock/followers","following_url":"https://api.github.com/users/tock/following{/other_user}","gists_url":"https://api.github.com/users/tock/gists{/gist_id}","starred_url":"https://api.github.com/users/tock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tock/subscriptions","organizations_url":"https://api.github.com/users/tock/orgs","repos_url":"https://api.github.com/users/tock/repos","events_url":"https://api.github.com/users/tock/events{/privacy}","received_events_url":"https://api.github.com/users/tock/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tock/tock","description":"A secure embedded operating system for Cortex-M based microcontrollers","fork":false,"url":"https://api.github.com/repos/tock/tock","forks_url":"https://api.github.com/repos/tock/tock/forks","keys_url":"https://api.github.com/repos/tock/tock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tock/tock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tock/tock/teams","hooks_url":"https://api.github.com/repos/tock/tock/hooks","issue_events_url":"https://api.github.com/repos/tock/tock/issues/events{/number}","events_url":"https://api.github.com/repos/tock/tock/events","assignees_url":"https://api.github.com/repos/tock/tock/assignees{/user}","branches_url":"https://api.github.com/repos/tock/tock/branches{/branch}","tags_url":"https://api.github.com/repos/tock/tock/tags","blobs_url":"https://api.github.com/repos/tock/tock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tock/tock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tock/tock/git/refs{/sha}","trees_url":"https://api.github.com/repos/tock/tock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tock/tock/statuses/{sha}","languages_url":"https://api.github.com/repos/tock/tock/languages","stargazers_url":"https://api.github.com/repos/tock/tock/stargazers","contributors_url":"https://api.github.com/repos/tock/tock/contributors","subscribers_url":"https://api.github.com/repos/tock/tock/subscribers","subscription_url":"https://api.github.com/repos/tock/tock/subscription","commits_url":"https://api.github.com/repos/tock/tock/commits{/sha}","git_commits_url":"https://api.github.com/repos/tock/tock/git/commits{/sha}","comments_url":"https://api.github.com/repos/tock/tock/comments{/number}","issue_comment_url":"https://api.github.com/repos/tock/tock/issues/comments{/number}","contents_url":"https://api.github.com/repos/tock/tock/contents/{+path}","compare_url":"https://api.github.com/repos/tock/tock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tock/tock/merges","archive_url":"https://api.github.com/repos/tock/tock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tock/tock/downloads","issues_url":"https://api.github.com/repos/tock/tock/issues{/number}","pulls_url":"https://api.github.com/repos/tock/tock/pulls{/number}","milestones_url":"https://api.github.com/repos/tock/tock/milestones{/number}","notifications_url":"https://api.github.com/repos/tock/tock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tock/tock/labels{/name}","releases_url":"https://api.github.com/repos/tock/tock/releases{/id}","deployments_url":"https://api.github.com/repos/tock/tock/deployments","created_at":"2015-05-28T09:26:47Z","updated_at":"2018-05-01T03:07:55Z","pushed_at":"2018-05-01T19:15:21Z","git_url":"git://github.com/tock/tock.git","ssh_url":"git@github.com:tock/tock.git","clone_url":"https://github.com/tock/tock.git","svn_url":"https://github.com/tock/tock","homepage":"https://www.tockos.org","size":134226,"stargazers_count":837,"watchers_count":837,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"archived":false,"open_issues_count":65,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":107,"open_issues":65,"watchers":837,"default_branch":"master"}},"base":{"label":"tock:master","ref":"master","sha":"fcf63601f0c4ee86d78e2c708bd0de1f77a009ab","user":{"login":"tock","id":34076064,"avatar_url":"https://avatars1.githubusercontent.com/u/34076064?v=4","gravatar_id":"","url":"https://api.github.com/users/tock","html_url":"https://github.com/tock","followers_url":"https://api.github.com/users/tock/followers","following_url":"https://api.github.com/users/tock/following{/other_user}","gists_url":"https://api.github.com/users/tock/gists{/gist_id}","starred_url":"https://api.github.com/users/tock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tock/subscriptions","organizations_url":"https://api.github.com/users/tock/orgs","repos_url":"https://api.github.com/users/tock/repos","events_url":"https://api.github.com/users/tock/events{/privacy}","received_events_url":"https://api.github.com/users/tock/received_events","type":"Organization","site_admin":false},"repo":{"id":36428094,"name":"tock","full_name":"tock/tock","owner":{"login":"tock","id":34076064,"avatar_url":"https://avatars1.githubusercontent.com/u/34076064?v=4","gravatar_id":"","url":"https://api.github.com/users/tock","html_url":"https://github.com/tock","followers_url":"https://api.github.com/users/tock/followers","following_url":"https://api.github.com/users/tock/following{/other_user}","gists_url":"https://api.github.com/users/tock/gists{/gist_id}","starred_url":"https://api.github.com/users/tock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tock/subscriptions","organizations_url":"https://api.github.com/users/tock/orgs","repos_url":"https://api.github.com/users/tock/repos","events_url":"https://api.github.com/users/tock/events{/privacy}","received_events_url":"https://api.github.com/users/tock/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tock/tock","description":"A secure embedded operating system for Cortex-M based microcontrollers","fork":false,"url":"https://api.github.com/repos/tock/tock","forks_url":"https://api.github.com/repos/tock/tock/forks","keys_url":"https://api.github.com/repos/tock/tock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tock/tock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tock/tock/teams","hooks_url":"https://api.github.com/repos/tock/tock/hooks","issue_events_url":"https://api.github.com/repos/tock/tock/issues/events{/number}","events_url":"https://api.github.com/repos/tock/tock/events","assignees_url":"https://api.github.com/repos/tock/tock/assignees{/user}","branches_url":"https://api.github.com/repos/tock/tock/branches{/branch}","tags_url":"https://api.github.com/repos/tock/tock/tags","blobs_url":"https://api.github.com/repos/tock/tock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tock/tock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tock/tock/git/refs{/sha}","trees_url":"https://api.github.com/repos/tock/tock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tock/tock/statuses/{sha}","languages_url":"https://api.github.com/repos/tock/tock/languages","stargazers_url":"https://api.github.com/repos/tock/tock/stargazers","contributors_url":"https://api.github.com/repos/tock/tock/contributors","subscribers_url":"https://api.github.com/repos/tock/tock/subscribers","subscription_url":"https://api.github.com/repos/tock/tock/subscription","commits_url":"https://api.github.com/repos/tock/tock/commits{/sha}","git_commits_url":"https://api.github.com/repos/tock/tock/git/commits{/sha}","comments_url":"https://api.github.com/repos/tock/tock/comments{/number}","issue_comment_url":"https://api.github.com/repos/tock/tock/issues/comments{/number}","contents_url":"https://api.github.com/repos/tock/tock/contents/{+path}","compare_url":"https://api.github.com/repos/tock/tock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tock/tock/merges","archive_url":"https://api.github.com/repos/tock/tock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tock/tock/downloads","issues_url":"https://api.github.com/repos/tock/tock/issues{/number}","pulls_url":"https://api.github.com/repos/tock/tock/pulls{/number}","milestones_url":"https://api.github.com/repos/tock/tock/milestones{/number}","notifications_url":"https://api.github.com/repos/tock/tock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tock/tock/labels{/name}","releases_url":"https://api.github.com/repos/tock/tock/releases{/id}","deployments_url":"https://api.github.com/repos/tock/tock/deployments","created_at":"2015-05-28T09:26:47Z","updated_at":"2018-05-01T03:07:55Z","pushed_at":"2018-05-01T19:15:21Z","git_url":"git://github.com/tock/tock.git","ssh_url":"git@github.com:tock/tock.git","clone_url":"https://github.com/tock/tock.git","svn_url":"https://github.com/tock/tock","homepage":"https://www.tockos.org","size":134226,"stargazers_count":837,"watchers_count":837,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"archived":false,"open_issues_count":65,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":107,"open_issues":65,"watchers":837,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tock/tock/pulls/855"},"html":{"href":"https://github.com/tock/tock/pull/855"},"issue":{"href":"https://api.github.com/repos/tock/tock/issues/855"},"comments":{"href":"https://api.github.com/repos/tock/tock/issues/855/comments"},"review_comments":{"href":"https://api.github.com/repos/tock/tock/pulls/855/comments"},"review_comment":{"href":"https://api.github.com/repos/tock/tock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tock/tock/pulls/855/commits"},"statuses":{"href":"https://api.github.com/repos/tock/tock/statuses/301f971f30239af430262b804a9487fa93289c2c"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"brghena"}}