Wenn ich beim Puck.js einen BLE Scan durchführe kann dieser kein Advertising ausführen, zumindest scheint dann irgendwas beim Advertisen kaputt zu sein....
Versuchsaufbau
Welches Intervall ist sinnvoll?
Wie kann ich die Daten empfangen?
Ist ein Zeitsptempel möglich/nötig?
Wie ist der Umgang mit veralteten Werten?
Ist es nötig alte Werte zu erkennen?
PUCK.js
Umsetzung der Nebenläufigkeit
Codierung der Daten (RSSI -> ID)
Kann ich ein konstantes Advertising ermögliches?
BLE 4.1 ist BLE 5.0 möglich?
Gibt es einschränkungen aufgrund von BLE 4.1?
Veraltete Werte
Eine möglichkeit wäre es, einen Counter zu verwenden der mit übermittelt wird. So das man beim Empfang sehen kann wie oft der gleiche Wert nicht aktualisiert wurde.... Der Counter 0 bedeutet dann das keine aktuellen Werte vorliegen....
Advertising Intervall
Note: Non-connectable advertising can't have an advertising interval less than 100ms according to the BLE spec.
# Problem Nebenläufigkeit
Wenn ich beim Puck.js einen BLE Scan durchführe kann dieser kein Advertising ausführen, zumindest scheint dann irgendwas beim Advertisen kaputt zu sein....
# Versuchsaufbau
- [ ] Welches Intervall ist sinnvoll?
- [ ] Wie kann ich die Daten empfangen?
- [ ] Ist ein Zeitsptempel möglich/nötig?
- [ ] Wie ist der Umgang mit veralteten Werten?
- [ ] Ist es nötig alte Werte zu erkennen?
# PUCK.js
- [ ] Umsetzung der Nebenläufigkeit
- [ ] Codierung der Daten (RSSI -> ID)
- [ ] Kann ich ein konstantes Advertising ermögliches?
- [ ] BLE 4.1 ist BLE 5.0 möglich?
- [ ] Gibt es einschränkungen aufgrund von BLE 4.1?
## Veraltete Werte
Eine möglichkeit wäre es, einen Counter zu verwenden der mit übermittelt wird. So das man beim Empfang sehen kann wie oft der gleiche Wert nicht aktualisiert wurde.... Der Counter 0 bedeutet dann das keine aktuellen Werte vorliegen....
## Advertising Intervall
**Note:** Non-connectable advertising can't have an advertising interval less than 100ms according to the BLE spec.
https://www.bluetooth.com/de/bluetooth-resources/intro-to-bluetooth-advertisements/
Advertising intervall limitiert auf 20ms
kreativmonkey
changed title from Limitations to Bluetooth3 years ago
kreativmonkey
added this to the Daten Erfassen milestone 3 years ago
kreativmonkey
modified the milestone from Daten Erfassen to Android App Entwicklung3 years ago
kreativmonkey
modified the milestone from Android App Entwicklung to Daten Erfassen3 years ago
interval - The connection interval to use (see below)
Description
When connected, Bluetooth LE devices communicate at a set interval. Lowering the interval (eg. more packets/second) means a lower delay when sending data, higher bandwidth, but also more power consumption.
By default, when connected as a peripheral Espruino automatically adjusts the connection interval. When connected it's as fast as possible (7.5ms) but when idle for over a minute it drops to 200ms. On continued activity (>1 BLE operation) the interval is raised to 7.5ms again.
100 : set min and max connection interval to the same number (between 7.5ms and 4000ms)
{minInterval:20, maxInterval:100} : set min and max connection interval as a range
This configuration is not remembered during a save() - you will have to re-set it via onInit.
Note: If connecting to another device (as Central), you can use an extra argument to NRF.connect or BluetoothRemoteGATTServer.connect to specify a connection interval.
Note: This overwrites any changes imposed by the deprecated NRF.setLowPowerConnection
Note: This is only available in NRF52 devices (like Puck.js, Pixl.js, Bangle.js and MDBT42Q)
# NRF.setConnectionInterval
## Call type:
``NRF.setConnectionInterval(interval)``
## Parameters
``interval`` - The connection interval to use (see below)
## Description
When connected, Bluetooth LE devices communicate at a set interval. Lowering the interval (eg. more packets/second) means a lower delay when sending data, higher bandwidth, but also more power consumption.
By default, when connected as a peripheral Espruino automatically adjusts the connection interval. When connected it's as fast as possible (7.5ms) but when idle for over a minute it drops to 200ms. On continued activity (>1 BLE operation) the interval is raised to 7.5ms again.
The options for interval are:
- ``undefined`` / ``"auto"`` : (default) automatically adjust connection interval
- ``100`` : set min and max connection interval to the same number (between 7.5ms and 4000ms)
- ``{minInterval:20, maxInterval:100}`` : set min and max connection interval as a range
This configuration is not remembered during a ``save()`` - you will have to re-set it via ``onInit``.
**Note:** If connecting to another device (as Central), you can use an extra argument to ``NRF.connect`` or ``BluetoothRemoteGATTServer.connect`` to specify a connection interval.
**Note:** This overwrites any changes imposed by the deprecated ``NRF.setLowPowerConnection``
**Note:** This is only available in NRF52 devices (like Puck.js, Pixl.js, Bangle.js and MDBT42Q)
You can set the fixed interval from 20ms to 10.24 seconds, in steps of 0.625ms. The random delay is a pseudo-random value from 0ms to 10ms that is automatically added. This randomness helps reduce the possibility of collisions between advertisements of different devices (if they fell in the same rate, they could interfere more easily). We mentioned that finding advertisements is critical, so avoiding collisions at all costs is extremely important. This is just another way BLE uses to improve robustness.
You can set the fixed interval from 20ms to 10.24 seconds, in steps of 0.625ms. The random delay is a pseudo-random value from 0ms to 10ms that is automatically added. This randomness helps reduce the possibility of collisions between advertisements of different devices (if they fell in the same rate, they could interfere more easily). We mentioned that finding advertisements is critical, so avoiding collisions at all costs is extremely important. This is just another way BLE uses to improve robustness.
Problem Nebenläufigkeit
Wenn ich beim Puck.js einen BLE Scan durchführe kann dieser kein Advertising ausführen, zumindest scheint dann irgendwas beim Advertisen kaputt zu sein....
Versuchsaufbau
PUCK.js
Veraltete Werte
Eine möglichkeit wäre es, einen Counter zu verwenden der mit übermittelt wird. So das man beim Empfang sehen kann wie oft der gleiche Wert nicht aktualisiert wurde.... Der Counter 0 bedeutet dann das keine aktuellen Werte vorliegen....
Advertising Intervall
Note: Non-connectable advertising can't have an advertising interval less than 100ms according to the BLE spec.
https://www.bluetooth.com/de/bluetooth-resources/intro-to-bluetooth-advertisements/
Advertising intervall limitiert auf 20ms
Limitationsto Bluetooth 3 years agoNRF.setConnectionInterval
Call type:
NRF.setConnectionInterval(interval)
Parameters
interval
- The connection interval to use (see below)Description
When connected, Bluetooth LE devices communicate at a set interval. Lowering the interval (eg. more packets/second) means a lower delay when sending data, higher bandwidth, but also more power consumption.
By default, when connected as a peripheral Espruino automatically adjusts the connection interval. When connected it's as fast as possible (7.5ms) but when idle for over a minute it drops to 200ms. On continued activity (>1 BLE operation) the interval is raised to 7.5ms again.
The options for interval are:
undefined
/"auto"
: (default) automatically adjust connection interval100
: set min and max connection interval to the same number (between 7.5ms and 4000ms){minInterval:20, maxInterval:100}
: set min and max connection interval as a rangeThis configuration is not remembered during a
save()
- you will have to re-set it viaonInit
.Note: If connecting to another device (as Central), you can use an extra argument to
NRF.connect
orBluetoothRemoteGATTServer.connect
to specify a connection interval.Note: This overwrites any changes imposed by the deprecated
NRF.setLowPowerConnection
Note: This is only available in NRF52 devices (like Puck.js, Pixl.js, Bangle.js and MDBT42Q)
You can set the fixed interval from 20ms to 10.24 seconds, in steps of 0.625ms. The random delay is a pseudo-random value from 0ms to 10ms that is automatically added. This randomness helps reduce the possibility of collisions between advertisements of different devices (if they fell in the same rate, they could interfere more easily). We mentioned that finding advertisements is critical, so avoiding collisions at all costs is extremely important. This is just another way BLE uses to improve robustness.