Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
meta-nemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
meta-nemo
Commits
e0131622
Commit
e0131622
authored
Nov 24, 2016
by
Florent Revest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bluez5: advertise hostname in BLE ad payload to have a recognizable name in AsteroidOSSync
parent
539357e1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
1 deletion
+69
-1
advertise-name.patch
recipes-connectivity/bluez5/bluez5/advertise-name.patch
+67
-0
bluez5_%.bbappend
recipes-connectivity/bluez5/bluez5_%.bbappend
+2
-1
No files found.
recipes-connectivity/bluez5/bluez5/advertise-name.patch
0 → 100644
View file @
e0131622
From: Florent Revest <revestflo@gmail.com>
Date: Thu, 24 Nov 2016 17:39:00 +0200
Subject: [PATCH] Forces GLES2 the dirty way
---
--- a/src/shared/ad.c
+++ b/src/shared/ad.c
@@ -110,6 +110,18 @@
free(ad);
}
+static size_t local_name_length()
+{
+ size_t length = 0;
+ char hostname[1024];
+
+ length += 2; /* one byte for length and one byte for 0x09 */
+ gethostname(hostname, 1024);
+ length += strlen(&hostname);
+
+ return length;
+}
+
static size_t uuid_list_length(struct queue *uuid_queue)
{
bool uuid16_included = false;
@@ -187,6 +199,8 @@
{
size_t length = 0;
+ length += local_name_length();
+
length += uuid_list_length(ad->service_uuids);
length += uuid_list_length(ad->solicit_uuids);
@@ -198,6 +212,22 @@
return length;
}
+
+static void serialize_local_name(uint8_t *buf, uint8_t *pos)
+{
+ char hostname[1024];
+ uint8_t hostname_len;
+
+ gethostname(hostname, 1024);
+ hostname_len = strlen(&hostname);
+
+ buf[(*pos)++] = hostname_len + 1;
+ buf[(*pos)++] = EIR_NAME_COMPLETE;
+
+ memcpy(buf + *pos, &hostname, hostname_len);
+ *pos += hostname_len;
+}
+
static void serialize_uuids(struct queue *uuids, uint8_t uuid_type,
uint8_t ad_type, uint8_t *buf,
uint8_t *pos)
@@ -330,6 +360,8 @@
if (!adv_data)
return NULL;
+ serialize_local_name(adv_data, &pos);
+
serialize_service_uuids(ad->service_uuids, adv_data, &pos);
serialize_solicit_uuids(ad->solicit_uuids, adv_data, &pos);
recipes-connectivity/bluez5/bluez5_%.bbappend
View file @
e0131622
FILESEXTRAPATHS_prepend := "${THISDIR}/bluez5:"
FILESEXTRAPATHS_prepend := "${THISDIR}/bluez5:"
SRC_URI += "file://main.conf \
SRC_URI += "file://main.conf \
file://bluetooth.service \
file://bluetooth.service \
file://bluetooth.conf"
file://bluetooth.conf \
file://advertise-name.patch"
do_install_append() {
do_install_append() {
install -d ${D}/etc/bluetooth/
install -d ${D}/etc/bluetooth/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment