コード例 #1
0
ファイル: HackRFTests.py プロジェクト: eelmasllari/urh
 def test_set_rx(self):
     hackrf.setup()
     hackrf.set_freq(433.92e6)
     print(hackrf.is_streaming())
     hackrf.start_rx_mode(self.callback_fun)
     time.sleep(1)
     hackrf.stop_rx_mode()
コード例 #2
0
    def shutdown_device(cls, ctrl_conn: Connection, is_tx: bool):
        if is_tx:
            result = hackrf.stop_tx_mode()
            ctrl_conn.send("STOP TX MODE:" + str(result))
        else:
            result = hackrf.stop_rx_mode()
            ctrl_conn.send("STOP RX MODE:" + str(result))

        result = hackrf.close()
        ctrl_conn.send("CLOSE:" + str(result))

        result = hackrf.exit()
        ctrl_conn.send("EXIT:" + str(result))

        return True
コード例 #3
0
ファイル: HackRF.py プロジェクト: NickMinnellaCS96/urh
    def shutdown_device(cls, ctrl_conn: Connection, is_tx: bool):
        if is_tx:
            result = hackrf.stop_tx_mode()
            ctrl_conn.send("STOP TX MODE:" + str(result))
        else:
            result = hackrf.stop_rx_mode()
            ctrl_conn.send("STOP RX MODE:" + str(result))

        result = hackrf.close()
        ctrl_conn.send("CLOSE:" + str(result))

        result = hackrf.exit()
        ctrl_conn.send("EXIT:" + str(result))

        return True