Page 1 of 1
SLIP Support Request
Posted: Wed Aug 31, 2022 5:46 pm
by thera34
Hello,
Long story short:
SLIP/CSLIP (pre-PPP connections) can be used by some older OSes to connect to Internet and I am wandering if it would be possible to get this option among the PPP/modem/console ones in the OSD for cores who support UART (C64/Minimig/ao486/ST etc) ? And what else would it take except the Linux image and /sbin/uartmode script modifications ?
What I did to get SLIP/CSLIP support (again, thank you @BinaryBond007) :
Linux side - modified /arch/arm/configs/MiSTer_defconfig to include:
Code: Select all
CONFIG_SLIP=y
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLIP_SMART=y
CONFIG_SLIP_MODE_SLIP6=y
After compilation and replacement of Linux image, SSH-ed into MiSTer, and did a trick like "echo 115200 > /tmp/SLIP" then modified the /sbin/uartmode to start slattach instead of pppd
Code: Select all
slip_speed=$(cat /tmp/SLIP)
taskset 1 slattach -p slip -s $slip_speed /dev/ttyS1
ifconfig sl0 $localip pointopoint $remoteip
echo "Starting slip @ $slip_speed BPS..."
On FPGA side, fired up a0486 core, ran ELKS (a minix/Unix variant) and established SLIP connection with the Linux side without issues using its embedded ktcp client.
Now, I know this is a niche stuff for networking supporting cores, but I would like to see it as an option if possible
Re: SLIP Support Request
Posted: Wed Aug 31, 2022 8:32 pm
by Malor
IIRC, SLIP was supplanted fairly quickly by PPP. Are there OSes that have SLIP clients but can't talk PPP at all? Pretty much anything that runs SLIP should be physically capable of PPP, if a software client was written.
Re: SLIP Support Request
Posted: Wed Aug 31, 2022 9:48 pm
by bbond007
Malor wrote: ↑Wed Aug 31, 2022 8:32 pm
IIRC, SLIP was supplanted fairly quickly by PPP. Are there OSes that have SLIP clients but can't talk PPP at all? Pretty much anything that runs SLIP should be physically capable of PPP, if a software client was written.
I know of at least OS/2 2.0 which is the only version that runs (on ao486) with both caches enabled.
thera34 wrote: ↑Wed Aug 31, 2022 5:46 pm And what else would it take except the Linux image and /sbin/uartmode script modifications ?
In addition Main_MiSTer would need to be updated to add a SLIP option for it to appear in the UART OSD along with the other options. That is something I could do if there is interest.
Re: SLIP Support Request
Posted: Thu Sep 01, 2022 1:52 am
by throAU
bbond007 wrote: ↑Wed Aug 31, 2022 9:48 pm
Malor wrote: ↑Wed Aug 31, 2022 8:32 pm
IIRC, SLIP was supplanted fairly quickly by PPP. Are there OSes that have SLIP clients but can't talk PPP at all? Pretty much anything that runs SLIP should be physically capable of PPP, if a software client was written.
I know of at least OS/2 2.0 which is the only version that runs (on ao486) with both caches enabled.
thera34 wrote: ↑Wed Aug 31, 2022 5:46 pm And what else would it take except the Linux image and /sbin/uartmode script modifications ?
In addition Main_MiSTer would need to be updated to add a SLIP option for it to appear in the UART OSD along with the other options. That is something I could do if there is interest.
Wouldn't OS/2 be better served by adding a network adapter to AO486?
edit:
thinking a bridge to the physical adapter on the DE10. no idea how feasible that is, but most OS that support networking/internet for PC support ethernet? Ethernet you can use for accessing local resources on the LAN, too, and get better speed than SLIP/PPP?
Re: SLIP Support Request
Posted: Thu Sep 01, 2022 2:10 am
by kconger
thera34 wrote: ↑Wed Aug 31, 2022 5:46 pm
Hello,
Long story short:
SLIP/CSLIP (pre-PPP connections) can be used by some older OSes to connect to Internet and I am wandering if it would be possible to get this option among the PPP/modem/console ones in the OSD for cores who support UART (C64/Minimig/ao486/ST etc) ? And what else would it take except the Linux image and /sbin/uartmode script modifications ?
What I did to get SLIP/CSLIP support (again, thank you @BinaryBond007) :
Linux side - modified /arch/arm/configs/MiSTer_defconfig to include:
Code: Select all
CONFIG_SLIP=y
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLIP_SMART=y
CONFIG_SLIP_MODE_SLIP6=y
After compilation and replacement of Linux image, SSH-ed into MiSTer, and did a trick like "echo 115200 > /tmp/SLIP" then modified the /sbin/uartmode to start slattach instead of pppd
Code: Select all
slip_speed=$(cat /tmp/SLIP)
taskset 1 slattach -p slip -s $slip_speed /dev/ttyS1
ifconfig sl0 $localip pointopoint $remoteip
echo "Starting slip @ $slip_speed BPS..."
On FPGA side, fired up a0486 core, ran ELKS (a minix/Unix variant) and established SLIP connection with the Linux side without issues using its embedded ktcp client.
Now, I know this is a niche stuff for networking supporting cores, but I would like to see it as an option if possible
I can help with a PR for this as I would also like to see SLIP support.
https://github.com/kconger/Linux-Kernel ... /tree/SLIP
https://github.com/kconger/Main_MiSTer/tree/SLIP
https://github.com/kconger/MidiLink_MiSTer/tree/SLIP
Can others confirm this works? Attached is a new MiSTer binary, kernel, and uartmode script.
Re: SLIP Support Request
Posted: Thu Sep 01, 2022 6:19 am
by thera34
Thank you mate, I will try it after work hours
I am attaching also here the Linux image I compiled yesterday for SLIP/CSLIP support:
throAU wrote: ↑Thu Sep 01, 2022 1:52 am
Wouldn't OS/2 be better served by adding a network adapter to AO486?
Yeah, network adapter would be a nice addition to Minimig/Ao486 cores for sure, but someone has to write it and I am not sure it will fit , as I understood there's no more FPGA space left..
Re: SLIP Support Request
Posted: Sat Nov 26, 2022 8:41 pm
by rampa
Thank you for this patch. I'm finishing a port from pdp2011 (PDP 11) and I need slip for networking on bsd2.11
Re: SLIP Support Request
Posted: Sun Nov 27, 2022 10:00 am
by rampa
Tested and works but.....
1-You are configuring SLIP as a point to point between the mister ethernet IP and the router... So when you connect you loose the default route on the mister... changed in uamode the ifconfig line to :
ifconfig sl0 192.168.4.1 pointopoint 192.168.4.2 up
and it worked... (i can ping and ftp from the fpga bsd box to the mister)
2- There is no nat on the mister kernel. so cannot ping outside of the mister.
One possible approach is to compile SLIRP for the ARM and change uartmode to use slirp instead of pppd and slattach. I used this on the 90's (on a medium size isp and it worked like a charm. It is userspace and provides slip and ppp doing interrnal nat.
https://github.com/kost/slirp
Re: SLIP Support Request
Posted: Sun Nov 27, 2022 10:38 am
by thera34
rampa wrote: ↑Sun Nov 27, 2022 10:00 am
Tested and works but.....
1-You are configuring SLIP as a point to point between the mister ethernet IP and the router... So when you connect you loose the default route on the mister... changed in uamode the ifconfig line to :
ifconfig sl0 192.168.4.1 pointopoint 192.168.4.2 up
No, we configured SLIP as point to point between MiSTer's eth IP ($localip, for example mine is hardcoded .25) and core's IP ( $remoteip, normally .254 if not set otherwise on /media/fat/linux/ppp_options)
See below code:
Code: Select all
if [ ! -f /tmp/uartmode5 ]; then
kill_all
echo "1" >/tmp/uartmode5
(
while true
do
echo In while
localip=$(ifconfig 2>/dev/null | sed -En 's/127.0.0.1//;s/169.254.*//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')
remoteip=$(ifconfig 2>/dev/null | sed -En 's/127.0.0.1//;s/169.254.*//;s/.*inet (addr:)?(([0-9]*\.){2}[0-9]*).*/\2/p').254
if [ -z $localip ]; then
echo cannot get local IP for SLIP link.
localip=0.0.0.0
remoteip=0.0.0.0
else
echo "SLIP link: $localip->$remoteip @$conn_speed"
fi
taskset 1 slattach -p slip -s $conn_speed /dev/ttyS1 &
ifconfig sl0 $localip pointopoint $remoteip
wait $!
[ ! -f /tmp/uartmode5 ] && exit 0
echo respawn slattach
sleep 1
done
) &
fi
Re: SLIP Support Request
Posted: Sun Nov 27, 2022 10:57 am
by rampa
ah, ok.... 254 is my router....
For point to point links, better use another class as they are only useful for routing.
Re: SLIP Support Request
Posted: Sun Nov 27, 2022 7:55 pm
by rampa
got routing....
changed the .254 to another IP.
added a static arp to the ip and the mac address from mister : arp -s 10.72.69.166 02:03:04:05:06:07
and permited routing on mister: sysctl net.ipv4.ip_forward=1
Re: SLIP Support Request
Posted: Sun Dec 11, 2022 3:58 pm
by kconger
rampa wrote: ↑Sun Nov 27, 2022 7:55 pm
got routing....
changed the .254 to another IP.
added a static arp to the ip and the mac address from mister : arp -s 10.72.69.166 02:03:04:05:06:07
and permited routing on mister: sysctl net.ipv4.ip_forward=1
@rampa Congrats on the pdp2011 release! Maybe it's time to try to submit my PR. Did you need to make any additional changes to what we worked out? I've only tested with ELKS operating system on AO486.
Re: SLIP Support Request
Posted: Sun Dec 11, 2022 4:52 pm
by rampa
can browse the internet with AO486 "as-is"?
i needed some changes, but may be my old idea of slip.
PPP is doing "proxyarp" so the machine is announcing the slip IP with the arp address of the ethernet. so i changed two things on the script. The 254 address (as it was my router) and added a static arp entry with the slip machine IP and the mister ethernet address.
If you can browse the internet without this. should be OK (and i have to investigate)
Thank you very much!
Re: SLIP Support Request
Posted: Sun Dec 11, 2022 4:55 pm
by rampa
Code: Select all
# Add an entry to this system's ARP [Address Resolution Protocol]
# table with the IP address of the peer and the Ethernet address of this
# system.
proxyarp
excerpt of /media/fat/linux/ppp-options