After 2 days of fiddling, I finally gave up....
Building a kind of challenge response system with Asyncstreams.
The Server/Host part is a simple Python script on my Linux PC. The connection is OK.
The android asks the server for a 'challenge'. I do see that the server sends one.
that part is working...DUHH
I can not though, use the newdata buffer data in my response..because the buffer is empty. The host did send a challenge...but the buffer is empty.
The second time I ask for a challenge, the newdata buffer gives me the data from the previous challenge
The third time...the buffer gives me the data from the second challenge...and so on.
It looks like the buffer is only filled (or usable) after the whole sub has finished.
I tried to split the challenge and response in two service modules hoping that the newdata would be filled, with the current challenge, but no.
I build in a timer to wait, and than read the buffer...but still only the data from the previous challenge.
What should i do to, kind of, release the buffer and use the newdata of the current challenge?
Thanks
Building a kind of challenge response system with Asyncstreams.
The Server/Host part is a simple Python script on my Linux PC. The connection is OK.
The android asks the server for a 'challenge'. I do see that the server sends one.
that part is working...DUHH
I can not though, use the newdata buffer data in my response..because the buffer is empty. The host did send a challenge...but the buffer is empty.
The second time I ask for a challenge, the newdata buffer gives me the data from the previous challenge
The third time...the buffer gives me the data from the second challenge...and so on.
It looks like the buffer is only filled (or usable) after the whole sub has finished.
I tried to split the challenge and response in two service modules hoping that the newdata would be filled, with the current challenge, but no.
I build in a timer to wait, and than read the buffer...but still only the data from the previous challenge.
What should i do to, kind of, release the buffer and use the newdata of the current challenge?
Thanks