This PyQt code sends to Arduino payload binary information prepended by two bytes. 1st byte is function mode and 2nd byte is payload length. This code is able to receive binary information, to add CRC at the end or request a CRC calculation from Arduino.
It is attached an example inside loraIno library for Arduino.
You can run PyQt program on a Linux Terminal (it has been tested on Debian Jessie):
$ ./lora06.py /dev/ttyUSB0
In another Linux Terminal or another computer (it has been tested on Debian Jessie):
$ ./lora06.py /dev/ttyUSB1