Struct bluenrg::ActiveBlueNRG[][src]

pub struct ActiveBlueNRG<'spi, 'dbuf: 'spi, SPI: 'spi, OutputPin1: 'spi, OutputPin2: 'spi, InputPin: 'spi> { /* fields omitted */ }

Handle for actively communicating with the controller over the SPI bus.

An ActiveBlueNRG should not be created by the application, but is passed to closures given to BlueNRG::with_spi. ActiveBlueNRG implements bluetooth_hci::Controller, so it is used to access the HCI functions for the controller.

Trait Implementations

impl<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, E> Commands for ActiveBlueNRG<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin> where
    SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
    OutputPin1: OutputPin,
    OutputPin2: OutputPin,
    InputPin: InputPin
[src]

Type of communication errors.

Set the device in non-discoverable mode. This command will disable the LL advertising and put the device in standby state. Read more

Set the device in limited discoverable mode. Read more

Set the device in discoverable mode. Read more

Set the device in direct connectable mode. Read more

Set the IO capabilities of the device. Read more

Set the authentication requirements for the device. Read more

Set the authorization requirements of the device. Read more

This command should be send by the host in response to the GAP Pass Key Request event. Read more

This command should be send by the host in response to the GAP Authorization Request event. Read more

Register the GAP service with the GATT. Read more

Put the device into non-connectable mode. Read more

Put the device into undirected connectable mode. Read more

This command has to be issued to notify the central device of the security requirements of the peripheral. Read more

This command can be used to update the advertising data for a particular AD type. If the AD type specified does not exist, then it is added to the advertising data. If the overall advertising data length is more than 31 octets after the update, then the command is rejected and the old data is retained. Read more

This command can be used to delete the specified AD type from the advertisement data if present. Read more

This command can be used to get the current security settings of the device. Read more

Allows masking events from the GAP. Read more

Configure the controller's white list with devices that are present in the security database. Read more

Command the controller to terminate the connection. Read more

Clear the security database. All the devices in the security database will be removed. Read more

This command should be given by the application when it receives the GAP Bond Lost event if it wants the re-bonding to happen successfully. If this command is not given on receiving the event, the bonding procedure will timeout. Read more

Start the limited discovery procedure. Read more

Start the general discovery procedure. The controller is commanded to start active scanning. Read more

Start the name discovery procedure. Read more

Start the auto connection establishment procedure. Read more

Start a general connection establishment procedure. Read more

Start a selective connection establishment procedure. Read more

Start the direct connection establishment procedure. Read more

The GAP procedure(s) specified is terminated. Read more

Start the connection update procedure. Read more

Send the SM pairing request to start a pairing process. The authentication requirements and I/O capabilities should be set before issuing this command using the set_io_capability and set_authentication_requirement commands. Read more

This command tries to resolve the address provided with the IRKs present in its database. Read more

This command gets the list of the devices which are bonded. It returns the number of addresses and the corresponding address types and values. Read more

This command puts the device into broadcast mode. Read more

Starts an Observation procedure, when the device is in Observer Role. Read more

The command finds whether the device, whose address is specified in the command, is bonded. If the device is using a resolvable private address and it has been bonded, then the command will return Success. Read more

impl<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, E> Commands for ActiveBlueNRG<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin> where
    SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
    OutputPin1: OutputPin,
    OutputPin2: OutputPin,
    InputPin: InputPin
[src]

Type of communication errors.

Initialize the GATT server on the slave device. Initialize all the pools and active nodes. Also it adds GATT service with service changed characteristic. Until this command is issued the GATT channel will not process any commands even if the connection is opened. This command has to be given before using any of the GAP features. Read more

Add a service to GATT Server. Read more

Include a service to another service. Read more

Add a characteristic to a service. Read more

Add a characteristic descriptor to a service. Read more

Update a characteristic value in a service. Read more

Delete the characteristic specified from the service. Read more

Delete the service specified from the GATT server database. Read more

Delete the Include definition from the service. Read more

Allows masking events from the GATT. Read more

Perform an ATT MTU exchange. Read more

Post the Find information request. Read more

Post the Find by type value request. Read more

Send a Read By Type Request. Read more

Sends a Read By Group Type request. Read more

Sends a Prepare Write request. Read more

Sends an Execute Write Request to write all pending prepared writes. Read more

Sends an Execute Write Request to discard prepared writes. Read more

This command will start the GATT client procedure to discover all primary services on the server. Read more

This command will start the procedure to discover the primary services of the specified UUID on the server. Read more

Start the procedure to find all included services. Read more

