8000 ibeacon UUId & by markiv25 · Pull Request #675 · nkolban/esp32-snippets · GitHub
[go: up one dir, main page]

Skip to content

ibeacon UUId & #675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 103 commits into from
Nov 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
937a81c
Work in progress for DMA driver
nkolban Jun 8, 2018
75d405c
Set spi_bus_config_t and spi_device_interface_config_t flags
HanVertegaal Jun 14, 2018
61604a9
Merge pull request #564 from HanVertegaal/Set-SPI-flags
nkolban Jun 15, 2018
f778541
splitted BLEScan::start to blocking & non-blocking oveloads
olehs Jun 17, 2018
eead14a
Add remove service
chegewara Jun 19, 2018
21ba4a8
- Added way to remove services.
jim-ber Jun 20, 2018
07c4b82
- Updated comments for documentation.
jim-ber Jun 21, 2018
de9d413
Add Arduino compatibility to BLEDevice::init
me-no-dev Jun 21, 2018
798be6b
Merge pull request #576 from me-no-dev/master
nkolban Jun 21, 2018
c054b18
Merge pull request #567 from olehs/patch-scan
nkolban Jun 22, 2018
d875fec
Merge pull request #575 from jim-ber/master
nkolban Jun 22, 2018
4743dfc
Addition of missing header for Arduino
nkolban Jun 23, 2018
7e1cf23
added a way to connect to a Station while keeping the AP running
damonsmith Jun 26, 2018
18a03f9
fixed to just use default value params
damonsmith Jun 26, 2018
cc56443
fix up comments on connectAP
damonsmith Jun 26, 2018
8dbdaa5
added getServiceByUUID() to BLEServer
Donderda Jun 26, 2018
faf2839
Merge pull request #582 from damonsmith/master
nkolban Jun 26, 2018
d6ef149
FIX: BLESecurity.h -> BLESecurityCallbacks.
joaoc Jul 5, 2018
74b056f
Handle `response` argument for BLERemoteDescriptor#writeValue()
robertklep Jul 6, 2018
14cdfb6
Merge remote-tracking branch 'origin'
chegewara Jul 10, 2018
caa546a
Update remote characteristic to register for notify/indications (writ…
chegewara Jul 10, 2018
49d6aba
Add onConnect callback with parameter to allow retrieve client MAC
chegewara Jul 10, 2018
1012efc
Add read raw data from remote characteristic
chegewara Jul 10, 2018
cf45586
Merge pull request #601 from chegewara/master
nkolban Jul 10, 2018
c224f3c
Merge pull request #595 from robertklep/remote-ble-descriptor-fix
nkolban Jul 10, 2018
8980fb1
Merge pull request #594 from joaoc/master
nkolban Jul 10, 2018
8cf6891
Quick fix
chegewara Jul 10, 2018
11125da
Merge pull request #602 from chegewara/master
nkolban Jul 10, 2018
db78095
Sync
nkolban Aug 6, 2018
f50bcb0
sync
nkolban Aug 6, 2018
35c8cb7
Merge pull request #1 from nkolban/master
Donderda Aug 7, 2018
5f0a168
fixes #447
Donderda Aug 7, 2018
d04db84
Merge pull request #622 from Donderda/feature_eddystone
nkolban Aug 7, 2018
b1922a8
Initial samples for VSCode
nkolban Aug 16, 2018
2c8b0f2
Merge branch 'master' of https://github.com/nkolban/esp32-snippets.git
nkolban Aug 16, 2018
ed1de4b
Addition of GCP JWT sample
nkolban Aug 26, 2018
1d976d2
Create pcf8523
menesesleonardo Aug 29, 2018
297db2c
Merge pull request #635 from menesesleonardo/patch-1
nkolban Aug 29, 2018
f8d3438
Fix params passed to i2c.init() to include DEVICE_ADDRESS in the firs…
SolipsistD Sep 3, 2018
2b7d590
Merge pull request #640 from SolipsistD/i2c-tests
nkolban Sep 3, 2018
b0503a6
add multiple servers support
chegewara Sep 5, 2018
fc0a957
I2C: fix ignored clockSpeed
toxuin Sep 15, 2018
de865db
Fix a bug in U8G2 HAL SPI initialize
aodzip Sep 23, 2018
83ca169
Update GeneralUtils.cpp
hetlelid Sep 26, 2018
5ce0c50
update BLECharacteristic.h to include `getData` call
pvtmert Sep 27, 2018
7e64a01
update BLECharacteristic.cpp to proxy `getData` function
pvtmert Sep 27, 2018
dcd7492
Merge pull request #648 from toxuin/master
nkolban Sep 28, 2018
21a1850
Merge pull request #652 from aodzip/patch-1
nkolban Sep 28, 2018
f61031c
Merge pull request #657 from hetlelid/patch-2
nkolban Sep 28, 2018
e2d9976
Merge pull request #658 from pvtmert/patch-1
nkolban Sep 28, 2018
cc85e03
Added switch case to fix compilation
toxuin Oct 1, 2018
db2ce46
Merge pull request #665 from toxuin/master
nkolban Oct 1, 2018
2147b7c
Merge branch 'master' of https://github.com/nkolban/esp32-snippets
chegewara Oct 1, 2018
bb251b7
move m_advertising to BLEDevice
chegewara Oct 1, 2018
e827bd9
Merge pull request #667 from chegewara/master
nkolban Oct 1, 2018
b5ab56a
Revert "Move m_advertising to BLEDevice"
chegewara Oct 1, 2018
ade8bcd
Merge pull request #668 from chegewara/revert-667-master
nkolban Oct 1, 2018
874ce79
move m_bleAdvertising to BLEDevice
chegewara Oct 1, 2018
ae9c8a0
Merge pull request #670 from chegewara/wip
nkolban Oct 2, 2018
482f7b4
some small bugfixes
chegewara Oct 2, 2018
a916fba
Merge pull request #671 from chegewara/bugfix
nkolban Oct 2, 2018
b1ef951
fix macOS compatibility
chegewara Oct 3, 2018
bac1b24
fix macOS HID compatibility
chegewara Oct 3, 2018
8f106d7
Merge pull request #672 from chegewara/multi_connect
nkolban Oct 10, 2018
b17e346
Common code style
toxuin Oct 14, 2018
5501cf6
Sanitize Neopixel logging
toxuin Oct 14, 2018
466332c
BT: uint16_t numHandles
toxuin Oct 14, 2018
814c324
FreeRTOS: Check if value is pdTRUE
toxuin Oct 14, 2018
a3b7fe3
Return bool from Ringbuffer::send
toxuin Oct 14, 2018
409a178
FreeRTOS: Stack size is uint32_t
toxuin Oct 14, 2018
009d003
GPIO: Add checks for bool returns
toxuin Oct 14, 2018
18e77c7
I2C: Configurable pullups
toxuin Oct 14, 2018
7843ceb
Memory.cpp: variable size fixes
toxuin Oct 14, 2018
e048557
PubSub: pass pdTRUE instead of true
toxuin Oct 14, 2018
db61e20
Fixed ternary operator spacing
toxuin Oct 14, 2018
61bb6ed
PWM: idle level is bool
toxuin Oct 14, 2018
871a946
WebSocket: Opcodes are uint8_t
toxuin Oct 14, 2018
e215f9d
PCF8574 & PCF8575: i2c on heap
toxuin Oct 14, 2018
bd24fab
Release memory from CLASSIC_BT when not enabled
toxuin Oct 14, 2018
d1127a6
Merge pull request #686 from toxuin/neopixel-logging
nkolban Oct 14, 2018
4e0fc44
Merge pull request #687 from toxuin/num-handles
nkolban Oct 14, 2018
d554704
Merge pull request #688 from toxuin/freertos-checks
nkolban Oct 14, 2018
ec342a3
Merge pull request #689 from toxuin/freertos-ringbuffer-check
nkolban Oct 14, 2018
d9a31c2
Merge pull request #690 from toxuin/freertos-stack-unsigned
nkolban Oct 14, 2018
51e943f
Merge pull request #692 from toxuin/gpio-check
nkolban Oct 14, 2018
3067f78
Merge pull request #693 from toxuin/i2c-pullup
nkolban Oct 14, 2018
6836550
Merge pull request #694 from toxuin/memory-varsizes
nkolban Oct 14, 2018
def0952
Merge pull request #695 from toxuin/pubsub-args
nkolban Oct 14, 2018
25e694e
Merge pull request #696 from toxuin/bt-classic-release
nkolban Oct 14, 2018
9d2d2ed
Merge pull request #697 from toxuin/pwm-idleLevel
nkolban Oct 14, 2018
e4ce7da
Merge pull request #698 from toxuin/websocket-types
nkolban Oct 15, 2018
f8d6a65
Merge pull request #699 from toxuin/PCF8574-i2c
nkolban Oct 15, 2018
b367e5a
Merge branch 'master' into code-cleanup
toxuin Oct 15, 2018
b50dec3
Fix array dereferencing
toxuin Oct 15, 2018
2dcd6aa
Fix HttpResponse line mangling
toxuin Oct 15, 2018
4cfef4d
Change return type of bitSize() to uint8_t
toxuin Oct 15, 2018
d14071a
Fix line mangling on merge
toxuin Oct 15, 2018
a338ca1
Merge pull request #691 from toxuin/code-cleanup
nkolban Oct 15, 2018
5a97e68
added getServiceCount() to BLEServer.cpp
Donderda Oct 15, 2018
6a8c821
improved getServiceCount()
Donderda Oct 15, 2018
693e2c9
improved BLEServer::getServiceCount() and added parameter for optiona…
Donderda Oct 17, 2018
96f76c0
fixed some issues
Donderda Oct 17, 2018
e742546
Merge pull request #700 from Donderda/master
nkolban Oct 17, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions Documentation/ideas/FastFlash/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# FastFlash
As we build ESP32 applications, we typically perform a compile, flash, test loop cycle. We compile an app, we flash the ESP32 with that app and then we test whether it works. We perform these actions over and over again. When we look at the time taken in each step, we see there is compile time on our PC and then the time taken to flash the PC. This story talks about the time taken to flash the PC.

The ESP32 is typically configured to flash at 115200 kbps. This is 115200 bits per second. If we think that a typical ESP32 application is 800KBytes then this requires a transmission of:

800000 * 9 = 7.2 million bits = 62.5 seconds

we can increase our baud rate up to 921600 = 7.8 seconds
4 changes: 4 additions & 0 deletions VisualStudioCode/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
These are file for Microsoft Visual Studio Code and can be copied into your `.vscode` project folder. For more information on this area, see:

* [VSCode JTAG Debugging of ESP32 - Part 2](https://gojimmypi.blogspot.com/2017/05/vscode-remote-jtag-debugging-of-esp32.html)
* [Deous/VSC-Guide-for-esp32](https://github.com/Deous/VSC-Guide-for-esp32)
266 changes: 266 additions & 0 deletions VisualStudioCode/c_cpp_properties.json

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions VisualStudioCode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"version": "0.2.0",
"configurations": [

{
"name": "ESP32 OpenOCD launch",
"type": "cppdbg",
"request": "launch",
"program": "./build/app-template.elf",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"text": "target remote localhost:3333"
},
{
"text": "monitor reset halt"
},
{
"text": "flushregs"
},
{
"text": "thb app_main"
}
],
"logging": {
"trace": true,
"traceResponse": true,
"engineLogging": true
}
}
]
}
2 changes: 2 additions & 0 deletions VisualStudioCode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
41 changes: 41 additions & 0 deletions VisualStudioCode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "menuconfig",
"type": "shell",
"command": "make menuconfig",
"problemMatcher": []
},
{
"label": "make",
"type": "shell",
"command": "make -j5",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
"label": "flash",
"type": "shell",
"command": "make flash monitor",
"problemMatcher": []
},
{
"label": "monitor",
"type": "shell",
"command": "make monitor",
"problemMatcher": []
},
{
"label": "clean",
"type": "shell",
"command": "make clean",
"problemMatcher": []
}
]
}
136 changes: 136 additions & 0 deletions cloud/GCP/JWT/base64url.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
// https://raw.githubusercontent.com/zhicheng/base64/master/base64.c
/* This is a public domain base64 implementation written by WEI Zhicheng. */

