Peripherals
SimpleBLE.identifier — Method
SimpleBLE.address — Method
SimpleBLE.address_type — Function
address_type(peripheral)
SimpleBLE.rssi — Function
rssi(peripheral)
SimpleBLE.tx_power — Function
tx_power(peripheral)
SimpleBLE.mtu — Function
mtu(peripheral)
SimpleBLE.connect — Function
connect(peripheral)Connect to a peripheral. Generally you should disconnect when you're done with it
connect(callback, peripheral)
connect(peripheral) do
# Stuff
endConvenience function for automatically disconnecting from a peripheral once you're done with it
SimpleBLE.disconnect — Function
disconnect(peripheral)SimpleBLE.is_connected — Function
is_connected(peripheral)SimpleBLE.is_connectable — Function
is_connectable(peripheral)SimpleBLE.is_paired — Function
is_paired(peripheral)SimpleBLE.unpair — Function
unpair(peripheral)SimpleBLE.services — Function
services(peripheral)Acquire the services provided by a peripheral.
SimpleBLE.manufacturer_data — Function
manufacturer_data(peripheral)Acquire the manufacturer data associated with peripheral.
SimpleBLE.peripheral_read — Function
peripheral_read(peripheral,
service::Union{AbstractString, SBLEUUID, SBLESERVICE},
characteristic::Union{AbstractString, SBLEUUID, SBLECHARACTERISTIC},
)Read data from a characteristic.
service and characteristic can be AbstractStrings, SBLEUUIDs, or SBLESERVICE and SBLECHARACTERISTIC acquired by services.
SimpleBLE.write_request — Function
write_request(peripheral,
service::Union{AbstractString, SBLEUUID, SBLESERVICE},
characteristic::Union{AbstractString, SBLEUUID, SBLECHARACTERISTIC},
data <: Union{AbstractString, AbstractArray}
)Write a request to a characteristic.
See also write_command
SimpleBLE.write_command — Function
write_command(
peripheral,
service::Union{AbstractString, SBLEUUID, SBLESERVICE},
characteristic::Union{AbstractString, SBLEUUID, SBLECHARACTERISTIC},
data <: Union{AbstractString, AbstractArray}
)Write a command to a characteristic.
See also write_request
Base.notify — Function
notify(callback,
peripheral::Peripheral,
service::Union{AbstractString, SBLEUUID, SBLESERVICE},
characteristic::Union{AbstractString, SBLEUUID, SBLECHARACTERISTIC}
)
notify(
peripheral::Peripheral,
service::Union{AbstractString, SBLEUUID, SBLESERVICE},
characteristic::Union{AbstractString, SBLEUUID, SBLECHARACTERISTIC}
) do data
# Stuff
endSet a callback that is called when data is received from a Characteristic. notify is generally faster than indicate because it does not need to acknowledge that it received the data.
See also indicate
SimpleBLE.indicate — Function
indicate(callback,
peripheral::Peripheral,
service::Union{AbstractString, SBLEUUID, SBLESERVICE},
characteristic::Union{AbstractString, SBLEUUID, SBLECHARACTERISTIC}
)
indicate(
peripheral::Peripheral,
service::Union{AbstractString, SBLEUUID, SBLESERVICE},
characteristic::Union{AbstractString, SBLEUUID, SBLECHARACTERISTIC}
) do data
# Stuff
endSet a callback that is called when data is received from a Characteristic. notify is generally faster than indicate because it does not need to acknowledge that it received the data.
See also notify
SimpleBLE.unsubscribe — Function
unsubscribe(
peripheral,
service::Union{AbstractString, SBLEUUID, SBLESERVICE},
characteristic::Union{AbstractString, SBLEUUID, SBLECHARACTERISTIC}
)SimpleBLE.read_descriptor — Function
read_descriptor(
peripheral,
service::Union{AbstractString, SBLEUUID, SBLESERVICE},
characteristic::Union{AbstractString, SBLEUUID, SBLECHARACTERISTIC},
descriptor::Union{AbstractString, SBLEUUID, SBLECHARACTERISTIC}
)Read data from a descriptor.
SimpleBLE.write_descriptor — Function
write_descriptor(
peripheral,
service::Union{AbstractString, SBLEUUID, SBLESERVICE},
characteristic::Union{AbstractString, SBLEUUID, SBLECHARACTERISTIC},
descriptor::Union{AbstractString, SBLEUUID, SBLECHARACTERISTIC},
data <: Union{AbstractString, AbstractArray}
)Write data to a descriptor.
SimpleBLE.set_callback_on_connected — Function
set_callback_on_connected(callback, peripheral)
set_callback_on_connected(peripheral) do
# Stuff
endSet a callback that is called when a peripheral is connected.
See also set_callback_on_disconnected
SimpleBLE.set_callback_on_disconnected — Function
set_callback_on_disconnected(callback, peripheral)
set_callback_on_disconnected(peripheral) do
# Stuff
endSet a callback that is called when a peripheral is disconnected.
See also set_callback_on_connected