Start the procedure to discover all the characteristics of a given service. Read more

Start the procedure to discover all the characteristics specified by the UUID. Read more

Start the procedure to discover all characteristic descriptors on the server. Read more

Start the procedure to read the attribute value. Read more

Start the procedure to read all the characteristics specified by the UUID. Read more

Start the procedure to read a long characteristic value. Read more

Start a procedure to read multiple characteristic values from a server. Read more

Start the procedure to write a characteristic value. Read more

Start the procedure to write a long characteristic value. Read more

Start the procedure to write a characteristic reliably. Read more

Start the procedure to write a long characteristic descriptor. Read more

Start the procedure to read a long characteristic descriptor. Read more

Start the procedure to write a characteristic descriptor value. Read more

Start the procedure to read a characteristic descriptor. Read more

Start the procedure to write a characteristic value without waiting for any response from the server. Read more

Start the procedure to write a characteristic value with an authentication signature without waiting for any response from the server. It cannot be used when the link is encrypted. Read more

Allow application to confirm indication. This command has to be sent when the application receives the GATT Indication event. Read more

Allows or rejects a write request from a client. Read more

Allows the GATT server to send a response to a read request from a client. Read more

This command sets the security permission for the attribute handle specified. Currently the setting of security permission is allowed only for client configuration descriptor. Read more

This command sets the value of a descriptor. Read more

Reads the value of the attribute handle specified from the local GATT database. Read more

The command returns the value of the attribute handle from the specified offset. Read more

Update the Attribute Value of a Characteristic belonging to a specified service. Read more

impl<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, E> Commands for ActiveBlueNRG<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin> where
    SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
    OutputPin1: OutputPin,
    OutputPin2: OutputPin,
    InputPin: InputPin
[src]

Type of communication errors.

This command is intended to retrieve the firmware revision number. Read more

This command writes a value to a low level configure data structure. It is useful to setup directly some low level parameters for the system in the runtime. Read more

This command requests the value in the low level configure data structure. Read more

This command sets the TX power level of the BlueNRG-MS. Read more

Puts the device in standby mode. Read more

Retrieve the number of packets sent in the last TX direct test. Read more

This command starts a carrier frequency, i.e. a tone, on a specific channel. Read more

Stops the previously started by the start_tone command. Read more

This command is intended to return the Link Layer Status and Connection Handles. Read more

This command is intended to retrieve information about the current Anchor Interval and allocable timing slots. Read more

impl<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, E> Commands for ActiveBlueNRG<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin> where
    SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
    OutputPin1: OutputPin,
    OutputPin2: OutputPin,
    InputPin: InputPin
[src]

Type of communication errors.

Send an L2CAP connection parameter update request from the peripheral to the central device. Read more

This command should be sent in response to the L2CapConnectionUpdateResponse event from the controller. The accept parameter has to be set to true if the connection parameters given in the event are acceptable. Read more

impl<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, E> Controller for ActiveBlueNRG<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin> where
    SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
    OutputPin1: OutputPin,
    OutputPin2: OutputPin,
    InputPin: InputPin
[src]

Enumeration of Controller errors. These typically will be specializations of [host::uart::Error] that specify both the vendor-specific error type and a communication error type. The communication error type in turn will depend on the bus used to communicate with the controller as well as the device crate (e.g., [linux-embedded-hal::Spidev] uses [std::io::Error]). Read more

The type of header sent to the controller for HCI commands. Should be either [uart::CommandHeader], [cmd_link::Header], or [event_link::NoCommands], depending on the controller implementation. Read more

Writes the bytes to the controller, in a single transaction if possible. All of header shall be written, followed by all of payload. write is allowed to block internally, but should return nb::Error::WouldBlock if the controller is not ready to receive the data. Read more

Reads data from the controller into the provided buffer. The length of the buffer indicates the number of bytes to read. The implementor must not return bytes in an order different from that in which they were received from the controller. For example, the implementor may read all available bytes from the controller and maintain them in an internal buffer, but read_into shall only read the number of bytes requested. Read more

Looks ahead at the data coming from the Controller without consuming it. Implementors should be able to support values of n up to 5 to support all potential data types. Read more

Auto Trait Implementations

impl<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin> Send for ActiveBlueNRG<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin> where
    InputPin: Send,
    OutputPin1: Send,
    OutputPin2: Send,
    SPI: Send

impl<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin> Sync for ActiveBlueNRG<'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin> where
    InputPin: Sync,
    OutputPin1: Sync,
    OutputPin2: Sync,
    SPI: Sync