connecting (getting IP configuration)and when looking into journalctl is see:
Jun 08 21:07:57 ubuntu kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail, reason -52 Jun 08 21:07:57 ubuntu kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail, reason -52 Jun 08 21:07:57 ubuntu kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail, reason -52 Jun 08 21:07:57 ubuntu kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail, reason -52 Jun 08 21:07:59 ubuntu kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail, reason -52 Jun 08 21:07:59 ubuntu kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd095 fail, reason -52 Jun 08 21:07:59 ubuntu kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd099 fail, reason -52 Jun 08 21:07:59 ubuntu kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd09d fail, reason -52 Jun 08 21:07:59 ubuntu kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd0a1 fail, reason -52 Jun 08 21:07:59 ubuntu kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd0a5 fail, reason -52which i think might be related. Full log: https://pastebin.com/GrV29ZR4
python import time import json HID_DEVICE_PATH = "dev/hidg0" def send_keys(keys): report =[0x00,0x00, keys,0x00,0x00,0x00] with open (HID_DEVICE_PATH, 'wb') as fd: fd.write(bytearray(report)) time.sleep(0.01) fd.write(bytearray[0x00] * 8) def main(): f = open("keys.json") data = json.load(f) for i in data: send_keys(i) f.close() if __name__ == "__name__": main()when i plug it into a usb socket. currently i have usb-gadget setup, in /etc/systemd/system/usb-gadget.service i have the script
[Unit] Description=Run Python script on USB gadget connection After=network.target [Service] ExecStart=/usr/bin/python3 /admin/home/start_keys.py WorkingDirectory=/admin/home StandardOutput=inherit StandardError=inherit Restart=always User=admin [Install] WantedBy=multi-user.targetwhich i found and modified for my own use, the python script returns no errors, but i keep getting the error