Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François Revol
firmware
Commits
7ea488c6
Commit
7ea488c6
authored
Jun 23, 2020
by
schneider
Browse files
feat(ble): Appear as generic watch, add card10 UUID to advertisement
parent
8b226993
Changes
3
Hide whitespace changes
Inline
Side-by-side
epicardium/ble/ble_api.h
View file @
7ea488c6
#pragma once
#define CARD10_UUID_SUFFIX \
0x42, 0x23, 0x42, 0x23, 0x42, 0x23, 0x42, 0x23, 0x42, 0x23, 0x42, 0x23
#define CARD10_UUID_PREFIX 0x02, 0x23, 0x42
/**************************************************************************************************
Function Declarations
**************************************************************************************************/
...
...
epicardium/ble/ble_main.c
View file @
7ea488c6
...
...
@@ -40,6 +40,7 @@
#include
"rscp/rscp_api.h"
#include
"cccd.h"
#include
"ble_api.h"
#include
"epicardium.h"
#include
"api/interrupt-sender.h"
#include
"modules/log.h"
...
...
@@ -159,16 +160,14 @@ static const uint8_t bleAdvDataDisc[] =
DM_FLAG_LE_LIMITED_DISC
|
/*! flags */
DM_FLAG_LE_BREDR_NOT_SUP
,
/*! tx power */
2
,
/*! length */
DM_ADV_TYPE_TX_POWER
,
/*! AD type */
0
,
/*! tx power */
3
,
DM_ADV_TYPE_APPEARANCE
,
UINT16_TO_BYTES
(
CH_APPEAR_WATCH
),
/*! service UUID list */
5
,
/*! length */
DM_ADV_TYPE_16_UUID
,
/*! AD type */
UINT16_TO_BYTES
(
ATT_UUID_DEVICE_INFO_SERVICE
),
UINT16_TO_BYTES
(
ATT_UUID_BATTERY_SERVICE
)
17
,
DM_ADV_TYPE_128_UUID_PART
,
CARD10_UUID_SUFFIX
,
0x0
,
CARD10_UUID_PREFIX
};
/*! scan data, discoverable mode */
...
...
epicardium/ble/card10.c
View file @
7ea488c6
#include
"ble_api.h"
#include
"epicardium.h"
#include
"wsf_types.h"
#include
"util/bstream.h"
#include
"wsf_assert.h"
#include
"att_api.h"
#include
"epicardium.h"
#include
<stdio.h>
#include
<string.h>
#include
<stdbool.h>
#include
<machine/endian.h>
#define CARD10_UUID_SUFFIX \
0x42, 0x23, 0x42, 0x23, 0x42, 0x23, 0x42, 0x23, 0x42, 0x23, 0x42, 0x23
#define CARD10_UUID_PREFIX 0x02, 0x23, 0x42
/*!< \brief Service start handle. */
#define CARD10_START_HDL 0x920
/*!< \brief Service end handle. */
...
...
Write
Preview
Supports
Markdown
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