phyphox BLE
Plot your Arduino's data in the phyphox app and control the board from the phone
Loading...
Searching...
No Matches
NinaB31Transport.h
Go to the documentation of this file.
1// Transport for a u-blox NINA-B31 module driven over UART with u-connectXpress AT commands:
2// the senseBox MCU / MCU-S2 with the Bluetooth-Bee, and the MKR1000 with a NINA-B31.
3// Tier 2: compiled in CI, tested by the senseBox colleagues on their hardware (plan ยง1.8).
4// The module keeps the GATT table; the number of characteristics it accepts is a module
5// limit (u-connectXpress raised NINA-B1's to 29) โ€” PHYPHOX_BLE_INPUT_CHANNELS keeps the total
6// well below that. Requires PhyphoxBLE::poll() in loop() to read the serial port.
7#ifndef PHYPHOX_BLE_TRANSPORT_NINAB31_H
8#define PHYPHOX_BLE_TRANSPORT_NINAB31_H
9
10#include "Transport.h"
11
12class Print;
13
14namespace phyphox {
15
17public:
18 bool begin(const GattLayout& layout, TransportListener& listener) override;
19 bool notify(CharId id, const uint8_t* data, uint16_t len) override;
20 void setValue(CharId id, const uint8_t* data, uint16_t len) override;
21 bool connected() const override;
22 uint16_t mtuPayload() const override;
23 void poll() override;
24 void restartAdvertising() override;
25 const char* name() const override { return "NINA-B31"; }
30 void setTrace(Print* out);
31private:
33};
34
35} // namespace phyphox
36
37#endif
Definition NinaB31Transport.h:16
void setValue(CharId id, const uint8_t *data, uint16_t len) override
Set a characteristic's value without notifying (initial values, the legacy config).
void setTrace(Print *out)
Mirror the AT dialogue with the module ("> " sent, "< " received) on out; nullptr stops it.
uint16_t mtuPayload() const override
The negotiated MTU payload (ATT_MTU โˆ’ 3), or PHYPHOX_BLE_DEFAULT_MTU.
void poll() override
Give the stack CPU time.
static NinaB31Transport & instance()
bool begin(const GattLayout &layout, TransportListener &listener) override
Create services and characteristics, start advertising the experiment service.
bool connected() const override
const char * name() const override
"ArduinoBLE", "ESP32", "NINA-B31" โ€” for printXML/debug
Definition NinaB31Transport.h:25
void restartAdvertising() override
bool notify(CharId id, const uint8_t *data, uint16_t len) override
Send a notification.
Callbacks from the transport into the core (implemented by Server).
Definition Transport.h:40
Definition Transport.h:59
Definition ChannelStore.h:11
Definition Transport.h:23
What the core asks the transport to create at begin().
Definition Transport.h:29