Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TilCreator
firmware
Commits
3d60a8ae
Commit
3d60a8ae
authored
5 years ago
by
genofire
Committed by
Hauke Mehrtens
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ble: card10 srv - without encrypt and auth
parent
cb046114
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
epicardium/ble/card10.c
+102
-104
102 additions, 104 deletions
epicardium/ble/card10.c
epicardium/ble/filetransfer.c
+3
-4
3 additions, 4 deletions
epicardium/ble/filetransfer.c
with
105 additions
and
108 deletions
epicardium/ble/card10.c
+
102
−
104
View file @
3d60a8ae
...
@@ -269,15 +269,14 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -269,15 +269,14 @@ static const attsAttr_t card10SvcAttrList[] = {
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
maxLen
=
sizeof
(
UUID_char_time
),
.
maxLen
=
sizeof
(
UUID_char_time
),
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_time
,
{
.
pUuid
=
UUID_attChar_time
,
.
pValue
=
timeValue
,
.
pValue
=
timeValue
,
.
pLen
=
&
timeLen
,
.
pLen
=
&
timeLen
,
.
maxLen
=
sizeof
(
uint64_t
),
.
maxLen
=
sizeof
(
uint64_t
),
.
settings
=
(
ATTS_SET_WRITE_CBACK
|
ATTS_SET_READ_CBACK
),
.
settings
=
(
ATTS_SET_WRITE_CBACK
|
ATTS_SET_READ_CBACK
),
.
permissions
=
.
permissions
=
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_READ
,
(
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_ENC
|
},
ATTS_PERMIT_WRITE_AUTH
|
ATTS_PERMIT_READ
|
ATTS_PERMIT_READ_ENC
|
ATTS_PERMIT_READ_AUTH
)
},
// VIBRA
// VIBRA
...
@@ -286,13 +285,13 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -286,13 +285,13 @@ static const attsAttr_t card10SvcAttrList[] = {
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
maxLen
=
sizeof
(
UUID_char_vibra
),
.
maxLen
=
sizeof
(
UUID_char_vibra
),
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_vibra
,
{
.
pUuid
=
UUID_attChar_vibra
,
.
pValue
=
NULL
,
.
pValue
=
NULL
,
.
maxLen
=
sizeof
(
uint16_t
),
.
maxLen
=
sizeof
(
uint16_t
),
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
permissions
=
.
permissions
=
ATTS_PERMIT_WRITE
,
(
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_ENC
|
},
ATTS_PERMIT_WRITE_AUTH
)
},
// ROCKETS
// ROCKETS
...
@@ -301,13 +300,13 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -301,13 +300,13 @@ static const attsAttr_t card10SvcAttrList[] = {
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
maxLen
=
sizeof
(
UUID_char_rockets
),
.
maxLen
=
sizeof
(
UUID_char_rockets
),
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_rockets
,
{
.
pUuid
=
UUID_attChar_rockets
,
.
pValue
=
NULL
,
.
pValue
=
NULL
,
.
maxLen
=
3
*
sizeof
(
uint8_t
),
.
maxLen
=
3
*
sizeof
(
uint8_t
),
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
permissions
=
.
permissions
=
ATTS_PERMIT_WRITE
,
(
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_ENC
|
},
ATTS_PERMIT_WRITE_AUTH
)
},
// BG LED Bottom left
// BG LED Bottom left
...
@@ -316,13 +315,13 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -316,13 +315,13 @@ static const attsAttr_t card10SvcAttrList[] = {
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
maxLen
=
sizeof
(
UUID_char_led_bg_bottom_left
),
.
maxLen
=
sizeof
(
UUID_char_led_bg_bottom_left
),
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_led_bg_bottom_left
,
{
.
pUuid
=
UUID_attChar_led_bg_bottom_left
,
.
pValue
=
NULL
,
.
pValue
=
NULL
,
.
maxLen
=
3
*
sizeof
(
uint8_t
),
.
maxLen
=
3
*
sizeof
(
uint8_t
),
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
permissions
=
.
permissions
=
ATTS_PERMIT_WRITE
,
(
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_ENC
|
},
ATTS_PERMIT_WRITE_AUTH
)
},
// BG LED Bottom right
// BG LED Bottom right
...
@@ -331,13 +330,13 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -331,13 +330,13 @@ static const attsAttr_t card10SvcAttrList[] = {
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
maxLen
=
sizeof
(
UUID_char_led_bg_bottom_right
),
.
maxLen
=
sizeof
(
UUID_char_led_bg_bottom_right
),
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_led_bg_bottom_right
,
{
.
pUuid
=
UUID_attChar_led_bg_bottom_right
,
.
pValue
=
NULL
,
.
pValue
=
NULL
,
.
maxLen
=
3
*
sizeof
(
uint8_t
),
.
maxLen
=
3
*
sizeof
(
uint8_t
),
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
permissions
=
.
permissions
=
ATTS_PERMIT_WRITE
,
(
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_ENC
|
},
ATTS_PERMIT_WRITE_AUTH
)
},
// BG LED top right
// BG LED top right
...
@@ -347,13 +346,13 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -347,13 +346,13 @@ static const attsAttr_t card10SvcAttrList[] = {
.
maxLen
=
sizeof
(
UUID_char_led_bg_top_right
),
.
maxLen
=
sizeof
(
UUID_char_led_bg_top_right
),
.
settings
=
0
,
.
settings
=
0
,
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_led_bg_top_right
,
{
.
pUuid
=
UUID_attChar_led_bg_top_right
,
.
pValue
=
NULL
,
.
pValue
=
NULL
,
.
maxLen
=
3
*
sizeof
(
uint8_t
),
.
maxLen
=
3
*
sizeof
(
uint8_t
),
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
permissions
=
.
permissions
=
ATTS_PERMIT_WRITE
,
(
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_ENC
|
},
ATTS_PERMIT_WRITE_AUTH
)
},
// BG LED top left
// BG LED top left
...
@@ -362,13 +361,13 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -362,13 +361,13 @@ static const attsAttr_t card10SvcAttrList[] = {
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
maxLen
=
sizeof
(
UUID_char_led_bg_top_left
),
.
maxLen
=
sizeof
(
UUID_char_led_bg_top_left
),
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_led_bg_top_left
,
{
.
pUuid
=
UUID_attChar_led_bg_top_left
,
.
pValue
=
NULL
,
.
pValue
=
NULL
,
.
maxLen
=
3
*
sizeof
(
uint8_t
),
.
maxLen
=
3
*
sizeof
(
uint8_t
),
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
permissions
=
.
permissions
=
ATTS_PERMIT_WRITE
,
(
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_ENC
|
},
ATTS_PERMIT_WRITE_AUTH
)
},
// Dim bottom module
// Dim bottom module
...
@@ -377,14 +376,14 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -377,14 +376,14 @@ static const attsAttr_t card10SvcAttrList[] = {
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
maxLen
=
sizeof
(
UUID_char_leds_bottom_dim
),
.
maxLen
=
sizeof
(
UUID_char_leds_bottom_dim
),
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_leds_bottom_dim
,
{
.
pUuid
=
UUID_attChar_leds_bottom_dim
,
.
pValue
=
NULL
,
.
pValue
=
NULL
,
.
pLen
=
0
,
.
pLen
=
0
,
.
maxLen
=
sizeof
(
uint8_t
),
.
maxLen
=
sizeof
(
uint8_t
),
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
permissions
=
.
permissions
=
ATTS_PERMIT_WRITE
,
(
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_ENC
|
},
ATTS_PERMIT_WRITE_AUTH
)
},
// Dim top module
// Dim top module
...
@@ -393,13 +392,13 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -393,13 +392,13 @@ static const attsAttr_t card10SvcAttrList[] = {
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
maxLen
=
sizeof
(
UUID_char_leds_top_dim
),
.
maxLen
=
sizeof
(
UUID_char_leds_top_dim
),
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_leds_top_dim
,
{
.
pUuid
=
UUID_attChar_leds_top_dim
,
.
pValue
=
NULL
,
.
pValue
=
NULL
,
.
maxLen
=
sizeof
(
uint8_t
),
.
maxLen
=
sizeof
(
uint8_t
),
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
permissions
=
.
permissions
=
ATTS_PERMIT_WRITE
,
(
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_ENC
|
},
ATTS_PERMIT_WRITE_AUTH
)
},
// led powersafe
// led powersafe
...
@@ -408,13 +407,13 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -408,13 +407,13 @@ static const attsAttr_t card10SvcAttrList[] = {
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
maxLen
=
sizeof
(
UUID_char_led_powersafe
),
.
maxLen
=
sizeof
(
UUID_char_led_powersafe
),
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_led_powersafe
,
{
.
pUuid
=
UUID_attChar_led_powersafe
,
.
pValue
=
NULL
,
.
pValue
=
NULL
,
.
maxLen
=
sizeof
(
uint8_t
),
.
maxLen
=
sizeof
(
uint8_t
),
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
permissions
=
.
permissions
=
ATTS_PERMIT_WRITE
,
(
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_ENC
|
},
ATTS_PERMIT_WRITE_AUTH
)
},
// flashlight
// flashlight
...
@@ -423,13 +422,13 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -423,13 +422,13 @@ static const attsAttr_t card10SvcAttrList[] = {
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
maxLen
=
sizeof
(
UUID_char_flashlight
),
.
maxLen
=
sizeof
(
UUID_char_flashlight
),
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_flashlight
,
{
.
pUuid
=
UUID_attChar_flashlight
,
.
pValue
=
NULL
,
.
pValue
=
NULL
,
.
maxLen
=
sizeof
(
uint8_t
),
.
maxLen
=
sizeof
(
uint8_t
),
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
permissions
=
.
permissions
=
ATTS_PERMIT_WRITE
,
(
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_ENC
|
},
ATTS_PERMIT_WRITE_AUTH
)
},
// personal state
// personal state
...
@@ -438,15 +437,14 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -438,15 +437,14 @@ static const attsAttr_t card10SvcAttrList[] = {
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
maxLen
=
sizeof
(
UUID_char_personal_state
),
.
maxLen
=
sizeof
(
UUID_char_personal_state
),
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_personal_state
,
{
.
pUuid
=
UUID_attChar_personal_state
,
.
pValue
=
&
personalStateValue
,
.
pValue
=
&
personalStateValue
,
.
pLen
=
&
personalStateLen
,
.
pLen
=
&
personalStateLen
,
.
maxLen
=
sizeof
(
uint16_t
),
.
maxLen
=
sizeof
(
uint16_t
),
.
settings
=
(
ATTS_SET_WRITE_CBACK
|
ATTS_SET_READ_CBACK
),
.
settings
=
(
ATTS_SET_WRITE_CBACK
|
ATTS_SET_READ_CBACK
),
.
permissions
=
.
permissions
=
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_READ
,
(
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_ENC
|
},
ATTS_PERMIT_WRITE_AUTH
|
ATTS_PERMIT_READ
|
ATTS_PERMIT_READ_ENC
|
ATTS_PERMIT_READ_AUTH
)
},
// ABOVE LEDS
// ABOVE LEDS
...
@@ -455,13 +453,13 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -455,13 +453,13 @@ static const attsAttr_t card10SvcAttrList[] = {
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
maxLen
=
sizeof
(
UUID_char_leds_above
),
.
maxLen
=
sizeof
(
UUID_char_leds_above
),
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_leds_above
,
{
.
pUuid
=
UUID_attChar_leds_above
,
.
pValue
=
NULL
,
.
pValue
=
NULL
,
.
maxLen
=
11
*
3
*
sizeof
(
uint8_t
),
.
maxLen
=
11
*
3
*
sizeof
(
uint8_t
),
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
settings
=
ATTS_SET_WRITE_CBACK
,
.
permissions
=
.
permissions
=
ATTS_PERMIT_WRITE
,
(
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_ENC
|
},
ATTS_PERMIT_WRITE_AUTH
)
},
// Light sensor
// Light sensor
...
@@ -470,14 +468,14 @@ static const attsAttr_t card10SvcAttrList[] = {
...
@@ -470,14 +468,14 @@ static const attsAttr_t card10SvcAttrList[] = {
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
pLen
=
(
uint16_t
*
)
&
UUID_char_len
,
.
maxLen
=
sizeof
(
UUID_char_light_sensor
),
.
maxLen
=
sizeof
(
UUID_char_light_sensor
),
.
permissions
=
ATTS_PERMIT_READ
},
.
permissions
=
ATTS_PERMIT_READ
},
{
.
pUuid
=
UUID_attChar_light_sensor
,
{
.
pUuid
=
UUID_attChar_light_sensor
,
.
pValue
=
initLightSensorValue
,
.
pValue
=
initLightSensorValue
,
.
pLen
=
&
initLightSensorLen
,
.
pLen
=
&
initLightSensorLen
,
.
maxLen
=
sizeof
(
uint8_t
),
.
maxLen
=
sizeof
(
uint8_t
),
.
settings
=
ATTS_SET_READ_CBACK
,
.
settings
=
ATTS_SET_READ_CBACK
,
.
permissions
=
.
permissions
=
ATTS_PERMIT_READ
,
(
ATTS_PERMIT_READ
|
ATTS_PERMIT_READ_ENC
|
},
ATTS_PERMIT_READ_AUTH
)
},
};
};
// validating, that the service really get all charateristics
// validating, that the service really get all charateristics
...
...
This diff is collapsed.
Click to expand it.
epicardium/ble/filetransfer.c
+
3
−
4
View file @
3d60a8ae
...
@@ -143,7 +143,7 @@ static const attsAttr_t fileTransCfgList[] = {
...
@@ -143,7 +143,7 @@ static const attsAttr_t fileTransCfgList[] = {
.
pLen
=
NULL
,
.
pLen
=
NULL
,
.
maxLen
=
128
,
.
maxLen
=
128
,
.
settings
=
ATTS_SET_WRITE_CBACK
|
ATTS_SET_VARIABLE_LEN
,
.
settings
=
ATTS_SET_WRITE_CBACK
|
ATTS_SET_VARIABLE_LEN
,
.
permissions
=
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_AUTH
,
.
permissions
=
ATTS_PERMIT_WRITE
,
},
},
/* File transfer Central RX characteristic */
/* File transfer Central RX characteristic */
{
{
...
@@ -161,7 +161,7 @@ static const attsAttr_t fileTransCfgList[] = {
...
@@ -161,7 +161,7 @@ static const attsAttr_t fileTransCfgList[] = {
.
pLen
=
&
attRxChConfigValue_len
,
.
pLen
=
&
attRxChConfigValue_len
,
.
maxLen
=
sizeof
(
attRxChConfigValue
),
.
maxLen
=
sizeof
(
attRxChConfigValue
),
.
settings
=
ATTS_SET_VARIABLE_LEN
,
.
settings
=
ATTS_SET_VARIABLE_LEN
,
.
permissions
=
ATTS_PERMIT_READ
|
ATTS_PERMIT_READ_AUTH
,
.
permissions
=
ATTS_PERMIT_READ
,
},
},
/* File transfer Central RX notification channel */
/* File transfer Central RX notification channel */
{
{
...
@@ -170,8 +170,7 @@ static const attsAttr_t fileTransCfgList[] = {
...
@@ -170,8 +170,7 @@ static const attsAttr_t fileTransCfgList[] = {
.
pLen
=
&
attRxChConfigValue_len
,
.
pLen
=
&
attRxChConfigValue_len
,
.
maxLen
=
sizeof
(
attRxChConfigValue
),
.
maxLen
=
sizeof
(
attRxChConfigValue
),
.
settings
=
ATTS_SET_CCC
,
.
settings
=
ATTS_SET_CCC
,
.
permissions
=
ATTS_PERMIT_READ
|
ATTS_PERMIT_READ_AUTH
|
.
permissions
=
ATTS_PERMIT_READ
|
ATTS_PERMIT_WRITE
,
ATTS_PERMIT_WRITE
|
ATTS_PERMIT_WRITE_AUTH
,
},
},
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment