Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e029f27

Browse files
committed
connection interval update
1 parent 753395f commit e029f27

File tree

29 files changed

+760
-1
lines changed

29 files changed

+760
-1
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
CHANGELOG
22

3+
v 2.0.2
4+
- Added connection interval update support
5+
- Added missing copyright notices to sketches
6+
37
v 2.0.1
48
- RFduinoGZLL enhancement for channel selection policy
59
- allow build.bat "run as administrator"

libraries/RFduinoBLE/RFduinoBLE.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,14 @@ bool RFduinoBLEClass::sendFloat(float data)
114114
return RFduinoBLE_send((char*)&data, sizeof(float));
115115
}
116116

117+
void RFduinoBLEClass::updateConnInterval(int min_conn_interval_ms, int max_conn_interval_ms)
118+
{
119+
RFduinoBLE_update_conn_interval(min_conn_interval_ms, max_conn_interval_ms);
120+
}
121+
122+
int RFduinoBLEClass::getConnInterval(void)
123+
{
124+
return RFduinoBLE_get_conn_interval();
125+
}
126+
117127
RFduinoBLEClass RFduinoBLE;

libraries/RFduinoBLE/RFduinoBLE.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ class RFduinoBLEClass
7373
bool sendByte(uint8_t data);
7474
bool sendInt(int data);
7575
bool sendFloat(float data);
76+
77+
// request central role use a different connection interval in the given range
78+
// the central role may reject the request (or even pick a value outside the range)
79+
void updateConnInterval(int min_conn_interval_ms, int max_conn_interval_ms);
80+
81+
int getConnInterval(void);
7682
};
7783

7884
extern RFduinoBLEClass RFduinoBLE;

libraries/RFduinoBLE/examples/AdvertisementContinuous/AdvertisementContinuous.ino

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,32 @@ The sketch demonstrates how to do continuous Bluetooth Low Energy 4
33
Advertisement with the RFduino.
44
*/
55

6+
/*
7+
Copyright (c) 2014 OpenSourceRF.com. All right reserved.
8+
9+
This library is free software; you can redistribute it and/or
10+
modify it under the terms of the GNU Lesser General Public
11+
License as published by the Free Software Foundation; either
12+
version 2.1 of the License, or (at your option) any later version.
13+
14+
This library is distributed in the hope that it will be useful,
15+
but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17+
See the GNU Lesser General Public License for more details.
18+
19+
You should have received a copy of the GNU Lesser General Public
20+
License along with this library; if not, write to the Free Software
21+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22+
23+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
26+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
27+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
28+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
29+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30+
*/
31+
632
#include <RFduinoBLE.h>
733

834
// pin 3 on the RGB shield is the green led

libraries/RFduinoBLE/examples/AdvertisementInterval/AdvertisementInterval.ino

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,32 @@ Advertisement transmission interval.
55
Faster iterval = higher power consumption = lower connection latency
66
*/
77

8+
/*
9+
Copyright (c) 2014 OpenSourceRF.com. All right reserved.
10+
11+
This library is free software; you can redistribute it and/or
12+
modify it under the terms of the GNU Lesser General Public
13+
License as published by the Free Software Foundation; either
14+
version 2.1 of the License, or (at your option) any later version.
15+
16+
This library is distributed in the hope that it will be useful,
17+
but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19+
See the GNU Lesser General Public License for more details.
20+
21+
You should have received a copy of the GNU Lesser General Public
22+
License along with this library; if not, write to the Free Software
23+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24+
25+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32+
*/
33+
834
#include <RFduinoBLE.h>
935

1036
// pin 3 on the RGB shield is the green led

libraries/RFduinoBLE/examples/AdvertisementPeriodic/AdvertisementPeriodic.ino

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,32 @@ can be woken up by pressing Button 1, at which time the device will
77
advertise again.
88
*/
99

10+
/*
11+
Copyright (c) 2014 OpenSourceRF.com. All right reserved.
12+
13+
This library is free software; you can redistribute it and/or
14+
modify it under the terms of the GNU Lesser General Public
15+
License as published by the Free Software Foundation; either
16+
version 2.1 of the License, or (at your option) any later version.
17+
18+
This library is distributed in the hope that it will be useful,
19+
but WITHOUT ANY WARRANTY; without even the implied warranty of
20+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21+
See the GNU Lesser General Public License for more details.
22+
23+
You should have received a copy of the GNU Lesser General Public
24+
License along with this library; if not, write to the Free Software
25+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26+
27+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
30+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
31+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
32+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
33+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34+
*/
35+
1036
#include <RFduinoBLE.h>
1137

