node-hackrf

:radio: Control a HackRF device (e.g. Jawbreaker, HackRF One, or Rad1o) from Node.js

  • 所有者: mappum/node-hackrf
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

node-hackrf

Control a HackRF device (e.g. Jawbreaker, HackRF One, or Rad1o) from node

This is a low-level binding to libhackrf. If you'd like a nice stream interface, try hackrf-stream.

npm install hackrf

API

var devices = hackrf()

Returns an array containing information about the connected HackRF devices. If no devices are connected, an empty array will be returned.

var device = devices.open(index)

Opens and returns the device in the array of devices with index index.

device.getVersion()

Returns the hackrf firmware version.

device.setFrequency(hz, [callback])

Set the frequency. hz should be an integer

device.setBandwidth(hz, [callback])

Set the bandwidth. hz should be an integer

device.setSampleRate(hz, [callback])

Set the sample rate. hz should be an integer

device.setLNAGain(val)

Set the lna gain. Should be between 0-40

device.setVGAGain(val)

Set the vna gain. Should be between 0-62

device.setTxGain(val)

Set the tx gain. Should be between 0-47

device.startRx(onrx)

Receive data. onrx is called with (data, cb).

device.startRx(function (data, cb) {
  console.log('read', data)
  cb() // done
})

device.stopRx([callback])

Stop receiving data.

device.startTx(ontx)

Transmit data. ontx is called with (data, cb).
You should write the data you want to send to data.

device.startTx(function (data, cb) {
  for (var i = 0; i < data.length; i++) data[i] = 127
  cb() // write the data
})

device.stopTx([callback])

Stop transmitting data.

device.close([callback])

Release the resources for the device (allowing it to be used by another process).

License

MIT

主要指标

概览
名称与所有者mappum/node-hackrf
主编程语言C
编程语言Python (语言数: 4)
平台
许可证
所有者活动
创建于2015-08-14 15:19:26
推送于2020-07-27 21:26:13
最后一次提交2017-10-30 18:06:20
发布数12
最新版本名称v3.1.3 (发布于 2017-10-22 21:29:47)
第一版名称v1.0.0 (发布于 2015-08-14 22:53:17)
用户参与
星数149
关注者数11
派生数32
提交数61
已启用问题?
问题数5
打开的问题数2
拉请求数7
打开的拉请求数4
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?