[Oberon] FPGA - nRF24L01 `RPI Net' server

Tomas Kral thomas.kral at email.cz
Fri May 25 10:20:57 CEST 2018


On Fri, 25 May 2018 07:21:50 +0200
Jörg <joerg.straube at iaeth.ch> wrote:

> Try to understand the meaning of head1.valid.
> Jörg

Hi Joerg,

This bit I hope I understood already. I admit, I missed the idea of
states, which I hope I understand now as well.

EDIT

I resolved by adding extra ACK, after senddata(); in
serve(); as the Net.ReceiveHead() really waits for either `seqno' or
`timeout'. When 255 timeout header is left in head1 after SND, it
confuses next file operation.

(* SND *)
F := Files.Old(FileName);
IF F # NIL THEN
  SetPartner(Id); SendData(F); (*TK*) Send(ACK, 0,dmy); 
ELSE 
  Send(NAK, 0, dmy); Texts.Write(W, "~")
END ;
reply(0)


After time request
  53   0 180  94
  53   0 180  94
  53   0 180  94
  53   0 180  94
  71   4 180  94 valid
 time set

I got this 
Test.Mod receiving  
  71   4 180  94
  71   4 180  94
  71   4 180  94
  71   4 180  94
  71   4 180  94
  71   4 180  94
   0 512 180  94 valid seqno 0
   1 128 180  94 valid seqno 1
   1 128 180  94
  16   0 180  94 valid ACK received
 640
  
Instead of this
Test.Mod receiving  
  71   4 180  94
  71   4 180  94
  71   4 180  94
  71   4 180  94
  71   4 180  94
  71   4 180  94
   0 512 180  94 valid seqno 0
   1 128 180  94 valid seqno 1
   1 128 180  94
   1 128 180  94
   1 128 180  94
   1 128 180  94
   1 128 180  94
   1 128 180  94
   1 128 180  94
   1 128 180  94
   1 128 180  94
   ... many iteration follow
 255 128 180  94  until timeout
   640


-- 
Tomas Kral <thomas.kral at email.cz>


More information about the Oberon mailing list