1238
// pin 3 on the RGB shield is the green led

libraries/RFduinoBLE/examples/AdvertisementRaw/AdvertisementRaw.ino

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,32 @@ packet. This is for advanced use only, as the RFduino will not advertise is the
66
is invalid.
77
*/
88

9+
/*
10+
Copyright (c) 2014 OpenSourceRF.com. All right reserved.
11+
12+
This library is free software; you can redistribute it and/or
13+
modify it under the terms of the GNU Lesser General Public
14+
License as published by the Free Software Foundation; either
15+
version 2.1 of the License, or (at your option) any later version.
16+
17+
This library is distributed in the hope that it will be useful,
18+
but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20+
See the GNU Lesser General Public License for more details.
21+
22+
You should have received a copy of the GNU Lesser General Public
23+
License along with this library; if not, write to the Free Software
24+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25+
26+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33+
*/
34+
935
#include <RFduinoBLE.h>
1036

1137
// the advertisement packet is composed of a series of variable length blocks, that can appear in any order.

libraries/RFduinoBLE/examples/AdvertisementRawMaxDeviceName/AdvertisementRawMaxDeviceName.ino

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,32 @@ packet. This is for advanced use only, as the RFduino will not advertise is the
66
is invalid.
77
*/
88

9+
/*
10+
Copyright (c) 2014 OpenSourceRF.com. All right reserved.
11+
12+
This library is free software; you can redistribute it and/or
13+
modify it under the terms of the GNU Lesser General Public
14+
License as published by the Free Software Foundation; either
15+
version 2.1 of the License, or (at your option) any later version.
16+
17+
This library is distributed in the hope that it will be useful,
18+
but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20+
See the GNU Lesser General Public License for more details.
21+
22+
You should have received a copy of the GNU Lesser General Public
23+
License along with this library; if not, write to the Free Software
24+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25+
26+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33+
*/
34+
935
#include <RFduinoBLE.h>
1036

1137
// the advertisement packet is composed of a series of variable length blocks, that can appear in any order.

libraries/RFduinoBLE/examples/AdvertisementRawScanResponse/AdvertisementRawScanResponse.ino

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,32 @@ RFduino's that advertise using the previous fixed RFduino
2222
UUID.
2323
*/
2424

25+
/*
26+
Copyright (c) 2014 OpenSourceRF.com. All right reserved.
27+
28+
This library is free software; you can redistribute it and/or
29+
modify it under the terms of the GNU Lesser General Public
30+
License as published by the Free Software Foundation; either
31+
version 2.1 of the License, or (at your option) any later version.
32+
33+
This library is distributed in the hope that it will be useful,
34+
but WITHOUT ANY WARRANTY; without even the implied warranty of
35+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
36+
See the GNU Lesser General Public License for more details.
37+
38+
You should have received a copy of the GNU Lesser General Public
39+
License along with this library; if not, write to the Free Software
40+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
41+
42+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
43+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49+
*/
50+
2551
#include <RFduinoBLE.h>
2652

2753
// the advertisement packet is composed of a series of variable length blocks, that can appear in any order.

libraries/RFduinoBLE/examples/AdvertisementRawiBeacon/AdvertisementRawiBeacon.ino

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,32 @@ packet. This is for advanced use only, as the RFduino will not advertise is the
66
is invalid.
77
*/
88

9+
/*
10+
Copyright (c) 2014 OpenSourceRF.com. All right reserved.
11+
12+
This library is free software; you can redistribute it and/or
13+
modify it under the terms of the GNU Lesser General Public
14+
License as published by the Free Software Foundation; either
15+
version 2.1 of the License, or (at your option) any later version.
16+
17+
This library is distributed in the hope that it will be useful,
18+
but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20+
See the GNU Lesser General Public License for more details.
21+
22+
You should have received a copy of the GNU Lesser General Public
23+
License along with this library; if not, write to the Free Software
24+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25+
26+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33+
*/
34+
935
#include <RFduinoBLE.h>
1036

1137
// the advertisement packet is composed of a series of variable length blocks, that can appear in any order.

0 commit comments

Comments
 (0)