Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: bambadoo on March 29, 2016, 03:07:02 PM

Title: Add lrzsz to the repo?
Post by: bambadoo on March 29, 2016, 03:07:02 PM
Hi, minicom works fine. However there are additional package that need to be installed to make xmodem, ymodem etc. work. That package is called lrzsz.
Is it possible to add it to the repo?

Sincerely
Title: Re: Add lrzsz to the repo?
Post by: bmarkus on March 29, 2016, 11:12:59 PM
lrzsz.tcz added to piCore-7.x repos (armv6/armv7)
Title: Re: Add lrzsz to the repo?
Post by: bambadoo on March 30, 2016, 01:16:51 AM
Thanks alot. I am unable to find it though...
search tce gives no result.
Title: Re: Add lrzsz to the repo?
Post by: bmarkus on March 30, 2016, 01:21:19 AM
tc@box:~$ tce
tce-ab - Tiny Core Extension: Application Browser

Code: [Select]
S)earch P)rovides K)eywords or Q)uit:
Enter starting chars of desired extension, e.g. abi: lrzsz

tce - Tiny Core Extension browser

         1. lrzsz-doc.tcz
         2. lrzsz.tcz

Enter selection ( 1 - 2 ) or (q)uit:

It is in the 7.x main repo. Repo mirrors updated usually once in a day so if you are using a mirror, it will appear later.
Title: Re: Add lrzsz to the repo?
Post by: bambadoo on March 30, 2016, 01:09:32 PM
Thanks once again. Still no luck. Will try again tomorrow :)
Using "picoreplayer" for the rpi2
Quote
Extension not found!
Title: Re: Add lrzsz to the repo?
Post by: bmarkus on March 30, 2016, 02:05:10 PM
Ah, you did not tell it is not piCore you are using nor which piCore it based on. Probably it is running on piCore 6.x
Title: Re: Add lrzsz to the repo?
Post by: bambadoo on March 30, 2016, 11:06:09 PM
v2.04
Update kernel to 4.1.20.
Updated piCore to 7.1 beta3.

But it seems if it is working todag :)
Title: Re: Add lrzsz to the repo?
Post by: bambadoo on March 31, 2016, 08:28:35 AM
Yes the download and install seems to work. The package itself (xmodem -1k) do not seem to work for me. I really dont know what the problem is. Will try to dig into it.
Title: Re: Add lrzsz to the repo?
Post by: bmarkus on March 31, 2016, 09:47:02 AM
What do you mean 'do not seem to work'?
Title: Re: Add lrzsz to the repo?
Post by: bambadoo on March 31, 2016, 11:58:23 AM
Unable to upload files via minicom to my fpga based dac. It just doesnt start the upload. That need xmodem protocol to make it work. When using a different distro (i.e. archphile) it works like a charm. Excactly the same setup and config for minicom..
I am not sure what causes this.
Title: Re: Add lrzsz to the repo?
Post by: patrikg on March 31, 2016, 03:26:42 PM
Do you connect to fpga via minicom via tcp/ip or via some serial transfer ??

lsz -X fpga.bin > /dev/ttyAMA0 < /dev/ttyAMA0

Is this something you recognize ?

Maybe the program have some problems with permissions to the device ??
You may list what group the serial port are assign to.
And add that group to the user that execute the program. Like "tc"
Title: Re: Add lrzsz to the repo?
Post by: bambadoo on March 31, 2016, 10:53:19 PM
Yes it is with serial
/dev/ttyAMA0
No problem connecting to the device and typing commands etc. (soekris dac , dam1021), but transferring files from a mount I have made on the rpi is a no go.
Title: Re: Add lrzsz to the repo?
Post by: bambadoo on April 04, 2016, 01:02:20 AM
No with my restricted knowledge,  I am unable to make this work.
Have to use another distro for this specific job.
Title: Re: Add lrzsz to the repo?
Post by: bambadoo on February 15, 2017, 01:22:50 PM
Hi again. Sorry for bringing this up again. I have still no luck using this with a serial program.
Minicom and lrzsz is installed.
Not able to transfer files.
Just did a fresh install with another distro (raspbian based). Excact same setup with serial interface and minicom setup.
Transferring files went as a breeze. With picore nothing happens.
I really have no clue what could be the reason.
Title: Re: Add lrzsz to the repo?
Post by: patrikg on February 15, 2017, 02:35:37 PM
Have you tried to do it with sudo ?
Could you do, so we can see what rights the device have... maybe the lrzsz don't have correct rights to the serial device.

Code: (bash) [Select]
ls -l /dev/ttyAMA0
And when piping with sudo, isn't so easy.
Could be done with.

