Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started 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
-
lrzsz.tcz added to piCore-7.x repos (armv6/armv7)
-
Thanks alot. I am unable to find it though...
search tce gives no result.
-
tc@box:~$ tce
tce-ab - Tiny Core Extension: Application Browser
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.
-
Thanks once again. Still no luck. Will try again tomorrow :)
Using "picoreplayer" for the rpi2
Extension not found!
-
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
-
v2.04
Update kernel to 4.1.20.
Updated piCore to 7.1 beta3.
But it seems if it is working todag :)
-
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.
-
What do you mean 'do not seem to work'?
-
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.
-
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"
-
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.
-
No with my restricted knowledge, I am unable to make this work.
Have to use another distro for this specific job.
-
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.
-
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.
ls -l /dev/ttyAMA0
And when piping with sudo, isn't so easy.
Could be done with.
sudo sh -c 'lsz -X fpga.bin > /dev/ttyAMA0 < /dev/ttyAMA0'
-
Yes sudo gives same result.
tc@piCorePlayer:~$ ls -l /dev/ttyAMA0
crw-rw---- 1 root staff 204, 64 Feb 16 08:53 /dev/ttyAMA0
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.
-
Serial port on RPi3 is /dev/ttyS0 on other boards it is /dev/ttyAMA0
-
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:
sudo nano /opt/bootlocal.sh
From:
/usr/sbin/startserialtty &
To:
# /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.
-
Hi and thanks for your effort.
I have rpi 2
No reference to startserialgetty in bootlocal.sh
#!/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)
-
I don't know if picoreplayer uses the original way of starting getty in the initttab file.
You could look at
sudo cat /etc/inittab
And maybe remark that line with your serial terminal starting...
sudo nano /etc/inittab
Saying something like this.
From:
ttyAMA0::respawn:/sbin/getty -L 115200 /dev/ttyAMA0 vt100
To:
# ttyAMA0::respawn:/sbin/getty -L 115200 /dev/ttyAMA0 vt100
-
Just checked.
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
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.