command = bytes.fromhex(command)
AttributeError: type object ‘str’ has no attribute ‘fromhex’
When using python to run the code, I encountered this problem on the terminal, which was a headache, so I analyzed it and found that the root cause of the error was the python version problem.
Just upgrade python3. Don't know the reason.