Code: (bash) [Select]
sudo sh -c 'lsz -X fpga.bin > /dev/ttyAMA0 < /dev/ttyAMA0'
Title: Re: Add lrzsz to the repo?
Post by: bambadoo on February 15, 2017, 11:54:20 PM
Yes sudo gives same result.

Quote
tc@piCorePlayer:~$ ls -l /dev/ttyAMA0
crw-rw----    1 root     staff     204,  64 Feb 16 08:53 /dev/ttyAMA0


Quote
tc@piCorePlayer:~$ sudo sh -c 'lsz -X -k 1021filt_106diyaudio.skr > /dev/ttyAMA0 < /dev/ttyAMA0'
Sending 1021filt_106diyaudio.skr, 560 blocks: Give your local XMODEM receive command now.
Xmodem sectors/kbytes sent:   0/ 0kRetry 0: Timeout on sector ACK
Doesnt help I am afraid.
Title: Re: Add lrzsz to the repo?
Post by: bmarkus on February 16, 2017, 12:26:20 AM
Serial port on RPi3 is /dev/ttyS0 on other boards it is /dev/ttyAMA0
Title: Re: Add lrzsz to the repo?
Post by: patrikg on February 16, 2017, 12:52:29 AM
And the serial maybe occupied with the console.
In picore the startserialtty starts the serial console.

You may remove/remark the startserialtty from the file:

Code: (bash) [Select]
sudo nano /opt/bootlocal.sh
From:
Code: (bash) [Select]
/usr/sbin/startserialtty &
To:
Code: (bash) [Select]
# /usr/sbin/startserialtty &

And one more thing... is the serial port the uart initialized with the correct things like baudrate.
Can't find any settings of that in the lrzsz, it has to be done before running lrzsz.
Title: Re: Add lrzsz to the repo?
Post by: bambadoo on February 16, 2017, 03:19:38 AM
Hi and thanks for your effort.
I have rpi 2
No reference to startserialgetty in bootlocal.sh
Quote
#!/bin/sh
# put other system startup commands here
GREEN="$(echo -e '\033[1;32m')"
echo
echo "${GREEN}Running bootlocal.sh..."
#pCPstart------
/home/tc/www/cgi-bin/do_rebootstuff.sh 2>&1 | tee -a /var/log/pcp_boot.log
#pCPstop------
Regarding baudrate etc. I have set the right parameters in minicom serial programme (115200 8n1 - HW and Flow control =0)



Title: Re: Add lrzsz to the repo?
Post by: patrikg on February 16, 2017, 10:56:27 AM
I don't know if picoreplayer uses the original way of starting getty in the initttab file.
You could look at
Code: (bash) [Select]
sudo cat /etc/inittab
And maybe remark that line with your serial terminal starting...

Code: (bash) [Select]
sudo nano /etc/inittab

Saying something like this.
From:
Code: (bash) [Select]
ttyAMA0::respawn:/sbin/getty -L 115200 /dev/ttyAMA0 vt100

To:
Code: (bash) [Select]
# ttyAMA0::respawn:/sbin/getty -L 115200 /dev/ttyAMA0 vt100

Title: Re: Add lrzsz to the repo?
Post by: bambadoo on February 16, 2017, 11:20:43 AM
Just checked.
Quote
tc@piCorePlayer:/usr/bin$ sudo cat /etc/inittab
# /etc/inittab: init configuration for busybox init.
# Boot-time system configuration/initialization script.
#
::sysinit:/etc/init.d/rcS

# /sbin/getty respawn shell invocations for selected ttys.
tty1::respawn:/sbin/getty -nl /sbin/autologin 38400 tty1
#tty2::respawn:/sbin/getty 38400 tty2
#tty3::respawn:/sbin/getty 38400 tty3
#tty4::askfirst:/sbin/getty 38400 tty4
#tty5::askfirst:/sbin/getty 38400 tty5
#tty6::askfirst:/sbin/getty 38400 tty6

# Stuff to do when restarting the init
# process, or before rebooting.
::restart:/etc/init.d/rc.shutdown
::restart:/sbin/init
::ctrlaltdel:/sbin/reboot
::shutdown:/etc/init.d/rc.shutdown

However - maybe this is a clue?
Installing lrzsz from the repo should install the ymodem, xmodem and zmoden protocols
in
/usr/bin/sx
/usr/bin/rx
/usr/bin/zx

and so on.
However these "files" are not present. Could they be installed somewhere else by default in tiny core?

EDIT: Voila!!
In this lrzsz install these are installed in, and are called something else
Quote
usr/local/bin/lrx
usr/local/bin/lrb
usr/local/bin/lsx
usr/local/bin/lsb
usr/local/bin/lsz
usr/local/bin/lrz

Edited in minicom config and everything works.
So easy and still so difficult.