#include <stdio.h>

#include "base64url.h"

/* BASE 64 encode table */
static const char base64en[] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
'w', 'x', 'y', 'z', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9', '-', '_',
};

#define BASE64_PAD '='


#define BASE64DE_FIRST '+'
#define BASE64DE_LAST 'z'
/* ASCII order for BASE 64 decode, -1 in unused character */
static const signed char base64de[] = {
/* '+', ',', '-', '.', '/', '0', '1', '2', */
62, -1, -1, -1, 63, 52, 53, 54,

/* '3', '4', '5', '6', '7', '8', '9', ':', */
55, 56, 57, 58, 59, 60, 61, -1,

/* ';', '<', '=', '>', '?', '@', 'A', 'B', */
-1, -1, -1, -1, -1, -1, 0, 1,

/* 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', */
2, 3, 4, 5, 6, 7, 8, 9,

/* 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', */
10, 11, 12, 13, 14, 15, 16, 17,

/* 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', */
18, 19, 20, 21, 22, 23, 24, 25,

/* '[', '\', ']', '^', '_', '`', 'a', 'b', */
-1, -1, -1, -1, -1, -1, 26, 27,

/* 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', */
28, 29, 30, 31, 32, 33, 34, 35,

/* 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', */
36, 37, 38, 39, 40, 41, 42, 43,

/* 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', */
44, 45, 46, 47, 48, 49, 50, 51,
};

