Documentation
¶
Index ¶
- func CmdExec(args ...string) (string, error)
- func Down(adapterID int) error
- func RestartBluetoothUnit(fn func(err error)) (int, error)
- func StartBluetoothUnit(fn func(err error)) (int, error)
- func StopBluetoothUnit(fn func(err error)) (int, error)
- func Up(adapterID int) error
- type BtAdapter
- type BtMgmt
- func (h *BtMgmt) Reset() error
- func (h *BtMgmt) SetAdvertising(status bool) error
- func (h *BtMgmt) SetBondable(status bool) error
- func (h *BtMgmt) SetBredr(status bool) error
- func (h *BtMgmt) SetClass(major, minor string) error
- func (h *BtMgmt) SetConnectable(status bool) error
- func (h *BtMgmt) SetDeviceID(did string) error
- func (h *BtMgmt) SetDiscoverable(status bool) error
- func (h *BtMgmt) SetFastConnectable(status bool) error
- func (h *BtMgmt) SetHs(status bool) error
- func (h *BtMgmt) SetLe(status bool) error
- func (h *BtMgmt) SetLinkLevelSecurity(status bool) error
- func (h *BtMgmt) SetName(name string) error
- func (h *BtMgmt) SetPairable(status bool) error
- func (h *BtMgmt) SetPowered(status bool) error
- func (h *BtMgmt) SetPrivacy(status bool) error
- func (h *BtMgmt) SetSc(status bool) error
- func (h *BtMgmt) SetSsp(status bool) error
- type HCIConfig
- type HCIConfigResult
- type RFKill
- func (rfkill RFKill) IsBlocked(identifier string) bool
- func (rfkill RFKill) IsBlockedAfterUnblocking(identifier string) bool
- func (rfkill RFKill) IsHardBlocked(identifier string) bool
- func (rfkill RFKill) IsInstalled() bool
- func (rfkill RFKill) IsSoftBlocked(identifier string) bool
- func (rfkill RFKill) ListAll() ([]RFKillResult, error)
- func (rfkill RFKill) SoftBlock(identifier string) error
- func (rfkill RFKill) SoftUnblock(identifier string) error
- type RFKillResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RestartBluetoothUnit ¶
RestartBluetoothUnit by its systemd unit
func StartBluetoothUnit ¶
StartBluetoothUnit by its systemd unit
func StopBluetoothUnit ¶
StopBluetoothUnit by its systemd unit
Types ¶
type BtAdapter ¶
type BtAdapter struct { ID string Name string ShortName string Addr string Version string Manufacturer string Class string SupportedSettings []string CurrentSettings []string }
BtAdapter contains info about adapter from btmgmt
type BtMgmt ¶
type BtMgmt struct {
// contains filtered or unexported fields
}
BtMgmt an hciconfig command wrapper
func (*BtMgmt) SetAdvertising ¶
SetAdvertising Set LE advertising
func (*BtMgmt) SetBondable ¶
SetBondable Set bondable state
func (*BtMgmt) SetConnectable ¶
SetConnectable Set connectable state
func (*BtMgmt) SetDeviceID ¶
SetDeviceID Set Device ID name
func (*BtMgmt) SetDiscoverable ¶
SetDiscoverable Set discoverable state
func (*BtMgmt) SetFastConnectable ¶
SetFastConnectable Set fast connectable state
func (*BtMgmt) SetLinkLevelSecurity ¶
SetLinkLevelSecurity Set link level security
func (*BtMgmt) SetPairable ¶
SetPairable Set bondable state
func (*BtMgmt) SetPowered ¶
SetPowered set power to adapter
func (*BtMgmt) SetPrivacy ¶
SetPrivacy Set privacy support
type HCIConfig ¶
type HCIConfig struct {
// contains filtered or unexported fields
}
HCIConfig an hciconfig command wrapper
func NewHCIConfig ¶
NewHCIConfig initialize a new HCIConfig
func (*HCIConfig) Down ¶
func (h *HCIConfig) Down() (*HCIConfigResult, error)
Down Turn down an HCI device
func (*HCIConfig) Status ¶
func (h *HCIConfig) Status() (*HCIConfigResult, error)
Status return status information for a hci device
type HCIConfigResult ¶
HCIConfigResult contains details for an adapter
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 (rfkill 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