[Oberon] Oberon RS232 - file exchange with Linux / OLR for RPI

thomas.kral at email.cz thomas.kral at email.cz
Sun Apr 3 18:47:16 CEST 2016


Peter,

Thanks so much, I will test and let you know.

Meanwhile I managed to transfer the whole Bitmaps.Mod right from the shell,

# longer files >255 could be split into blocks
$ split -b255 Bitmaps.Mod

# with $FF length byte inserted to the start of each
$ for f in [a-z]*; do echo -ne \\xff | cat - $f > $f.1; done

# length byte of the last block <255 must be adjusted by hand

# send REC and file name terminated with NULL!
$ echo -ne \\x21'Bitmaps.Mod'\\0 > /dev/ttyUSB1

# copy all blocks in a loop
for f in *.1; do echo $f; cp $f /dev/ttyUSB1; done

Note after each packet sent, ACK should be waited for, this may not be easy to do in shell.

Tomas

---------- Původní zpráva ----------
Od: Peter Matthias 
Komu: thomas.kral at email.cz
Datum: 3. 4. 2016 17:31:09
Předmět: Fwd: Re: [Oberon] Oberon RS232 - file exchange with Linux / OLR for
 RPI

Hi Thomas,

since default parameters seem to work for you, I made a q&d implementation.
You will first have to open /dev/ttyUSB1 to get the port No.

Regards,
	Peter

-------- Weitergeleitete Nachricht --------
Betreff: Re: [Oberon] Oberon RS232 - file exchange with Linux / OLR for RPI
Datum: Sun, 3 Apr 2016 15:41:03 +0200
Von: thomas.kral at email.cz
Antwort an: ETH Oberon and related systems 
An: Peter Matthias 
Kopie (CC): ETH Oberon and related systems 

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 at 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 at 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 at email.cz [mailto:thomas.kral at email.cz]
>> Sent: Sunday, 3 April 2016 4:49 PM
>> To: chris at 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 at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
>
--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
https://lists.inf.ethz.ch/mailman/listinfo/oberon


More information about the Oberon mailing list