Trait bluenrg::gap::Commands [−][src]
pub trait Commands { type Error; fn set_nondiscoverable(&mut self) -> Result<(), Self::Error>; fn set_limited_discoverable<'a, 'b>(
&mut self,
params: &DiscoverableParameters<'a, 'b>
) -> Result<(), Error<Self::Error>>; fn set_discoverable<'a, 'b>(
&mut self,
params: &DiscoverableParameters<'a, 'b>
) -> Result<(), Error<Self::Error>>; fn set_direct_connectable(
&mut self,
params: &DirectConnectableParameters
) -> Result<(), Error<Self::Error>>; fn set_io_capability(
&mut self,
capability: IoCapability
) -> Result<(), Self::Error>; fn set_authentication_requirement(
&mut self,
requirements: &AuthenticationRequirements
) -> Result<(), Error<Self::Error>>; fn set_authorization_requirement(
&mut self,
conn_handle: ConnectionHandle,
authorization_required: bool
) -> Result<(), Self::Error>; fn pass_key_response(
&mut self,
conn_handle: ConnectionHandle,
pin: u32
) -> Result<(), Error<Self::Error>>; fn authorization_response(
&mut self,
conn_handle: ConnectionHandle,
authorization: Authorization
) -> Result<(), Self::Error>; fn init(
&mut self,
role: Role,
privacy_enabled: bool,
dev_name_characteristic_len: usize
) -> Result<(), Self::Error>; fn set_nonconnectable(
&mut self,
advertising_type: AdvertisingType,
address_type: AddressType
) -> Result<(), Error<Self::Error>>; fn set_undirected_connectable(
&mut self,
filter_policy: AdvertisingFilterPolicy,
address_type: AddressType
) -> Result<(), Error<Self::Error>>; fn peripheral_security_request(
&mut self,
params: &SecurityRequestParameters
) -> Result<(), Self::Error>; fn update_advertising_data(
&mut self,
data: &[u8]
) -> Result<(), Error<Self::Error>>; fn delete_ad_type(
&mut self,
ad_type: AdvertisingDataType
) -> Result<(), Self::Error>; fn get_security_level(&mut self) -> Result<(), Self::Error>; fn set_event_mask(&mut self, flags: EventFlags) -> Result<(), Self::Error>; fn configure_white_list(&mut self) -> Result<(), Self::Error>; fn terminate(
&mut self,
conn_handle: ConnectionHandle,
reason: Status<Status>
) -> Result<(), Error<Self::Error>>; fn clear_security_database(&mut self) -> Result<(), Self::Error>; fn allow_rebond(
&mut self,
conn_handle: ConnectionHandle
) -> Result<(), Self::Error>; fn start_limited_discovery_procedure(
&mut self,
params: &DiscoveryProcedureParameters
) -> Result<(), Self::Error>; fn start_general_discovery_procedure(
&mut self,
params: &DiscoveryProcedureParameters
) -> Result<(), Self::Error>; fn start_name_discovery_procedure(
&mut self,
params: &NameDiscoveryProcedureParameters
) -> Result<(), Self::Error>; fn start_auto_connection_establishment<'a>(
&mut self,
params: &AutoConnectionEstablishmentParameters<'a>
) -> Result<(), Error<Self::Error>>; fn start_general_connection_establishment(
&mut self,
params: &GeneralConnectionEstablishmentParameters
) -> Result<(), Self::Error>; fn start_selective_connection_establishment<'a>(
&mut self,
params: &SelectiveConnectionEstablishmentParameters<'a>
) -> Result<(), Error<Self::Error>>; fn create_connection(
&mut self,
params: &ConnectionParameters
) -> Result<(), Self::Error>; fn terminate_procedure(
&mut self,
procedure: Procedure
) -> Result<(), Error<Self::Error>>; fn start_connection_update(
&mut self,
params: &ConnectionUpdateParameters
) -> Result<(), Self::Error>; fn send_pairing_request(
&mut self,
params: &PairingRequest
) -> Result<(), Self::Error>; fn resolve_private_address(
&mut self,
addr: BdAddr
) -> Result<(), Self::Error>; fn get_bonded_devices(&mut self) -> Result<(), Self::Error>; fn set_broadcast_mode(
&mut self,
params: &BroadcastModeParameters
) -> Result<(), Error<Self::Error>>; fn start_observation_procedure(
&mut self,
params: &ObservationProcedureParameters
) -> Result<(), Self::Error>; fn is_device_bonded(
&mut self,
addr: PeerAddrType
) -> Result<(), Self::Error>; }
GAP-specific commands for the ActiveBlueNRG.
Associated Types
type Error
Type of communication errors.
Required Methods
fn set_nondiscoverable(&mut self) -> Result<(), Self::Error>
Set the device in non-discoverable mode. This command will disable the LL advertising and put the device in standby state.
Errors
Only underlying communication errors are reported.
Generated events
A Command Complete event is generated.
fn set_limited_discoverable<'a, 'b>(
&mut self,
params: &DiscoverableParameters<'a, 'b>
) -> Result<(), Error<Self::Error>>
&mut self,
params: &DiscoverableParameters<'a, 'b>
) -> Result<(), Error<Self::Error>>
Set the device in limited discoverable mode.
Limited discoverability is defined in in GAP specification volume 3, section 9.2.3. The
device will be discoverable for maximum period of TGAP (lim_adv_timeout) = 180 seconds (from
errata). The advertising can be disabled at any time by issuing a
set_nondiscoverable
command.
Errors
BadAdvertisingType
ifadvertising_type
is one of the disallowed types: ConnectableDirectedHighDutyCycle or ConnectableDirectedLowDutyCycle.BadAdvertisingInterval
ifadvertising_interval
is inverted. That is, if the min is greater than the max.BadConnectionInterval
ifconn_interval
is inverted. That is, both the min and max are provided, and the min is greater than the max.
Generated evenst
When the controller receives the command, it will generate a command status event. The controller starts the advertising after this and when advertising timeout happens (i.e. limited discovery period has elapsed), the controller generates an GAP Limited Discoverable Complete event.
fn set_discoverable<'a, 'b>(
&mut self,
params: &DiscoverableParameters<'a, 'b>
) -> Result<(), Error<Self::Error>>
&mut self,
params: &DiscoverableParameters<'a, 'b>
) -> Result<(), Error<Self::Error>>
Set the device in discoverable mode.
Limited discoverability is defined in in GAP specification volume 3, section 9.2.4. The
device will be discoverable for maximum period of TGAP (lim_adv_timeout) = 180 seconds (from
errata). The advertising can be disabled at any time by issuing a
set_nondiscoverable
command.
Errors
BadAdvertisingType
ifadvertising_type
is one of the disallowed types: ConnectableDirectedHighDutyCycle or ConnectableDirectedLowDutyCycle.BadAdvertisingInterval
ifadvertising_interval
is inverted. That is, if the min is greater than the max.BadConnectionInterval
ifconn_interval
is inverted. That is, both the min and max are provided, and the min is greater than the max.
Generated evenst
A Command Complete event is generated.
fn set_direct_connectable(
&mut self,
params: &DirectConnectableParameters
) -> Result<(), Error<Self::Error>>
&mut self,
params: &DirectConnectableParameters
) -> Result<(), Error<Self::Error>>
Set the device in direct connectable mode.
Direct connectable mode is defined in GAP specification Volume 3, Section 9.3.3). Device uses direct connectable mode to advertise using either High Duty cycle advertisement events or Low Duty cycle advertisement events and the address as what is specified in the Own Address Type parameter. The Advertising Type parameter in the command specifies the type of the advertising used.
When the ms
feature is not enabled, the device will be in directed connectable mode only
for 1.28 seconds. If no connection is established within this duration, the device enters
non discoverable mode and advertising will have to be again enabled explicitly.
When the ms
feature is enabled, the advertising interval is explicitly provided in the
parameters.
Errors
BadAdvertisingType
ifadvertising_type
is one of the disallowed types: ConnectableUndirected, ScannableUndirected, or NonConnectableUndirected,- (
ms
feature only)BadAdvertisingInterval
ifadvertising_interval
is out of range (20 ms to 10.24 s) or inverted (the min is greater than the max).
Generated evenst
A Command Complete event is generated.
fn set_io_capability(
&mut self,
capability: IoCapability
) -> Result<(), Self::Error>
&mut self,
capability: IoCapability
) -> Result<(), Self::Error>
Set the IO capabilities of the device.
This command has to be given only when the device is not in a connected state.
Errors
Only underlying communication errors are reported.
Generated events
A Command Complete event is generated.
fn set_authentication_requirement(
&mut self,
requirements: &AuthenticationRequirements
) -> Result<(), Error<Self::Error>>
&mut self,
requirements: &AuthenticationRequirements
) -> Result<(), Error<Self::Error>>
Set the authentication requirements for the device.
This command has to be given only when the device is not in a connected state.
Errors
- BadEncryptionKeySizeRange if the
encryption_key_size_range
min is greater than the max. - BadFixedPin if the
fixed_pin
is Fixed with a value greater than 999999. - Underlying communication errors.
Generated events
- A Command Complete event is generated.
- If
fixed_pin
is Request, then a GAP Pass Key event is generated.
Set the authorization requirements of the device.
This command has to be given when connected to a device if authorization is required to access services which require authorization.
Errors
Only underlying communication errors are reported.
Generated events
- A Command Complete event is generated.
- If authorization is required, then a GAP Authorization Request event is generated.
fn pass_key_response(
&mut self,
conn_handle: ConnectionHandle,
pin: u32
) -> Result<(), Error<Self::Error>>
&mut self,
conn_handle: ConnectionHandle,
pin: u32
) -> Result<(), Error<Self::Error>>
This command should be send by the host in response to the GAP Pass Key Request event.
pin
contains the pass key which will be used during the pairing process.
Errors
- BadFixedPin if the pin is greater than 999999.
- Underlying communication errors.
Generated events
- A Command Complete event is generated.
- When the pairing process completes, it will generate a PairingComplete event.
This command should be send by the host in response to the GAP Authorization Request event.
Errors
Only underlying communication errors are reported.
Generated events
A Command Complete event is generated.
fn init(
&mut self,
role: Role,
privacy_enabled: bool,
dev_name_characteristic_len: usize
) -> Result<(), Self::Error>
&mut self,
role: Role,
privacy_enabled: bool,
dev_name_characteristic_len: usize
) -> Result<(), Self::Error>
Register the GAP service with the GATT.
The device name characteristic and appearance characteristic are added by default and the handles of these characteristics are returned in the event data.
Errors
Only underlying communication errors are reported.
Generated events
A Command Complete event is generated.
fn set_nonconnectable(
&mut self,
advertising_type: AdvertisingType,
address_type: AddressType
) -> Result<(), Error<Self::Error>>
&mut self,
advertising_type: AdvertisingType,
address_type: AddressType
) -> Result<(), Error<Self::Error>>
Put the device into non-connectable mode.
This mode does not support connection. The privacy setting done in the
init
command plays a role in deciding the valid
parameters for this command. If privacy was not enabled, address_type
may be
Public or Random. If privacy was
enabled, address_type
may be ResolvablePrivate or
NonResolvablePrivate.
Errors
- BadAdvertisingType if the advertising type is not one of the supported modes. It must be ScannableUndirected or (NonConnectableUndirected)[AdvertisingType::NonConnectableUndirected).
- Underlying communication errors.
Generated events
A Command Complete event is generated.
fn set_undirected_connectable(
&mut self,
filter_policy: AdvertisingFilterPolicy,
address_type: AddressType
) -> Result<(), Error<Self::Error>>
&mut self,
filter_policy: AdvertisingFilterPolicy,
address_type: AddressType
) -> Result<(), Error<Self::Error>>
Put the device into undirected connectable mode.
The privacy setting done in the init
command plays a role
in deciding the valid parameters for this command.
Errors
- BadAdvertisingFilterPolicy if the filter is not one of the supported modes. It must be AllowConnectionAndScan or (WhiteListConnectionAllowScan)[AdvertisingFilterPolicy::WhiteListConnectionAllowScan).
- Underlying communication errors.
Generated events
A Command Complete event is generated.
fn peripheral_security_request(
&mut self,
params: &SecurityRequestParameters
) -> Result<(), Self::Error>
&mut self,
params: &SecurityRequestParameters
) -> Result<(), Self::Error>
This command has to be issued to notify the central device of the security requirements of the peripheral.
Errors
Only underlying communication errors are reported.
Generated events
A command status event will be generated when a valid command is received. On completion of the command, i.e. when the security request is successfully transmitted to the master, a GAP Peripheral Security Initiated vendor-specific event will be generated.
fn update_advertising_data(
&mut self,
data: &[u8]
) -> Result<(), Error<Self::Error>>
&mut self,
data: &[u8]
) -> Result<(), Error<Self::Error>>
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.
Errors
- BadAdvertisingDataLength if the provided data is longer than 31 bytes.
- Underlying communication errors.
Generated events
A Command Complete event is generated.
fn delete_ad_type(
&mut self,
ad_type: AdvertisingDataType
) -> Result<(), Self::Error>
&mut self,
ad_type: AdvertisingDataType
) -> Result<(), Self::Error>
This command can be used to delete the specified AD type from the advertisement data if present.
Errors
Only underlying communication errors are reported.
Generated events
A Command Complete event is generated.
fn get_security_level(&mut self) -> Result<(), Self::Error>
This command can be used to get the current security settings of the device.
Errors
Only underlying communication errors are reported.
Generated events
A Command Complete event is generated.
fn set_event_mask(&mut self, flags: EventFlags) -> Result<(), Self::Error>
Allows masking events from the GAP.
The default configuration is all the events masked.
Errors
Only underlying communication errors are reported.
Generated events
A Command Complete event is generated.
fn configure_white_list(&mut self) -> Result<(), Self::Error>
Configure the controller's white list with devices that are present in the security database.
Errors
Only underlying communication errors are reported.
Generated events
A Command Complete event is generated.
fn terminate(
&mut self,
conn_handle: ConnectionHandle,
reason: Status<Status>
) -> Result<(), Error<Self::Error>>
&mut self,
conn_handle: ConnectionHandle,
reason: Status<Status>
) -> Result<(), Error<Self::Error>>
Command the controller to terminate the connection.
Errors
- BadTerminationReason if provided termination reason is
invalid. Valid reasons are the same as HCI disconnect:
AuthFailure
,RemoteTerminationByUser
,RemoteTerminationLowResources
,RemoteTerminationPowerOff
,UnsupportedRemoteFeature
,PairingWithUnitKeyNotSupported
, orUnacceptableConnectionParameters
. - Underlying communication errors.
Generated events
The controller will generate a command status event when the command is received and a Disconnection Complete event will be generated when the link is disconnected.
fn clear_security_database(&mut self) -> Result<(), Self::Error>
Clear the security database. All the devices in the security database will be removed.
Errors
Only underlying communication errors are reported.
Generated events
A Command Complete event is generated.
fn allow_rebond(
&mut self,
conn_handle: ConnectionHandle
) -> Result<(), Self::Error>
&mut self,
conn_handle: ConnectionHandle
) -> Result<(), Self::Error>
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.
Errors
Only underlying communication errors are reported.
Generated events
A Command Complete event is generated. Even if the command is given when it is not valid, success will be returned but internally it will have no effect.
fn start_limited_discovery_procedure(
&mut self,
params: &DiscoveryProcedureParameters
) -> Result<(), Self::Error>
&mut self,
params: &DiscoveryProcedureParameters
) -> Result<(), Self::Error>
Start the limited discovery procedure.
The controller is commanded to start active scanning. When this procedure is started, only the devices in limited discoverable mode are returned to the upper layers.
Errors
Only underlying communication errors are reported.
Generated events
A command status event is generated as soon as the command is given.
If Success is returned in the command status, the procedure is
terminated when either the upper layers issue a command to terminate the procedure by
issuing the command terminate_procedure
with the procedure code set to LimitedDiscovery or
a timeout happens. When the procedure
is terminated due to any of the above reasons, a
ProcedureComplete event is returned with the
procedure code set to LimitedDiscovery.
The device found when the procedure is ongoing is returned to the upper layers through the LeAdvertisingReport event.
fn start_general_discovery_procedure(
&mut self,
params: &DiscoveryProcedureParameters
) -> Result<(), Self::Error>
&mut self,
params: &DiscoveryProcedureParameters
) -> Result<(), Self::Error>
Start the general discovery procedure. The controller is commanded to start active scanning.
Errors
Only underlying communication errors are reported.
Generated events
A command status event is generated as soon as the command is given.
If Success is returned in the command status, the procedure is
terminated when either the upper layers issue a command to terminate the procedure by
issuing the command terminate_procedure
with the
procedure code set to GeneralDiscovery or a
timeout happens. When the procedure is terminated due to any of the above reasons, a
ProcedureComplete event is returned with
the procedure code set to GeneralDiscovery.
The device found when the procedure is ongoing is returned to the upper layers through the LeAdvertisingReport event.
fn start_name_discovery_procedure(
&mut self,
params: &NameDiscoveryProcedureParameters
) -> Result<(), Self::Error>
&mut self,
params: &NameDiscoveryProcedureParameters
) -> Result<(), Self::Error>
Start the name discovery procedure.
A LE Create Connection call will be made to the controller by GAP with the initiator filter policy set to UseAddress, to "ignore whitelist and process connectable advertising packets only for the specified device". Once a connection is established, GATT procedure is started to read the device name characteristic. When the read is completed (successfully or unsuccessfully), a ProcedureComplete event is given to the upper layer. The event also contains the name of the device if the device name was read successfully.
Errors
Only underlying communication errors are reported.
Generated Events
A command status event is generated as soon as the command is given. If Success is returned, on completion of the procedure, a ProcedureComplete event is returned with the procedure code set to NameDiscovery.
fn start_auto_connection_establishment<'a>(
&mut self,
params: &AutoConnectionEstablishmentParameters<'a>
) -> Result<(), Error<Self::Error>>
&mut self,
params: &AutoConnectionEstablishmentParameters<'a>
) -> Result<(), Error<Self::Error>>
Start the auto connection establishment procedure.
The devices specified are added to the white list of the controller and a
le_create_connection
call will be made to the
controller by GAP with the initiator filter
policy set to
WhiteList, to "use whitelist to determine
which advertiser to connect to". When a command is issued to terminate the procedure by
upper layer, a le_create_connection_cancel
call will be made to the controller by GAP.
Errors
- If the
white_list
is too long (such that the serialized command would not fit in 255 bytes), a WhiteListTooLong is returned. The list cannot have more than 33 elements.
fn start_general_connection_establishment(
&mut self,
params: &GeneralConnectionEstablishmentParameters
) -> Result<(), Self::Error>
&mut self,
params: &GeneralConnectionEstablishmentParameters
) -> Result<(), Self::Error>
Start a general connection establishment procedure.
The host enables scanning in the controller with the
scanner filter policy set to
AcceptAll, to "accept all advertising packets" and
from the scanning results, all the devices are sent to the upper layer using the event LE
Advertising Report. The upper layer then has to
select one of the devices to which it wants to connect by issuing the command
create_connection
. If privacy is enabled,
then either a private resolvable address or a non-resolvable address, based on the address
type specified in the command is set as the scanner address but the GAP create connection
always uses a private resolvable address if the general connection establishment procedure
is active.
Errors
Only underlying communication errors are reported.
fn start_selective_connection_establishment<'a>(
&mut self,
params: &SelectiveConnectionEstablishmentParameters<'a>
) -> Result<(), Error<Self::Error>>
&mut self,
params: &SelectiveConnectionEstablishmentParameters<'a>
) -> Result<(), Error<Self::Error>>
Start a selective connection establishment procedure.
The GAP adds the specified device addresses into white list and enables
scanning in the controller with the scanner filter
policy set to
WhiteList, to "accept packets only from devices in
whitelist". All the devices found are sent to the upper layer by the event LE Advertising
Report. The upper layer then has to select one of
the devices to which it wants to connect by issuing the command
create_connection
.
Errors
- If the
white_list
is too long (such that the serialized command would not fit in 255 bytes), a WhiteListTooLong is returned. The list cannot have more than 35 elements.
fn create_connection(
&mut self,
params: &ConnectionParameters
) -> Result<(), Self::Error>
&mut self,
params: &ConnectionParameters
) -> Result<(), Self::Error>
Start the direct connection establishment procedure.
A LE Create Connection call will be made to the
controller by GAP with the initiator filter
policy set to
UseAddress to "ignore whitelist and process
connectable advertising packets only for the specified device". The procedure can be
terminated explicitly by the upper layer by issuing the command
terminate_procedure
. When a command is
issued to terminate the procedure by upper layer, a
le_create_connection_cancel
call will be
made to the controller by GAP.
Errors
Only underlying communication errors are reported.
Generated events
A command status event is generated as soon as the
command is given. If Success is returned, on termination of the
procedure, a LE Connection Complete event is
returned. The procedure can be explicitly terminated by the upper layer by issuing the
command terminate_procedure
with the
procedure_code set to
DirectConnectionEstablishment.
fn terminate_procedure(
&mut self,
procedure: Procedure
) -> Result<(), Error<Self::Error>>
&mut self,
procedure: Procedure
) -> Result<(), Error<Self::Error>>
The GAP procedure(s) specified is terminated.
Errors
- NoProcedure if the bitfield is empty.
- Underlying communication errors
Generated events
A command complete event is generated for this command. If the command was successfully processed, the status field will be Success and a ProcedureCompleted event is returned with the procedure code set to the corresponding procedure.
fn start_connection_update(
&mut self,
params: &ConnectionUpdateParameters
) -> Result<(), Self::Error>
&mut self,
params: &ConnectionUpdateParameters
) -> Result<(), Self::Error>
Start the connection update procedure.
A le_connection_update
call is be made to the
controller by GAP.
Errors
Only underlying communication errors are reported.
Generated events
A command status event is generated as soon as the command is given. If Success is returned, on completion of connection update, a LeConnectionUpdateComplete event is returned to the upper layer.
fn send_pairing_request(
&mut self,
params: &PairingRequest
) -> Result<(), Self::Error>
&mut self,
params: &PairingRequest
) -> Result<(), Self::Error>
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.
Errors
Only underlying communication errors are reported.
Generated events
A command status event is generated when the command is received. If Success is returned in the command status event, a Pairing Complete event is returned after the pairing process is completed.
fn resolve_private_address(&mut self, addr: BdAddr) -> Result<(), Self::Error>
This command tries to resolve the address provided with the IRKs present in its database.
If the address is resolved successfully with any one of the IRKs present in the database, it returns success and also the corresponding public/static random address stored with the IRK in the database.
Errors
Only underlying communication errors are reported.
Generated events
A command complete event is generated. If Success is returned as the status, then the address is also returned in the event.
fn get_bonded_devices(&mut self) -> Result<(), Self::Error>
This command gets the list of the devices which are bonded. It returns the number of addresses and the corresponding address types and values.
Errors
Only underlying communication errors are reported.
Generated events
A command complete event is generated.
fn set_broadcast_mode(
&mut self,
params: &BroadcastModeParameters
) -> Result<(), Error<Self::Error>>
&mut self,
params: &BroadcastModeParameters
) -> Result<(), Error<Self::Error>>
This command puts the device into broadcast mode.
Errors
- BadAdvertisingType if the advertising type is not ScannableUndirected or NonConnectableUndirected.
- BadAdvertisingDataLength if the advertising data is longer than 31 bytes.
- WhiteListTooLong if the length of the white list would put the packet length over 255 bytes. The exact number of addresses that can be in the white list can range from 35 to 31, depending on the length of the advertising data.
- Underlying communication errors.
Generated events
A command complete event is returned where the status indicates whether the command was successful.
fn start_observation_procedure(
&mut self,
params: &ObservationProcedureParameters
) -> Result<(), Self::Error>
&mut self,
params: &ObservationProcedureParameters
) -> Result<(), Self::Error>
Starts an Observation procedure, when the device is in Observer Role.
The host enables scanning in the controller. The advertising reports are sent to the upper layer using standard LE Advertising Report Event. See Bluetooth Core v4.1, Vol. 2, part E, Ch. 7.7.65.2, LE Advertising Report Event.
Errors
Only underlying communication errors are reported.
Generated events
A command complete event is generated.
fn is_device_bonded(&mut self, addr: PeerAddrType) -> Result<(), Self::Error>
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.
Errors
Only underlying communication errors are reported.
Generated events
A command complete event is generated.