natersoz / nrf Goto Github PK
View Code? Open in Web Editor NEWA Bluetoothe Low Energy (BLE) class library - initial target: Nordic nRF5x
License: Apache License 2.0
A Bluetoothe Low Energy (BLE) class library - initial target: Nordic nRF5x
License: Apache License 2.0
These classes are hardware independent and would benefit from unit tests.
Example: The classes timer_observer_generic
and timer_observable_generic
are nearly generic in that they contain no external dependencies. Nope, false: They have the number 6
scattered about for the cc_index_limit
which is Nordic specific.
This needs to be removed so that the interface is truly generic.
See this link:
https://devzone.nordicsemi.com/f/nordic-q-a/15908/nrf52-twi-excess-current-consumption/60684#60684
Errata 89 tells that this is an anomaly inside the chip. And the work around is given.
Just add below code when you want to disable TWI
For TWI0 for number 89 anomaly on nRF52
*(uint32_t *)(0x40003000 + 0xFFC ) = 0;
*(uint32_t *)(0x40003000 + 0xFFC ) = 1;
For TWI1 for number 89 anomaly on nRF52
*(uint32_t *)(0x40004000 + 0xFFC ) = 0;
*(uint32_t *)(0x40004000 + 0xFFC ) = 1;
This is would be nice to clean up.
Create an public functional interface which hides the internal container.
Class is in: gap_connection_state.cc.
Also include class ble::gap::connection::negotiation_state::completion_notify
The BLE observers for GAP, GATTC, and GATTS all must be wrapped in a Nordic wrapper in order to register. This is not necessary.
Move the intrusive list hook inside the GAP, GATTC, GATTS event observer interface.
The wrapping in Nordic will no longer be necessary.
After simplifying the segger RTT module, the remaining thing to do is provide the up/down buffers as allocations provided by the client and remove the idiodic #define
methods currently employed.
uint32_t volatile* rtc::cc_get_event()
uint32_t volatile* timer::cc_get_event() specific to Nordic
If possible, create a more generic interface if other silicon vendors provide this type of functionality.
Move test projects
Into top level directory system_tests
When transitioning into low power state, peripherals should follow a pattern.
There is no pattern - create one.
The implementation for discovering 128-bit UUIDs using the Nordic softdevice will work find
for single connection GATT clients. However, for multiple GATTC clients the stored struct uuid128_read_pending_t
instance will conflict.
The struct uuid128_read_pending_t instance needs to be included somewhere in the ble::gattc::connectable hierarchy so that there is one instance per connection.
See ble/nordic_ble_gattc_event_observable.cc
gattc_uuid128_acquire()
comments.
The temperature sensor will provide much more accurate readings if the factory calibration data is used.
Most (all?) of the Nordic peripherals' deinit() methods are poorly written and likely do not work.
Consider moving peripherals/ dir under nordic/ directory.
The tlv_encode functions and the ble::gap::advertising_data_t class need unit test coverage.
So that functionality is only implemented in once place, the service container, service and characteristic descriptor_list find() methods, which are non-const, should not duplicate the implementations of their const partners; but call the const version.
This has led to bugs which I do not yet understand.
Understand them, fix them and resolve this.
Either hack/fix boost::intrusive::list
to allow for a volatile hook or write a replacement.
Within the timer structure usage, this is not acceptable.
hooks are routinely linked/unlinked across interrupt boundaries.
ble_gap_connection::disconnect()
, Line 63 It would be expected that scanning would need to be restarted on Central disconnect. However, calling start() results in Nordic error 8: invalid state
.The GATT client observer is a work in progress.
Complete the implementation of the GATT client observer implemented using the Nordic softdevice S132.
The peer manager component from Nordic needs to be understood - perhaps modified.
Bonding support for the BLE peripheral class needs to be implemented
This only works on OSX.
__REV()
is not defined.-isystem
include rule does not work properly for gcc. It requires -I
As the error suggests, it means that the softdevice doesn't yet have a set of system attributes. :-)
I'd recommend you to read this document to better understand the concept of bonding with regard to our softdevice, since it also applies to the system attributes.
As you can see, bonding data is split between encryption keys and the system attributes. System attributes includes for example values for CCCDs, and the softdevice therefore needs to get those before sending any notification. Hence, when you try to send a notification, if the peer device have not yet written to the CCCDs, the softdevice will ask the application whether it has any previous bonding data to be used, by giving a BLE_GATTS_EVT_SYS_ATTR_MISSING. If the device does use bonding, the bond manager will normally handle this event, and pass back whatever data has previously been written.
However, the system attributes are requested with the same event no matter if the device use bonding or not (the softdevice doesn't really know that). If a device does not use bonding, but in this case, you can just reply like this:
This is probably related to the Nordic errata:
* Errata nRF52832 Rev2, v1.0 3.44 [173]
* GPIO: Writes to LATCH register take several CPU cycles to take effect
* Conditions: Reading the LATCH register right after writing to it.
* Consequences: Old value of the LATCH register is read.
* Workaround: Have at least 3 CPU cycles of delay between the write
* and the subsequent read to the LATCH register.
* This can be achieved by having 3 dummy reads to the
* LATCH register.
The LATCH set of bits contains the bit from the previous interrupt.
This will allow the client to stream multiple packets without gaps in the SPI clock.
This will provide a method for streaming large packets (>255 bytes) of data without the use of EasyDMA array lists.
The ARM GCC compiler v 7.1 does not support charconv.
Until the switch is made to 8.x we are faking out charconv in nrf/utilities/charconv.h.
Convert to GCC ARM 8.x when appropriate and remove the charconv.h fakery.
boost::intrusive::list<>
is the proper class to use in the first place. Is this class causing massive template code bloat?boost::intrusive::list_member_hook<>
cannot be made volatile
. This disqualifies its use within the timer observer/observable class structure.If it is to be used within the BLE landscape:
boost::intrusive::constant_time_size<false>
flag in the boost::intrusive::list<>
template arguments. This will allow for boost::intrusive::list_member_hook<>::unlink()
usage.boost::intrusive::list::remove()
from usage. This requires O(n) to perform. Use boost::intrusive::list_member_hook<>::unlink()
instead for immediate results.operator ==
from classes which include boost::intrusive::list_member_hook<>
in their class body.The following items need implemented:
On initialization and based on temperature change the SAADC calibration TASK needs to be run.
In initialization and based on temperature changes, the Nordic SAADC calibration task needs to be run.
GATT MTU size is specified several places:
nrf/ble/nordic_ble_stack_observer.cc
nrf/ble/nordic_ble_stack.h
nrf/ble/att.h: static constexpr length_t const mtu_length_maximum = 251u
Get to the bottom of the actual GATT MTU maximum and provide one source of truth.
A bunch of things:
size_t
where possible.std::equal()
comparisions.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.