Documentation ¶
Index ¶
- func GetHCIConfig(adapterID string) *hciconfig.HCIConfig
- func ToggleAdapter(adapterID string) error
- func ToggleBluetooth() error
- func TurnOffAdapter(adapterID string) error
- func TurnOffBluetooth() error
- func TurnOnAdapter(adapterID string) error
- func TurnOnBluetooth() error
- type RFKill
- func (self RFKill) IsBlocked(identifier string) bool
- func (self RFKill) IsBlockedAfterUnblocking(identifier string) bool
- func (self RFKill) IsHardBlocked(identifier string) bool
- func (self RFKill) IsInstalled() bool
- func (self RFKill) IsSoftBlocked(identifier string) bool
- func (self RFKill) ListAll() ([]RFKillResult, error)
- func (self RFKill) SoftBlock(identifier string) error
- func (self RFKill) SoftUnblock(identifier string) error
- type RFKillResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHCIConfig ¶
GetHCIConfig return an HCIConfig struct
func ToggleBluetooth ¶
func ToggleBluetooth() error
ToggleBluetooth toggle off/on the bluetooth support
func TurnOffAdapter ¶
TurnOffAdapter Enable a rfkill managed device
func TurnOnAdapter ¶
TurnOnAdapter Enable a rfkill managed device
Types ¶
type RFKill ¶
type RFKill struct{}
RFKill is a wrapper for linux utility: rfkill Checks the status of kill switches. If either is set, the device will be disabled. Soft = Software (set by software) Hard = Hardware (physical on/off switch on the device) Identifiers = all, wifi, wlan, bluetooth, uwb, ultrawideband, wimax, wwan, gps, fm See: http://wireless.kernel.org/en/users/Documentation/rfkill
func (RFKill) IsBlockedAfterUnblocking ¶
IsBlockedAfterUnblocking Checks if an identifier has a software or hardware block after removing a software block if it exists
func (RFKill) IsHardBlocked ¶
IsHardBlocked Checks if an identifier has a hardware block
func (RFKill) IsInstalled ¶
IsInstalled Checks if the program rfkill exists using PATH environment variable
func (RFKill) IsSoftBlocked ¶
IsSoftBlocked Checks if an identifier has a software block
func (RFKill) ListAll ¶
func (self RFKill) ListAll() ([]RFKillResult, error)
ListAll Returns a list of rfkill results for every identifier type
func (RFKill) SoftUnblock ¶
SoftUnblock Removes a software block on an identifier
type RFKillResult ¶
type RFKillResult struct { Index int IdentifierType string Description string SoftBlocked bool HardBlocked bool }
RFKillResult Result of rfkill request
func GetAdapterStatus ¶
func GetAdapterStatus(adapterID string) (*RFKillResult, error)
GetAdapterStatus return the status of an adapter