03-30-2025, 12:31 AM
Hello folks,
I've been struggling for a few days on this. I'm trying to use 2 LoRa modules on 2 orange pi boards with qb64pe programs on them.
So far, i enabled UART 5, and wired the devices to the correct pins, and 'cutecom' (terminal program) can chat back and forth.
Now in QB64pe, i open the port like this:
Shell "stty -F /dev/ttyS5 9600 raw -echo -icanon -iexten -opost -ixon -ixoff -crtscts cs8 -parenb -cstopb min 1 time 0"
Open "/dev/ttyS5" For Binary As #1
Here's my issue, is have 'a' dimensioned as _unsigned _byte, and whenever i use 'get #1,, a', it will hang until it can receive data from the buffer. (but it does recieve the bytes one by one).
also, EOF(1) always equals zero, so i'm unable to use it to see if data should be read.
if i use GET #1 ,, d$ (d$ being just a random undefined string), it won't read anything.
if i use GET #1 ,, d ( d being just a random undefined variable ) , i get something crazy like 4.09884E+22
so the only way I can seem to read correctly is using a _byte variable, but i haven't figured out how to tell if theres data to read, and it hangs if there isn't.
If anyone has ideas thanks in advance!
I've been struggling for a few days on this. I'm trying to use 2 LoRa modules on 2 orange pi boards with qb64pe programs on them.
So far, i enabled UART 5, and wired the devices to the correct pins, and 'cutecom' (terminal program) can chat back and forth.
Now in QB64pe, i open the port like this:
Shell "stty -F /dev/ttyS5 9600 raw -echo -icanon -iexten -opost -ixon -ixoff -crtscts cs8 -parenb -cstopb min 1 time 0"
Open "/dev/ttyS5" For Binary As #1
Here's my issue, is have 'a' dimensioned as _unsigned _byte, and whenever i use 'get #1,, a', it will hang until it can receive data from the buffer. (but it does recieve the bytes one by one).
also, EOF(1) always equals zero, so i'm unable to use it to see if data should be read.
if i use GET #1 ,, d$ (d$ being just a random undefined string), it won't read anything.
if i use GET #1 ,, d ( d being just a random undefined variable ) , i get something crazy like 4.09884E+22
so the only way I can seem to read correctly is using a _byte variable, but i haven't figured out how to tell if theres data to read, and it hangs if there isn't.
If anyone has ideas thanks in advance!

