Documentation
¶
Index ¶
- Variables
- func NewNotFoundError(msg string) error
- func NewStuckError(msg string) error
- func NewVanishedError(msg string) error
- func ParseHexUINT16(str string) (uint16, error)
- type Device
- type DeviceMap
- type DeviceTuple
- type DeviceType
- type NotFoundError
- type StuckError
- type USBDeviceManager
- type VanishedError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SupportedDevices = DeviceMap{ SDRHackRFOne: { VendorID: 0x1d50, ProductID: 0x6089, Name: "HackRFOne", ResetCMD: exec.Command("hackrf_spiflash", "-R"), }, SDRHackRFJawbreaker: { VendorID: 0x1d50, ProductID: 0x604b, Name: "HackRFJawbreaker", ResetCMD: exec.Command("hackrf_spiflash", "-R"), }, ModemSIM7600: { VendorID: 0x1e0e, ProductID: 0x9001, Name: "Simtech SIM7[5|6]00", }, } )
fixme required usb permissions for accessing the modem
Functions ¶
func NewNotFoundError ¶
func NewStuckError ¶
func NewVanishedError ¶
func ParseHexUINT16 ¶
Types ¶
type DeviceMap ¶
type DeviceMap map[DeviceType]*Device
type DeviceType ¶
type DeviceType int
const ( Unknown DeviceType = iota // SDRs SDRHackRFOne SDRHackRFJawbreaker // Modems ModemSIM7600 )
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func (*NotFoundError) Error ¶
func (n *NotFoundError) Error() string
func (*NotFoundError) Is ¶
func (n *NotFoundError) Is(e error) bool
type StuckError ¶
type StuckError struct {
// contains filtered or unexported fields
}
func (*StuckError) Error ¶
func (s *StuckError) Error() string
func (*StuckError) Is ¶
func (s *StuckError) Is(e error) bool
type USBDeviceManager ¶
type USBDeviceManager struct {
sync.Mutex
sync.WaitGroup
// contains filtered or unexported fields
}
func NewUSBDeviceManager ¶
func NewUSBDeviceManager() *USBDeviceManager
func (*USBDeviceManager) FindSupportedDevices ¶
func (m *USBDeviceManager) FindSupportedDevices() DeviceMap
func (*USBDeviceManager) HotplugReceived ¶
func (m *USBDeviceManager) HotplugReceived(VendorID uint16, productID uint16, wasAdded bool)
func (*USBDeviceManager) ResetDevice ¶
func (m *USBDeviceManager) ResetDevice(target DeviceType) error
func (*USBDeviceManager) Shutdown ¶
func (m *USBDeviceManager) Shutdown()
type VanishedError ¶
type VanishedError struct {
// contains filtered or unexported fields
}
func (*VanishedError) Error ¶
func (n *VanishedError) Error() string
func (*VanishedError) Is ¶
func (n *VanishedError) Is(e error) bool
Click to show internal directories.
Click to hide internal directories.