int base64url_encode(const unsigned char *in, unsigned int inlen, char *out)
{
unsigned int i, j;

for (i = j = 0; i < inlen; i++) {
int s = i % 3; /* from 6/gcd(6, 8) */

switch (s) {
case 0:
out[j++] = base64en[(in[i] >> 2) & 0x3F];
continue;
case 1:
out[j++] = base64en[((in[i-1] & 0x3) << 4) + ((in[i] >> 4) & 0xF)];
continue;
case 2:
out[j++] = base64en[((in[i-1] & 0xF) << 2) + ((in[i] >> 6) & 0x3)];
out[j++] = base64en[in[i] & 0x3F];
}
}

/* move back */
i -= 1;

/* check the last and add padding */

if ((i % 3) == 0) {
out[j++] = base64en[(in[i] & 0x3) << 4];
//out[j++] = BASE64_PAD;
//out[j++] = BASE64_PAD;
} else if ((i % 3) == 1) {
out[j++] = base64en[(in[i] & 0xF) << 2];
//out[j++] = BASE64_PAD;
}

out[j++] = 0;

return BASE64_OK;
}

int base64url_decode(const char *in, unsigned int inlen, unsigned char *out)
{
unsigned int i, j;

for (i = j = 0; i < inlen; i++) {
int c;
int s = i % 4; /* from 8/gcd(6, 8) */

if (in[i] == '=')
return BASE64_OK;

if (in[i] < BASE64DE_FIRST || in[i] > BASE64DE_LAST ||
(c = base64de[in[i] - BASE64DE_FIRST]) == -1)
return BASE64_INVALID;

switch (s) {
case 0:
out[j] = ((unsigned int)c << 2) & 0xFF;
continue;
case 1:
out[j++] += ((unsigned int)c >> 4) & 0x3;

/* if not last char with padding */
if (i < (inlen - 3) || in[inlen - 2] != '=')
out[j] = ((unsigned int)c & 0xF) << 4;
continue;
case 2:
out[j++] += ((unsigned int)c >> 2) & 0xF;

/* if not last char with padding */
if (i < (inlen - 2) || in[inlen - 1] != '=')
out[j] = ((unsigned int)c & 0x3) << 6;
continue;
case 3:
out[j++] += (unsigned char)c;
}
}

return BASE64_OK;
}
15 changes: 15 additions & 0 deletions cloud/GCP/JWT/base64url.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// https://raw.githubusercontent.com/zhicheng/base64/master/base64.h
#ifndef __BASE64URL_H__
#define __BASE64URL_H__

enum {BASE64_OK = 0, BASE64_INVALID};

#define BASE64_ENCODE_OUT_SIZE(s) (((s) + 2) / 3 * 4)
#define BASE64_DECODE_OUT_SIZE(s) (((s)) / 4 * 3)

int base64url_encode(const unsigned char *in, unsigned int inlen, char *out);

int base64url_decode(const char *in, unsigned int inlen, unsigned char *out);


#endif /* __BASE64URL_H__ */
Loading
0