You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/12/13 23:08:34 UTC

[1/4] incubator-mynewt-core git commit: bletiny: Add check for directed advertising type

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 70f72d24d -> 916b333d9


bletiny: Add check for directed advertising type

Connectable directed advertising event does not contain advertising
data, therefore there is no need to print it.
In the same time we add log saying about event type as this is
useful for PTS testing


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/ae51a7a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ae51a7a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ae51a7a1

Branch: refs/heads/develop
Commit: ae51a7a1c52e1eb926eb939f74d315e9606e3727
Parents: 0c5bae6
Author: \u0141ukasz Rymanowski <lu...@codecoup.pl>
Authored: Mon Dec 12 12:04:24 2016 +0100
Committer: \u0141ukasz Rymanowski <lu...@codecoup.pl>
Committed: Tue Dec 13 22:08:10 2016 +0100

----------------------------------------------------------------------
 apps/bletiny/src/main.c | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ae51a7a1/apps/bletiny/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/main.c b/apps/bletiny/src/main.c
index d3a9d38..c78d160 100755
--- a/apps/bletiny/src/main.c
+++ b/apps/bletiny/src/main.c
@@ -936,12 +936,23 @@ bletiny_gap_event(struct ble_gap_event *event, void *arg)
         return 0;
 
     case BLE_GAP_EVENT_DISC:
-        console_printf("received advertisement; event_type=%d addr_type=%d "
-                       "addr=", event->disc.event_type,
-                       event->disc.addr_type);
+        console_printf("received advertisement; event_type=%d rssi=%d "
+                       "addr_type=%d addr=", event->disc.event_type,
+                       event->disc.rssi, event->disc.addr_type);
         print_addr(event->disc.addr);
-        console_printf(" length_data=%d rssi=%d data=",
-                       event->disc.length_data, event->disc.rssi);
+
+        /*
+         * There is no adv data to print in case of connectable
+         * directed advertising
+         */
+        if (event->disc.event_type == BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_HD ||
+                event->disc.event_type == BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_LD) {
+                console_printf("\nConnectable directed advertising event\n");
+                return 0;
+        }
+
+        console_printf(" length_data=%d data=",
+                               event->disc.length_data);
         print_bytes(event->disc.data, event->disc.length_data);
         console_printf(" fields:\n");
         bletiny_print_adv_fields(event->disc.fields);


[4/4] incubator-mynewt-core git commit: This closes #139.

Posted by cc...@apache.org.
This closes #139.

Merge remote-tracking branch 'rymanluk/gap_fixes' into develop

* rymanluk/gap_fixes:
  bletiny: Add check for directed advertising type
  bletiny: Enhance logs on advertising events
  nimble/gap: Fix for missing ble_hs_unlock


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/916b333d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/916b333d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/916b333d

Branch: refs/heads/develop
Commit: 916b333d985cbcdb8388c1167fc4c7708d10f934
Parents: 70f72d2 ae51a7a
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Dec 13 15:03:20 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Dec 13 15:03:20 2016 -0800

----------------------------------------------------------------------
 apps/bletiny/src/main.c       | 40 ++++++++++++++++++++++++++++++++------
 net/nimble/host/src/ble_gap.c |  2 +-
 2 files changed, 35 insertions(+), 7 deletions(-)
----------------------------------------------------------------------



[3/4] incubator-mynewt-core git commit: nimble/gap: Fix for missing ble_hs_unlock

Posted by cc...@apache.org.
nimble/gap: Fix for missing ble_hs_unlock

Use goto done; so lock can be released properly


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/bd546f76
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/bd546f76
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/bd546f76

Branch: refs/heads/develop
Commit: bd546f763a9b68c3a09de867845bec3a3208e88a
Parents: 5e0f1bc
Author: \u0141ukasz Rymanowski <lu...@codecoup.pl>
Authored: Mon Dec 12 15:15:17 2016 +0100
Committer: \u0141ukasz Rymanowski <lu...@codecoup.pl>
Committed: Tue Dec 13 22:08:10 2016 +0100

----------------------------------------------------------------------
 net/nimble/host/src/ble_gap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd546f76/net/nimble/host/src/ble_gap.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_gap.c b/net/nimble/host/src/ble_gap.c
index fcfdc57..e97888b 100644
--- a/net/nimble/host/src/ble_gap.c
+++ b/net/nimble/host/src/ble_gap.c
@@ -1897,7 +1897,7 @@ ble_gap_adv_start(uint8_t own_addr_type, uint8_t peer_addr_type,
 
     rc = ble_hs_id_use_addr(own_addr_type);
     if (rc != 0) {
-        return rc;
+        goto done;
     }
 
     BLE_HS_LOG(INFO, "GAP procedure initiated: advertise; ");


[2/4] incubator-mynewt-core git commit: bletiny: Enhance logs on advertising events

Posted by cc...@apache.org.
bletiny: Enhance logs on advertising events

This patch add additional logs decoding advertising flags.
This is useful for PTS testing.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/0c5bae69
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/0c5bae69
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/0c5bae69

Branch: refs/heads/develop
Commit: 0c5bae698fc81df181477f7e4736a2f0bacd013d
Parents: bd546f7
Author: \u0141ukasz Rymanowski <lu...@codecoup.pl>
Authored: Mon Dec 12 12:02:00 2016 +0100
Committer: \u0141ukasz Rymanowski <lu...@codecoup.pl>
Committed: Tue Dec 13 22:08:10 2016 +0100

----------------------------------------------------------------------
 apps/bletiny/src/main.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0c5bae69/apps/bletiny/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/main.c b/apps/bletiny/src/main.c
index 4ec6d5d..d3a9d38 100755
--- a/apps/bletiny/src/main.c
+++ b/apps/bletiny/src/main.c
@@ -141,7 +141,24 @@ bletiny_print_adv_fields(const struct ble_hs_adv_fields *fields)
     int i;
 
     if (fields->flags_is_present) {
-        console_printf("    flags=0x%02x\n", fields->flags);
+        console_printf("    flags=0x%02x:\n", fields->flags);
+
+        if (!(fields->flags & BLE_HS_ADV_F_DISC_LTD) &&
+                !(fields->flags & BLE_HS_ADV_F_DISC_GEN)) {
+                console_printf("        Non-discoverable mode\n");
+        }
+
+        if (fields->flags & BLE_HS_ADV_F_DISC_LTD) {
+                console_printf("        Limited discoverable mode\n");
+        }
+
+        if (fields->flags & BLE_HS_ADV_F_DISC_GEN) {
+                console_printf("        General discoverable mode\n");
+        }
+
+        if (fields->flags & BLE_HS_ADV_F_BREDR_UNSUP) {
+                console_printf("        BR/EDR not supported\n");
+        }
     }
 
     if (fields->uuids16 != NULL) {