when running usrp2_recovery.py it fails because the structure pack does not properly use byte array
Setup Details
Running on Ubuntu 22.04.1 LTS, Python 3.10.6, UHD-4.4
Expected Behavior
sudo ./usrp2_recovery.py --ifc=enp0s9
Opening raw socket on interface: enp0s9
Loading packet with ip address: 192.168.10.2
Sending packet (22 bytes)
Done
Actual Behaviour
sudo ./usrp2_recovery.py --ifc=enp0s9
Opening raw socket on interface: enp0s9
Loading packet with ip address: 192.168.10.2
Traceback (most recent call last):
File "/usr/local/lib/uhd/utils/./usrp2_recovery.py", line 47, in
packet = struct.pack(
struct.error: argument for 's' must be a bytes object
Steps to reproduce the problem
Additional Information
replacing line 52:
IP_RECOVERY_CODE,
with:
bytes(IP_RECOVERY_CODE, 'utf-8'),
Issue Description
when running usrp2_recovery.py it fails because the structure pack does not properly use byte array
Setup Details
Running on Ubuntu 22.04.1 LTS, Python 3.10.6, UHD-4.4
Expected Behavior
sudo ./usrp2_recovery.py --ifc=enp0s9 Opening raw socket on interface: enp0s9 Loading packet with ip address: 192.168.10.2 Sending packet (22 bytes) Done
Actual Behaviour
sudo ./usrp2_recovery.py --ifc=enp0s9 Opening raw socket on interface: enp0s9 Loading packet with ip address: 192.168.10.2 Traceback (most recent call last): File "/usr/local/lib/uhd/utils/./usrp2_recovery.py", line 47, in
packet = struct.pack(
struct.error: argument for 's' must be a bytes object
Steps to reproduce the problem
Additional Information
replacing line 52: IP_RECOVERY_CODE, with: bytes(IP_RECOVERY_CODE, 'utf-8'),
fixes the problem