Good afternoon, @dashcraft! Could you point me to where you're seeing that 31-character limit in btutils? The limit should be 16 bytes of data, not 31 characters.
BLE UUIDs should all be 128-bit values. The values in improv.h
that you linked above look proper to me: 32 hex characters (128 bits) separated by hyphens should be fine.
It's possible i'm using the wrong characteristics payload, completeUUID16List and serviceDataUUID16 is what i'm currently looking at in advertising data params.
Here is the location of the default.
gap.MAX_AD_LENGTH
https://github.com/Moddable-OpenSource/moddable/blob/e9742b49d5132f2723d3a5fca45b65cf3818d01a/modules/network/ble/gap.js#L98
https://github.com/Moddable-OpenSource/moddable/blob/1502614759bbee368833c600222406b1808fb972/modules/network/ble/btutils.js#L441
accelerometer.json
in that project:{
"service": {
"uuid": "F000AA10-0451-4000-B000-000000000000",
"characteristics": {
"data": {
"uuid": "F000AA11-0451-4000-B000-000000000000",
"type": "Int8Array"
},
"configuration": {
"uuid": "F000AA12-0451-4000-B000-000000000000",
"type": "Uint8"
},
"period": {
"uuid": "F000AA13-0451-4000-B000-000000000000",
"type": "Uint8"
}
}
}
}
I was having issues with the esp32 wroom s2's and memory. Using another service i couldn't run wifi, ble and also load a ssl cert, it would run out of memory.
basically this issue: espressif/arduino-esp32#4523
I was hoping i could find a configuration in moddable to avoid this issue whenever i enabled ble
const buffer = new ArrayBuffer(16);
const view = new DataView(buffer);
view.setInt8(1, 0x01);
return view.buffer
What was actually happening, was i had set the wrong value in the bleservices json file, and I naively was trying to do what it had already done. I've finally got a working example of implementing improv-wifi (esphomes/hassio's new 'standard' for ble onboarding)
This is going to be a pita to write tests for.
https://github.com/dashcraft/improv-wifi-mod
mddbl
or are you talking about copying the files into your project? I'm assuming the latter since you mentioned package manager. Hmmm, that's a really interesting idea. What I'd really like, in order for me to understand exactly what you mean, is if you'd walk me through the process you invision for this.
pip install improv-wifi-mod
or npm install express-moddable
copying the external files in their project folder; and possibly making the appropriate adjustment in manifest.json
?
When trying examples/pins/monitor/main.js an error occurs.
Projects/moddable/modules/pins/digital/monitor/esp/modMonitor.c (165) # Break: Monitor.prototype.rises: not configured!
In egde: there is only edge: Monitor.Falling
by adding edge: Monitor.Falling | Monitor.Rising
the error disappears.
'''
if (undefined != config.button1_pin) {
if (config.button1_port)
monitor1 = new Monitor({pin: config.button1_pin, port: config.button1_port, mode: Digital.InputPullUp, edge: Monitor.Falling | Monitor.Rising});
else
monitor1 = new Monitor({pin: config.button1_pin, mode: Digital.InputPullUp, edge: Monitor.Falling | Monitor.Rising});
monitor1.onChanged = function() {
trace(Button 1: state: ${this.read()}, changed ${this.rises + this.falls} times\n
);
}
}
'''
I have a timer sending some sensor readings, if i set the timer for 5 seconds, i'm getting this error Intermittently (once every 20-30 seconds):throw new Error("SSL: alert: " + session.alert.level + ", " + session.alert.description);
If i set the timer to 7 seconds or more, this error does not occur.