Oberon RS232 - file exchange with Linux
Hi, Can anyone please suggest how to exchange files with Linux over serial Line? I guess PCLink task running at Oberon end is needed for that. My serial line is connected to Oberon as device /dev/ttyUSB1. I read serial speed is 9600 baud, but what parity or stop bits? PCLink implements a simple protocol, SND, REC, each packet is acknowledged with ACK. Just thinking of using simple tty terminal commands.. $ stty -F /dev/ttyUSB1 9600 cs8 clocal cstopb raw crtscts $ echo SND'My.Mod' > /dev/ttyUSB1 $ cp block[0] /dev/ttyUSB1 ... cp block[n] /dev/ttyUSB1 Many thanks Tomas -- Tomas Kral <thomas.kral@email.cz>
8-N-1 is pretty much standard these days. -----Original Message----- From: Tomas Kral Sent: Friday, April 01, 2016 2:53 PM To: oberon@lists.inf.ethz.ch Subject: [Oberon] Oberon RS232 - file exchange with Linux Hi, Can anyone please suggest how to exchange files with Linux over serial Line? I guess PCLink task running at Oberon end is needed for that. My serial line is connected to Oberon as device /dev/ttyUSB1. I read serial speed is 9600 baud, but what parity or stop bits? PCLink implements a simple protocol, SND, REC, each packet is acknowledged with ACK. Just thinking of using simple tty terminal commands.. $ stty -F /dev/ttyUSB1 9600 cs8 clocal cstopb raw crtscts $ echo SND'My.Mod' > /dev/ttyUSB1 $ cp block[0] /dev/ttyUSB1 ... cp block[n] /dev/ttyUSB1 Many thanks Tomas -- 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 --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Hi, I tried the following and it works, 8 bits, no parity, 1 stop, no handshake, no modem $ sudo stty -F /dev/ttyUSB1 19200 cs8 -crtscts -clocal -cread $ echo -ne \\x20\\x20\\x20\\x20\\x20 > /dev/ttyUSB1 $ cat /dev/ttyUSB1 > dump $ hd dump 00000000 10 10 10 10 10 |.....| 00000005 Five REQs sent, five ACKs received, so basic LOOP test works. I was also hinted by Chris to use ORC.Mod, that is part of the project and is suited to connect with RISC to exchange files. I have compiled it under LNO (OLR for RPI), when sending a test file, ORC.Send Test.txt , I got .. after timeout 'connection not open' Thanks for help so far Tomas ---------- Původní zpráva ---------- Od: John R. Strohm Komu: ETH Oberon and related systems Datum: 2. 4. 2016 0:44:54 Předmět: Re: [Oberon] Oberon RS232 - file exchange with Linux 8-N-1 is pretty much standard these days. -----Original Message----- From: Tomas Kral Sent: Friday, April 01, 2016 2:53 PM To: oberon@lists.inf.ethz.ch Subject: [Oberon] Oberon RS232 - file exchange with Linux Hi, Can anyone please suggest how to exchange files with Linux over serial Line? I guess PCLink task running at Oberon end is needed for that. My serial line is connected to Oberon as device /dev/ttyUSB1. I read serial speed is 9600 baud, but what parity or stop bits? PCLink implements a simple protocol, SND, REC, each packet is acknowledged with ACK. Just thinking of using simple tty terminal commands.. $ stty -F /dev/ttyUSB1 9600 cs8 clocal cstopb raw crtscts $ echo SND'My.Mod' > /dev/ttyUSB1 $ cp block[0] /dev/ttyUSB1 ... cp block[n] /dev/ttyUSB1 Many thanks Tomas -- Tomas Kral -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-----Original Message----- From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of thomas.kral@email.cz Sent: Sunday, 3 April 2016 1:58 AM To: ETH Oberon and related systems Subject: Re: [Oberon] Oberon RS232 - file exchange with Linux
I was also hinted by Chris to use ORC.Mod, that is part of the project and is suited to connect with RISC to exchange files.
I have compiled it under LNO (OLR for RPI), when sending a test file,
ORC.Send Test.txt ,
I got .. after timeout
'connection not open'
You need to start (i.e. PCLink1.Run) the PCLink1 background task on the RISC5 system sometime after you start it up before you attempt to send / receive files on the PC. Chris
Hi Christopher, Yes, I see the server has to run first on RISC5, i.e. PCLink1.Run. On LNO - OLR for RPI, I got ... OCR.Open - open V24, error=2 OCR.Send Test.txt - connection not open OCR.TestReq - I got 0 (zero reply) Cannot tell why, as tty on RPI gets REQ ACKnowledged, so the link works in therms of wiring. Please see my earlier post. Many thanks so far. Tomas ---------- Původní zpráva ---------- Od: Chris Burrows Komu: 'ETH Oberon and related systems' Datum: 3. 4. 2016 0:46:14 Předmět: Re: [Oberon] Oberon RS232 - file exchange with Linux
-----Original Message----- From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of thomas.kral@email.cz Sent: Sunday, 3 April 2016 1:58 AM To: ETH Oberon and related systems Subject: Re: [Oberon] Oberon RS232 - file exchange with Linux
I was also hinted by Chris to use ORC.Mod, that is part of the project and is suited to connect with RISC to exchange files.
I have compiled it under LNO (OLR for RPI), when sending a test file,
ORC.Send Test.txt ,
I got .. after timeout
'connection not open'
You need to start (i.e. PCLink1.Run) the PCLink1 background task on the RISC5 system sometime after you start it up before you attempt to send / receive files on the PC. Chris -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-----Original Message----- From: thomas.kral@email.cz [mailto:thomas.kral@email.cz] Sent: Sunday, 3 April 2016 4:49 PM To: chris@cfbsoftware.com; ETH Oberon and related systems Subject: Re: [Oberon] Oberon RS232 - file exchange with Linux
On LNO - OLR for RPI, I got ...
OCR.Open - open V24, error=2 OCR.Send Test.txt - connection not open OCR.TestReq - I got 0 (zero reply)
Look up error 2 in the source code of your Linux version of V24.Mod. In the Windows version of V24.Mod the CONST error definitions include: NoSuchPort* = 2; If that is the same for you, check which port you are using in ORC. Make sure it corresponds to the RS232 port on your PC that you have connected to the Pepino board. Regards, Chris CFB Software http://www.astrobe.com/RISC5
Chris, Thank you, this helps. In V24.Mod I can see port number is defined as CONST portno = 1 but also as pno = 1 I tried recompiling with other values, same thing. On RPI as on Pepino, serial ports are configured over USB channels. I power Pepino from RPI using uUSB cable, it carries the data link as well. /dev/ttyUSB0 - configured as COM1 /dev/ttyUSB1 - configured as COM2 Changing the port number to 2 does not help. Also I noticed OLR provides two modules: V24.Mod and OLR.V24.Mod - portable, there is also ConfigV24.Mod. It seems ports are hooked to IRQs in nonportable version assuming x86 platform? I am putting Peter Matthias in cc, in hope he may be of help as far as OLR goes. So the question might be, how to enable serial ports in OLR/RPI ports? Many thanks so far Tomas ---------- Původní zpráva ---------- Od: Chris Burrows Komu: ETH Oberon and related systems Datum: 3. 4. 2016 9:52:51 Předmět: Re: [Oberon] Oberon RS232 - file exchange with Linux
-----Original Message----- From: thomas.kral@email.cz [mailto:thomas.kral@email.cz] Sent: Sunday, 3 April 2016 4:49 PM To: chris@cfbsoftware.com; ETH Oberon and related systems Subject: Re: [Oberon] Oberon RS232 - file exchange with Linux
On LNO - OLR for RPI, I got ...
OCR.Open - open V24, error=2 OCR.Send Test.txt - connection not open OCR.TestReq - I got 0 (zero reply)
Look up error 2 in the source code of your Linux version of V24.Mod. In the Windows version of V24.Mod the CONST error definitions include: NoSuchPort* = 2; If that is the same for you, check which port you are using in ORC. Make sure it corresponds to the RS232 port on your PC that you have connected to the Pepino board. Regards, Chris CFB Software http://www.astrobe.com/RISC5 -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Hi Tomas, I was only following this thread half way. Turns out, you want to connect something via V24 to OLR. Well, V24 like Centronics and network only are dummy modules needed to compile other Modules. So you currently have to transfer files via Linux. Peter Am 03.04.2016 um 10:49 schrieb thomas.kral@email.cz:
Chris,
Thank you, this helps.
In V24.Mod I can see port number is defined as CONST
portno = 1 but also as pno = 1
I tried recompiling with other values, same thing.
On RPI as on Pepino, serial ports are configured over USB channels. I power Pepino from RPI using uUSB cable, it carries the data link as well.
/dev/ttyUSB0 - configured as COM1 /dev/ttyUSB1 - configured as COM2
Changing the port number to 2 does not help.
Also I noticed OLR provides two modules: V24.Mod and OLR.V24.Mod - portable, there is also ConfigV24.Mod.
It seems ports are hooked to IRQs in nonportable version assuming x86 platform?
I am putting Peter Matthias in cc, in hope he may be of help as far as OLR goes. So the question might be, how to enable serial ports in OLR/RPI ports?
Many thanks so far Tomas
---------- Původní zpráva ---------- Od: Chris Burrows Komu: ETH Oberon and related systems Datum: 3. 4. 2016 9:52:51 Předmět: Re: [Oberon] Oberon RS232 - file exchange with Linux
-----Original Message----- From: thomas.kral@email.cz [mailto:thomas.kral@email.cz] Sent: Sunday, 3 April 2016 4:49 PM To: chris@cfbsoftware.com; ETH Oberon and related systems Subject: Re: [Oberon] Oberon RS232 - file exchange with Linux
On LNO - OLR for RPI, I got ...
OCR.Open - open V24, error=2 OCR.Send Test.txt - connection not open OCR.TestReq - I got 0 (zero reply)
Look up error 2 in the source code of your Linux version of V24.Mod. In the Windows version of V24.Mod the CONST error definitions include:
NoSuchPort* = 2;
If that is the same for you, check which port you are using in ORC. Make sure it corresponds to the RS232 port on your PC that you have connected to the Pepino board.
Regards, Chris
CFB Software http://www.astrobe.com/RISC5
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Peter, Thanks for explaining now I see. I have RISC5 (FPGA Project Oberon 2013) connected to RPI running OLR. I wanted to exchange files using PCLink1 task at RISC5 end with ORC master/client on RPI end, as ORC is part of the project. Meanwhile I managed my 1st file exchange right from Linux shell, file is <255 bytes in length = 1 block. It took me a very long time to discover that name is NULL terminated, I was putting leading length byte in front first. # send REC and file name terminated with NULL! $ echo -ne \\x21'Test.txt'\\0 > /dev/ttyUSB1 # copy one block <255 over line $ cp Test.txt /dev/ttyUSB1 On Oberon screen I got .. receiving Test.txt done So far so good -:) Peter, is there a way to compile in modules for OLR/RPI to support /dev/ttyUSBn Could you please advise? This would allow to run ORC master client, which really is the way to exchange files and also boot RISC5 over RS232 as documented in the project. Many thanks so far Tomas ---------- Původní zpráva ---------- Od: Peter Matthias Komu: thomas.kral@email.cz, ETH Oberon and related systems Datum: 3. 4. 2016 14:56:46 Předmět: Re: [Oberon] Oberon RS232 - file exchange with Linux / OLR for RPI Hi Tomas, I was only following this thread half way. Turns out, you want to connect something via V24 to OLR. Well, V24 like Centronics and network only are dummy modules needed to compile other Modules. So you currently have to transfer files via Linux. Peter Am 03.04.2016 um 10:49 schrieb thomas.kral@email.cz:
Chris,
Thank you, this helps.
In V24.Mod I can see port number is defined as CONST
portno = 1 but also as pno = 1
I tried recompiling with other values, same thing.
On RPI as on Pepino, serial ports are configured over USB channels. I power Pepino from RPI using uUSB cable, it carries the data link as well.
/dev/ttyUSB0 - configured as COM1 /dev/ttyUSB1 - configured as COM2
Changing the port number to 2 does not help.
Also I noticed OLR provides two modules: V24.Mod and OLR.V24.Mod - portable, there is also ConfigV24.Mod.
It seems ports are hooked to IRQs in nonportable version assuming x86 platform?
I am putting Peter Matthias in cc, in hope he may be of help as far as OLR goes. So the question might be, how to enable serial ports in OLR/RPI ports?
Many thanks so far Tomas
---------- Původní zpráva ---------- Od: Chris Burrows Komu: ETH Oberon and related systems Datum: 3. 4. 2016 9:52:51 Předmět: Re: [Oberon] Oberon RS232 - file exchange with Linux
-----Original Message----- From: thomas.kral@email.cz [mailto:thomas.kral@email.cz] Sent: Sunday, 3 April 2016 4:49 PM To: chris@cfbsoftware.com; ETH Oberon and related systems Subject: Re: [Oberon] Oberon RS232 - file exchange with Linux
On LNO - OLR for RPI, I got ...
OCR.Open - open V24, error=2 OCR.Send Test.txt - connection not open OCR.TestReq - I got 0 (zero reply)
Look up error 2 in the source code of your Linux version of V24.Mod. In the Windows version of V24.Mod the CONST error definitions include:
NoSuchPort* = 2;
If that is the same for you, check which port you are using in ORC. Make sure it corresponds to the RS232 port on your PC that you have connected to the Pepino board.
Regards, Chris
CFB Software http://www.astrobe.com/RISC5
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
participants (5)
-
Chris Burrows -
John R. Strohm -
Peter Matthias -
thomas.kral@email.cz -
Tomas Kral