Skip to content

Instantly share code, notes, and snippets.

View Vudentz's full-sized avatar

Luiz Augusto von Dentz Vudentz

View GitHub Profile
diff --git a/gobex/gobex-apparam.c b/gobex/gobex-apparam.c
index 4328172..b16cee1 100644
--- a/gobex/gobex-apparam.c
+++ b/gobex/gobex-apparam.c
@@ -152,6 +152,9 @@ gssize g_obex_apparam_encode(GObexApparam *apparam, void *buf, gsize len)
GHashTableIter iter;
gpointer key, value;
+ if (!apparam)
+ return 0;
diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c
index ad93208..d5a3046 100644
--- a/obexd/plugins/pbap.c
+++ b/obexd/plugins/pbap.c
@@ -369,6 +369,7 @@ static int generate_response(void *user_data)
/* Ignore all other parameter and return PhoneBookSize */
uint16_t size = g_slist_length(pbap->cache.entries);
+ pbap->obj->firstpacket = TRUE;
pbap->obj->apparam = g_obex_apparam_set_uint16(
43434.591 Set My Beacon to: 17f2010000000000000000000000000a525a5e89f7957c60
mesh_net_set_address: 0x2
# netkeys = 1
network idx 0000 key str bad51d3df4e7579aa2d2ebe3a7ab831c
43434.592 K2-N: bad51d3df4e7579aa2d2ebe3a7ab831c
43434.592 K2-S1(smk2): 4f90480c1871bfbffd16971f4d8d10b1
43434.592 K2-P: 00
43434.592 K2-T: 08363b15646f9dcf2b529d370aa2d3e4
43434.592 K2-T1: c06cbc6bb737c0a3abe6de6daedb6730
43434.592 K2-T2: af80b5a31826e369d07af4e58ed9ca0f
diff --git a/include/shell/shell.h b/include/shell/shell.h
index c074630..08e74cc 100644
--- a/include/shell/shell.h
+++ b/include/shell/shell.h
@@ -100,6 +100,9 @@ void shell_register_prompt_handler(shell_prompt_function_t handler);
*/
void shell_register_default_module(const char *name);
+
+int shell_exec(const char *line);
diff --git a/obexd/src/obex.c b/obexd/src/obex.c
index 788bffc..be79a77 100644
--- a/obexd/src/obex.c
+++ b/obexd/src/obex.c
@@ -864,6 +864,17 @@ static void cmd_put(GObex *obex, GObexPacket *req, gpointer user_data)
return;
}
+ /* OPP session don't require CONNECT, in which case just call connect
+ * callback to register the transfer.
=== eSCO works ===
> HCI Event: Connect Request (0x04) plen 10 [hci0] 913.724170
Address: C4:0B:CB:41:D7:C2 (OUI C4-0B-CB)
Class: 0x000000
Major class: Miscellaneous
Minor class: 0x00
Link type: eSCO (0x02)
< HCI Command: Accept Synchronous Co.. (0x01|0x0029) plen 21 [hci0] 913.729795
Address: C4:0B:CB:41:D7:C2 (OUI C4-0B-CB)
Jul 04 14:14:09 localhost.localdomain NGI_BTSms_MAL[5455]: Could not find an event handler for: PhoneStatusNotification
Jul 04 14:14:10 localhost.localdomain bash[1455]: kill: sending signal to 25805 failed: No such process
Jul 04 14:14:10 localhost.localdomain bash[1455]: [LOGCOLLECTOR] Stop recording pulseaudio : 25805 -> /usr/bin/kill 25805
Jul 04 14:14:10 localhost.localdomain bash[1455]: kill: sending signal to 26033 failed: No such process
Jul 04 14:14:10 localhost.localdomain bash[1455]: kill: sending signal to 26053 failed: No such process
Jul 04 14:14:10 localhost.localdomain bash[1455]: kill: sending signal to 26071 failed: No such process
Jul 04 14:14:10 localhost.localdomain bash[1455]: [LOGCOLLECTOR] Stop recording jack : 26033 -> /usr/bin/kill 26033
Jul 04 14:14:10 localhost.localdomain bash[1455]: [LOGCOLLECTOR] Stop recording jack : 26053 -> /usr/bin/kill 26033
Jul 04 14:14:10 localhost.localdomain bash[1455]: [LOGCOLLECTOR] Stop recording jack : 26071 -> /usr/bin/kill 26033
Jul 04 14:
iscover-unprovisioned on
set_scan_filter_uuids 00001827-0000-1000-8000-00805f9b34fb
SetDiscoveryFilter success
Discovery started
[CHG] Controller B8:8A:60:D8:17:D7 Discovering: yes
[NEW] Device 00:1B:DC:07:31:88 Zephyr
[bluetooth]# Mesh Provisioning Service (00001827-0000-1000-8000-00805f9b34fb)
Device UUID: dddd0000000000000000000000000000
OOB: 0000
discover-unprovisioned off
diff --git a/subsys/bluetooth/host/mesh/proxy.c b/subsys/bluetooth/host/mesh/proxy.c
index 6a71eb8..cc086bd 100644
--- a/subsys/bluetooth/host/mesh/proxy.c
+++ b/subsys/bluetooth/host/mesh/proxy.c
@@ -477,20 +477,6 @@ static void proxy_connected(struct bt_conn *conn, u8_t err)
client->conn = bt_conn_ref(conn);
memset(client->filter, 0, sizeof(client->filter));
net_buf_simple_init(&client->buf, 0);
-
- if (IS_ENABLED(CONFIG_BLUETOOTH_MESH_PB_GATT) &&
[meshctl]# discover-unprovisioned on
set_scan_filter_uuids 00001827-0000-1000-8000-00805f9b34fb
SetDiscoveryFilter success
Discovery started
[meshctl]# Adapter property changed
[CHG] Controller B8:8A:60:D8:17:D7 Discovering: yes
[meshctl]# Mesh Provisioning Service (00001827-0000-1000-8000-00805f9b34fb)
Device UUID: dddd0000000000000000000000000000
OOB: 0000
[NEW] Device 00:1B:DC:07:31:88 Zephyr