Unable to send and receive images between 2 Raspberry connected to Zigbee via UART.
-
@mrjj I tried, still only get 190.
16 sizeeeee:
32 sizeeeee:
64 sizeeeee:
64 sizeeeee:
14 sizeeeee: -
@Rika
Good testing.
So even it says
qDebug()<<ba.size()<<"size_send:";
1000 size_send
you only get
5 lines of
16 sizeeeee:
32 sizeeeee:
64 sizeeeee:
64 sizeeeee:
14 sizeeeee:
? -
@mrjj Sometimes 4 lines, sometimes 7 lines, but the total is 190 bytes. With 500-A, received only 230
-
@Rika
So it seems data get cut over some size.What Os is running on the boards ?
Also maybe Zigbee has some sort of max transfer size ?
-
well, lets narrow it down,
write returns a quint64 with the actual number of bytes written to the serialport, what does that return ?void serial::on_pushButton_2_clicked() { static QByteArray ba; ba.fill('A', 1000); if(serialPort->isOpen()==true){ quint64 send = serialPort->write(ba); qDebug()<<send << " of" << ba.size()<<"size_send:"; } }
-
well, lets narrow it down,
write returns a quint64 with the actual number of bytes written to the serialport, what does that return ?void serial::on_pushButton_2_clicked() { static QByteArray ba; ba.fill('A', 1000); if(serialPort->isOpen()==true){ quint64 send = serialPort->write(ba); qDebug()<<send << " of" << ba.size()<<"size_send:"; } }
-
@Rika well,
to make sure your 2nd application is not simply very late in its creation/startup process, try clicking the button a 2nd time, see if something changes :DAfter that, time for a serial port listing device, to check what is actually transferred
-
@Rika well,
to make sure your 2nd application is not simply very late in its creation/startup process, try clicking the button a 2nd time, see if something changes :DAfter that, time for a serial port listing device, to check what is actually transferred
@J-Hilk
When i goggle Zigbee , i do see max payload mentioned.
Do you think that could be the cause here ?
I never used Zigbee so not sure if its even an issue. -
@J-Hilk
When i goggle Zigbee , i do see max payload mentioned.
Do you think that could be the cause here ?
I never used Zigbee so not sure if its even an issue.@mrjj uh, I should read the opening post more clearly,
You're right, that is most likely the issue, ZigBee is a low data transfer protocol and from what my quick google search told me, limited to about 100 - 200 bytes, which fits exactly here
for a quick and dirty test, we could split the test byte array and send it delayed, that should work
void serial::on_pushButton_2_clicked() { static QByteArray ba; int index(0); ba.fill('A', 1000); if(serialPort->isOpen()==true){ QTimer *t = new QTimer(); auto sendSection = [=,&index]()->void{ serialPort->write(ba.data() + index * 100, 100); index ++; if(index == 10) t->deleteLater(); }; QObject::connect(t, &QTimer::timeout, sendSection); t->start(1000); // quint64 send = serialPort->write(ba); qDebug()<< ba.size()<<"size_send:"; } }