Hi, `NRF' now generally works between Oberon and RPI. RPI to Oberon transfers twice as fast to the opposite direction. I thought, perhaps in one direction packets are retransmitted, but has proved I sent each packet once in both directions. Could it be on account of different file subsystems speeds among platforms, then? This is an exercise I used, showing packet retries when ACK is missed, each packet forced to send twice. Net.ReceiveData() VAR ... cnt: INTEGER BEGIN ... cnt := 0; IF (head1.typ = seqno) & ODD(cnt) THEN ... ELSE END; INC(cnt); ... END ReceiveData; valid header 65 15 92 238 Test.Mod sending 16 0 92 238 512 17 0 92 238 512 17 0 92 238 128 18 0 92 238 128 640 -- Tomas Kral <thomas.kral@email.cz>
On Fri, 25 May 2018 14:22:27 +0200 Tomas Kral <thomas.kral@email.cz> wrote:
RPI to Oberon transfers twice as fast to the opposite direction.
Actually I measured a couple of transfers. Net.SendFiles RPI NRF.Mod ~ NRF.Mod receiving 6167 6 Net.ReceiveFiles RPI NRF.Mod ~ NRF.Mod sending 6167 19 Numbers are file size, seconds to complete. Sending takes three times longer??? -- Tomas Kral <thomas.kral@email.cz>
Hi Tomas,
Net.SendFiles RPI NRF.Mod ~ NRF.Mod receiving 6167 6
Net.ReceiveFiles RPI NRF.Mod ~ NRF.Mod sending 6167 19
Numbers are file size, seconds to complete.
Sending takes three times longer???
I'm certainly confused by these logs, which are presumably Pi and Oberon logs interleaved. What I infer is that the Oberon command Net.SendFiles RPI NRF.Mod ~ sends the file NRF.Mod to the Pi and results in a log entry on the Pi of NRF.Mod receiving 6167 6 i.e. the file is 6K bytes and it takes 6 seconds; and conversely the Oberon command Net.ReceiveFiles RPI NRF.Mod ~ receives the file NRF.Mod from the Pi and results in a log entry on the Pi of NRF.Mod sending 6167 19 i.e. it takes 19 seconds. If so, then I would ask, what is the Pi doing in the other 13 seconds? In other words, expand the logging on the Pi to show the various times or timeouts, for each phase of the protocol as described in ch. 10 of Project Oberon. (As a reminder, don't post the entire logs; but you could maybe show accumulated total time waiting in each part of the protocol, for each transfer). HTH Paul
On Fri, 25 May 2018 19:34:19 +0100 Paul Reed <paulreed@paddedcell.com> wrote:
I'm certainly confused by these logs, which are presumably Pi and Oberon logs interleaved. What I infer is that the Oberon command
Paul, I am sorry for the confusion, I grouped lines incorrectly. All logged on Oberon. Net.SendFiles RPI NRF.Mod ~ NRF.Mod sending 6167 bytes 19 secs Net.ReceiveFiles RPI NRF.Mod ~ NRF.Mod receiving 6167 bytes 6 secs I will look in the Ch.10 and try to time some of the protocol parts, as suggested. -- Tomas Kral <thomas.kral@email.cz>
Tomas Just for my curiosty: How did you implement Net.StartServer on RPI side? Jörg
Am 25.05.2018 um 22:05 schrieb Tomas Kral <thomas.kral@email.cz>:
On Fri, 25 May 2018 19:34:19 +0100 Paul Reed <paulreed@paddedcell.com> wrote:
I'm certainly confused by these logs, which are presumably Pi and Oberon logs interleaved. What I infer is that the Oberon command
Paul, I am sorry for the confusion, I grouped lines incorrectly. All logged on Oberon.
Net.SendFiles RPI NRF.Mod ~ NRF.Mod sending 6167 bytes 19 secs
Net.ReceiveFiles RPI NRF.Mod ~ NRF.Mod receiving 6167 bytes 6 secs
I will look in the Ch.10 and try to time some of the protocol parts, as suggested.
-- Tomas Kral <thomas.kral@email.cz> -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
On Fri, 25 May 2018 22:55:46 +0200 Jörg <joerg.straube@iaeth.ch> wrote:
Tomas Just for my curiosty: How did you implement Net.StartServer on RPI side? Jörg
Hi Joerg, Currently I have no specific commands to start, stop the server. I just run it from command line $ sudo ./net, and pressig Ctrl-C does quit. This way it could be installed on RPI as a system service. int main( int argc, char** argv ) { setup(); printf("Output below [Ctrl-C to exit]: \n"); while( true ) { receivehead(&head1); ... } } I will publish the code when ready. As I have modified `RF24' lib, I could try contacting the author to include my changes, or fork the lib into subset functionality for Risc-V (FPGA) Oberon. -- Tomas Kral <thomas.kral@email.cz>
On Sat, 26 May 2018 08:30:50 +0100 Paul Reed <paulreed@paddedcell.com> wrote:
To be clear: Niklaus Wirth's RISC processors are not RISC-V.
Ah, this is my another weak point. My system greets me `Oberon-V5', while the language compiler is `Oberon-07'. Do I simply confuse one for the other? I thought it is 5th implementation of the processor, 7th revision of the language. -- Tomas Kral <thomas.kral@email.cz>
To be clear: Niklaus Wirth's RISC processors are not RISC-V.
Ah, this is my another weak point. My system greets me `Oberon-V5', while the language compiler is `Oberon-07'.... I thought it is 5th implementation of the processor, 7th revision of the language.
Right. But now google "RISC-V".
My system greets me `Oberon-V5',...I thought it is 5th implementation of the processor...
Oberon-V5 means the fifth version of the Oberon operating system by Prof. Wirth in 2013. RISC5 is the 5th version of the RISC processor, see https://www.inf.ethz.ch/personal/wirth/FPGA-relatedWork/index.html Sorry for the noise, if I was awake I would have got all those clarifications in one email. Paul
Thomas There are a lot of people confused by a) versions of the Oberon system (=collection of modules building a complete operating system) and b) versions of the Oberon programming language. Principally, a) and b) are independent of one another. However the evolution of the system goes kind of hand in hand with the evolution of the language. Language System 1985 Oberon V1/V2 (on Ceres) 1991 Oberon-2 System3 (aka Native Oberon aka ETH Oberon) 1992 Oberon-2 V4 (aka LinzOberon) 1996 ActiveOberon A2 (aka AOS aka Bluebottle, Zonnon) 2007 Oberon-07 V5 (aka ProjectOberon) br Jörg
Am 26.05.2018 um 09:41 schrieb Tomas Kral <thomas.kral@email.cz>:
On Sat, 26 May 2018 08:30:50 +0100 Paul Reed <paulreed@paddedcell.com> wrote:
To be clear: Niklaus Wirth's RISC processors are not RISC-V.
Ah, this is my another weak point. My system greets me `Oberon-V5', while the language compiler is `Oberon-07'.
Do I simply confuse one for the other?
I thought it is 5th implementation of the processor, 7th revision of the language.
-- Tomas Kral <thomas.kral@email.cz> -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Hi Joerg, Slight amendment:
Language System 1985 Oberon V1/V2 (on Ceres) 1991 Oberon-2 System3 (aka Native Oberon aka ETH Oberon) 1992 Oberon-2 V4 (aka LinzOberon) 1996 ActiveOberon A2 (aka AOS aka Bluebottle, Zonnon)
2007 Oberon-07 (ARM) - 2013 Oberon-07 (RISC) V5 (aka Project Oberon, 2013 Edition) Cheers, Paul
On Fri, 25 May 2018 22:05:46 +0200 Tomas Kral <thomas.kral@email.cz> wrote:
I will look in the Ch.10 and try to time some of the protocol parts, as suggested.
I really need to reread Ch.10, but as `happy go lucky', I changed a few loop timings, and now I got: NRF.Mod sending 6158 6 NRF.Mod receiving 6158 6 Which is 1KB/s transfer rate, is it good? Can we in theory get even better? In SCC.Mod, I added these timings, Wait = 50; Wait0 = 5; Wait1 = 1000; SubSnd uses Wait0, ReceiveHead uses Wait1, SendPacket uses Wait. Conversely on RPI, I use delay(WAIT/*=50*/) for subsnd(); I have also extended delay/retry Oberon side WriteReg1(4, 0*010H + 15); (*SETUP_RETR delay + retry count*) While on RPI, best I got for radio.setRetries(10,15); On RPI side, I use for file access k = fread(&buf, 1, PAK_SIZE, f); k = fwrite(&rx.dat, 1, head1.len, f); as I initially thought that fputc(), fgetc() perform slower in loops. -- Tomas Kral <thomas.kral@email.cz>
Hi Thomas In ideal conditions without any retransmits Net.SendFiles would need 1.5 seconds to transmit your NRF.Mod (6158 bytes) As you need about four times as long, there must be many retransmits going on under the hood. Did you move the channel out of the way of possible Wifi in your environment? Try setting the channel to something bigger than 86 —> WriteReg1(RFCH, 86); Did you reduce the power level? As I assume the distance between your rPi and your Oberon board is roughly 1 meter, try set the power level to -18 dBm. —> WriteReg1(RFSETUP, 0); Jörg
Am 27.05.2018 um 11:01 schrieb Tomas Kral <thomas.kral@email.cz>:
On Fri, 25 May 2018 22:05:46 +0200 Tomas Kral <thomas.kral@email.cz> wrote:
I will look in the Ch.10 and try to time some of the protocol parts, as suggested.
I really need to reread Ch.10, but as `happy go lucky', I changed a few loop timings, and now I got:
NRF.Mod sending 6158 6 NRF.Mod receiving 6158 6
Which is 1KB/s transfer rate, is it good? Can we in theory get even better?
In SCC.Mod, I added these timings, Wait = 50; Wait0 = 5; Wait1 = 1000;
SubSnd uses Wait0, ReceiveHead uses Wait1, SendPacket uses Wait.
Conversely on RPI, I use delay(WAIT/*=50*/) for subsnd();
I have also extended delay/retry Oberon side WriteReg1(4, 0*010H + 15); (*SETUP_RETR delay + retry count*)
While on RPI, best I got for radio.setRetries(10,15);
On RPI side, I use for file access k = fread(&buf, 1, PAK_SIZE, f); k = fwrite(&rx.dat, 1, head1.len, f); as I initially thought that fputc(), fgetc() perform slower in loops.
-- Tomas Kral <thomas.kral@email.cz> -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
On Wed, 30 May 2018 07:24:39 +0200 Jörg <joerg.straube@iaeth.ch> wrote:
In ideal conditions without any retransmits Net.SendFiles would need 1.5 seconds to transmit your NRF.Mod (6158 bytes)
Good, this is an ideal target, I may one day get close to.
As you need about four times as long, there must be many retransmits going on under the hood. Did you move the channel out of the way of possible Wifi in your environment? Try setting the channel to something bigger than 86 —> WriteReg1(RFCH, 86);
True, I have quite a few retransmits, with or without decoupling caps. Also tried various other power supplies. Will try to play with channels once again.
rPi and your Oberon board is roughly 1 meter, try set the power level to -18 dBm. —> WriteReg1(RFSETUP, 0);
In fact 10cm, that was my first discovery, with full power, 0dBm, 30% ping was the usual standard, now I get 98-99%. Also `SCC.SubSnd()' delay has some influence on it. I have added these lines to `SCC.Start()', WriteReg1(4, 0*010H + 15); (*SETUP_RETR delay + retry count*) WriteReg1(6, 03H); (*RF_SETUP <= 1Mb rate, 0dBm wide range, -12dBm short reach*) Will try -18dBm again, last time noticeable improvement was the stepdown from 0dBm to -12dBm. -- Tomas Kral <thomas.kral@email.cz>
Hi Thomas ARC and SCC.SendTries try to solve the same issue but on different levels: - ARC retransmits the 32 bytes on chip level. - SendTries repeats sending those 32 bytes on driver (SCC) level. With your change of ARC=15 and SendTries (most probably still at 50), SubSnd tries to send those 32 bytes 750 times until it gives up. 750 is perhaps a little high! Try to count how many retransmits on chip level and how many retries on driver level are needed until the packets went thru. br Jörg -----Original Message----- From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of Tomas Kral Sent: Wednesday, May 30, 2018 9:30 AM To: oberon@lists.inf.ethz.ch Subject: Re: [Oberon] FPGA - nRF24L01 `RPI Net' server On Wed, 30 May 2018 07:24:39 +0200 Jörg <joerg.straube@iaeth.ch> wrote:
In ideal conditions without any retransmits Net.SendFiles would need 1.5 seconds to transmit your NRF.Mod (6158 bytes)
Good, this is an ideal target, I may one day get close to.
As you need about four times as long, there must be many retransmits going on under the hood. Did you move the channel out of the way of possible Wifi in your environment? Try setting the channel to something bigger than 86 —> WriteReg1(RFCH, 86);
True, I have quite a few retransmits, with or without decoupling caps. Also tried various other power supplies. Will try to play with channels once again.
rPi and your Oberon board is roughly 1 meter, try set the power level to -18 dBm. —> WriteReg1(RFSETUP, 0);
In fact 10cm, that was my first discovery, with full power, 0dBm, 30% ping was the usual standard, now I get 98-99%. Also `SCC.SubSnd()' delay has some influence on it. I have added these lines to `SCC.Start()', WriteReg1(4, 0*010H + 15); (*SETUP_RETR delay + retry count*) WriteReg1(6, 03H); (*RF_SETUP <= 1Mb rate, 0dBm wide range, -12dBm short reach*) Will try -18dBm again, last time noticeable improvement was the stepdown from 0dBm to -12dBm. -- Tomas Kral <thomas.kral@email.cz> -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
On Wed, 30 May 2018 11:23:15 +0200 Jörg <joerg.straube@iaeth.ch> wrote:
With your change of ARC=15 and SendTries (most probably still at 50), SubSnd tries to send those 32 bytes 750 times until it gives up. 750 is perhaps a little high!
Hi, I have done new tests with PI3, and vs old PI1 I now have `0' retransmits. Also test file NRF.Mod (6158 bytes) now gets across under 1 sec. Cannot explain why is that, but hopefully the experience with PI1 led me to a better coding? -- Tomas Kral <thomas.kral@email.cz>
participants (4)
-
Jörg -
Jörg Straube -
Paul Reed -
Tomas Kral