fanoush
f4398ce28c
remove duplicated code from NRF.nfcXXXX methods
...
- move common code from jswrap_nfc_raw into nfc_raw_data_start and reuse it in all NRF.nfc methods
- also avoid creating one extra flat string copy of the payload
2023-08-29 00:13:21 +02:00
fanoush
126714286c
allow NDEF records with length over 254 bytes
...
- use 3 byte length in NDEF TLV block when over 254 bytes
- store 16bit url payload length
-add maximum lenght checking (type 2 tag data is up to 992 bytes)
2023-08-25 22:34:41 +02:00
Gordon Williams
704daa5214
Merge pull request #2400 from ssievert42/ble_resolve_address
...
ble: add method to resolve random addresses
2023-08-15 14:53:53 +01:00
Simon Sievert
ea5f55fe00
ble: if mitm is set, reject unauthenticated security procedures
...
Setting mitm also causes the UART to require a connection that is mitm protected.
2023-08-15 13:43:26 +02:00
Simon Sievert
f2446ac6f8
ble: add method to resolve random addresses
...
This adds a method NRF.resolveAddress(), that allows resolving a "random private resolvable address" of a bonded peer to that peer's actual address.
2023-08-14 19:53:03 +02:00
Gordon Williams
d69b5223a9
We now get local time info, and have promises: NRF.ctsGetTime().then(print)
2023-07-14 16:28:18 +01:00
Gordon Williams
802a3001f3
nRF52: Added CTS (Current Time Service) support to ANCS/AMS code
2023-07-14 16:27:28 +01:00
Gordon Williams
4637bb5959
Added NRF.eraseBonds() to allow peer manager info to be removed (other than by holding all buttons down)
2023-07-05 13:44:12 +01:00
Gordon Williams
80eb114f4a
Merge branch 'master' into f-SD6.1-advertising
2023-05-10 15:14:43 +01:00
fanoush
a6c41185c1
for SD>5 use static buffers for advertising and scan response data
...
S140 6.1.x and up no longer makes its own copy of advertising data, provided buffers need to be valid all the time, also any change needs new set of buffers (otherwise it fails with NRF_ERROR_INVALID_STATE)
2023-05-10 14:35:45 +02:00
Gordon Williams
fd0963dcbc
nRF52: Add NRF.on('bond'/'advertising') events to keep track of BLE status more easily
2023-03-22 14:36:24 +00:00
Gordon Williams
9841d5401d
disable whenConnected for MICROBIT1 (too little free memory)
2023-03-13 11:39:25 +00:00
Gordon Williams
a37c24f682
nRF52: Add NRF.setAdvertising({},{whenConnected:true}) to allow advertisements to be sent while a connection is active
...
+ nRF52: Fix NRF.getSecurityStatus's 'advertising' field (only appeared when connected previously)
2023-03-13 11:30:38 +00:00
Gordon Williams
8ab39cbe42
ESP32: Bluetooth scanning now uses event queue (fixes MEMORY_BUSY)
2023-01-11 09:49:26 +00:00
Gordon Williams
6f26e2d677
Bangle.js: Improve ANCS stability - cancel ongoing tasks if an error is reported
2022-12-15 09:28:21 +00:00
Gordon Williams
fdee733788
Add ESPR_NO_PROMISES to allow promises to be left out of builds (specifically micro:bit 1). Adjust ifdefs so if no central mode, we're not including functionality we don't want
2022-10-28 13:55:22 +01:00
Gordon Williams
1e0bf95da6
Fixed build issues for bluetooth with no centrals (microbit1)
2022-10-28 11:31:11 +01:00
Gordon Williams
891029bfde
ESP32: Bluetooth LE tweaks - central mode connects, scans, reads, writes and notifies
...
Bluetooth: fix for incorrect Bluetooth task strings shown in some errors
Tried to move common code in jsble_exec_pending into jsble_exec_pending_common
2022-10-27 15:28:28 +01:00
Gordon Williams
950cf2ef91
More ESP32 bluetooth fixes - can now find services/characteristics and read/write. No Notify yet
2022-10-18 16:36:52 +01:00
Gordon Williams
bece571f8e
Bangle.js 2: Fix NRF.setAdvertising({},{scannable:false})
...
Bangle.js 2: Initial long range functionality (via `phy:"coded"` in `NRF.setAdvertising/setScan/requestDevice/findDevices`)
2022-07-20 17:13:18 +01:00
Gordon Williams
3f145f948a
nRF5x: Move advertising_start and restart_softdevice outside of IRQs (MEMORY_BUSY warnings less likely now)
2022-07-05 10:56:29 +01:00
Gordon Williams
b30d43030f
nRF52: Fix recent regression which stopped reconnection after a bluetooth disconnect ( fix #2226 )
2022-06-29 10:10:14 +01:00
Gordon Williams
e311f3db15
SDK15 support, show APP_RAM_BASE if not correct, docs
2022-06-16 12:22:15 +01:00
Gordon Williams
5c08b7c334
Initial support for multiple connections on nRF52
2022-06-15 16:54:08 +01:00
Gordon Williams
aaa91394df
Bangle.js2: Ensure NRF.setTxPower works for all connections and advertising
2022-03-08 10:29:50 +00:00
Gordon Williams
592626dc36
NRF.setScanResponse now works on SDK15
2022-02-09 16:30:39 +00:00
Gordon Williams
c5d1acd569
ANCS/AMS split fixes - seems to work fine now
2022-01-26 17:11:03 +00:00
Gordon Williams
23484e54b9
code to allow AMS/ANCS to be started independently. Currently untested
2022-01-26 17:06:30 +00:00
Gordon Williams
0e7b69e87b
fix startBonding from previous commit
2022-01-26 16:58:20 +00:00
Gordon Williams
d381be2bb2
Add NRF.startBonding to force bonding on peripheral connection
2022-01-26 16:58:09 +00:00
Gordon Williams
cd0fc6c133
Properly working AMS support
2021-10-18 21:04:33 +01:00
Gordon Williams
883f2db58e
Initial ANCS code to split up notifications, attributes, and app attributes
2021-10-18 21:03:31 +01:00
Gordon Williams
06a2202ebd
General space saving when trying to eek out the last few bytes
...
MICROBIT1: Remove hardware SPI to save space. Software SPI still works
2021-08-13 11:17:29 +01:00
Gordon Williams
147be42006
nRF52: 'BLE task in progress' messages now give a readable name, not a task numbe nRF52: BLE stack errors now reports a line number
...
nRF52: 'BLE task in progress' messages now give a readable name, not task numberr
2021-08-13 10:16:09 +01:00
Gordon Williams
5ee483ada5
Fix ESP32 bluetooth compile
2021-05-28 13:34:08 +01:00
Gordon Williams
e2823133e5
build regression fixes
2021-05-27 11:57:02 +01:00
Gordon Williams
1d1aadf2e8
syncing branches - pull across some minor changes
2021-05-25 12:04:09 +01:00
Gordon Williams
cff03201a0
fix stupid enum mistake that stopped ANCS from working
2021-05-25 11:52:57 +01:00
Gordon Williams
b5894621c0
Misc merge of Dickens changes to bring branches more in line
2021-05-13 12:26:41 +01:00
Gordon Williams
162d2224ac
ANCS actually working properly
2021-05-11 15:20:02 +01:00
Gordon Williams
ce73039916
Merge branch 'master' into ANCS
2021-05-10 15:37:22 +01:00
Gordon Williams
b794ce9c68
BLE: Allow 128-bit service data to be decoded ( fix #1976 )
2021-02-02 16:25:30 +00:00
Gordon Williams
7c4351ffc6
Add ANCS handling. Works to report notifications, but actual message text seems reported yet
2020-12-10 15:19:35 +00:00
Gordon Williams
542265bdb9
nRF5x: Add callback param to 'NRF.restart', allowing code to be called with softdevice disabled
2020-10-26 13:58:55 +00:00
Gordon Williams
9bb75a121b
Bangle.js: increase default advertising interval from 375 to 200ms to ease connections
2020-10-23 09:13:09 +01:00
Gordon Williams
2730f33988
Changes to make it easier to compile with unmodified newer SDKs - Nordic started messing with the usage of the NRF52 keyword in new SDKs and this should avoid having to patch them
2020-09-23 14:47:07 +01:00
Gordon Williams
41b497ef26
Bangle.js: Accelerometer poll handler now uses RTC app_timer, not TIMER1. 1mA->0.5mA standby current (ref #1920 )
2020-08-26 16:42:40 +01:00
Gordon Williams
22c5531354
nRF52: If passkey or oob is set in setSecurity, ensure that the UART connection requires encryption ( fix #1705 )
2020-05-13 13:52:51 +01:00
Gordon Williams
78c7cc109f
nRF52: fix issue where advertising flags could get out of sync after SD restart
2019-11-13 14:33:09 +00:00
Gordon Williams
defc5ba094
fix ESP32 build
2019-10-07 10:57:11 +01:00