Internet and Linux Shell for Amiga and ao486

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Sat Apr 07, 2018 3:41 pm

I've just released update for Linux/MiSTer/Minimig/ao486.

Some info has been published here: https://github.com/MiSTer-devel/Main_Mi ... rted-cores

So, now we have internet connection for 2 cores.
I'm not a fan of internet on Amiga, but the big advantage from this connection is to access Amiga disk from PC through FTP. Connection is just 115Kbits, it's slow. But it's better than nothing. At least can exchange with some small files and edit configs comfortably on PC.

Didn't try internet on ao486 yet. Is there MS-DOS TCP/IP stack with PPP and FTPD?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Sat Apr 07, 2018 4:15 pm

Some instructions how to install AmiTCP v4.3:
1) Install with following options:
- choose nullmodem provider
- choose PPP device
- Fixed Connection, Dynamic IP
- choose not to use bootp
- Do not enter neither local nor remote IP - it will be automatically detected.
- Do not enter gateway IP.
- Use static IP for DNS. Enter universal google DNS: 8.8.8.8 and 8.8.4.4
- Do NOT choose autostart of AmiTCP!
2) do not restart yet.
3) edit bin/startnet:
find and comment out (or remove) the line AmiTCP:bin/login -f
find AmiTCP:bin/bootpconfig $LOOPBACK {DEBUG} line and on the next line comment-out If NOT Warn and whole else clause near the end.

so, the result should look like this:

Code: Select all

.key DEBUG/S,SRV/S
.bra {
.ket }
;
; "SRV" if servers are used, _nothing_ otherwise
.def SRV   SRV
;
; AmiTCP/IP 4.3 startnet script
;
; Copyright © 1996 AmiTCP/IP Group,
;                  NSDi - Network Solutions Development Inc., Finland
;                  All rights reserved.
;
; *NOTE*  YOU SHOULD NOT NEED TO EDIT ANYTHING BELOW. IF YOU NEED TO START
; *NOTE*  UTILITIES, DO IT IN THE AmiTCP:db/User-Startnet.
; *NOTE*  YOU CAN STOP THESE UTILITIES IN AmiTCP:db/User-Stopnet.
;
; Set the failat level so that the errors can be handled by the script
FailAt 21

If NOT Exists AmiTCP:db/provider.conf
  Echo AmiTCP/IP is not configured
  Echo Starting the configuration tool...
  Stack 20000  ; Installer needs this
  Run >nil: <nil: AmiTCP:bin/Installer SCRIPT "AmiTCP:Config AmiTCP" APPNAME AmiTCP/IP MINUSER AVERAGE
  Quit 20
EndIf

Version bsdsocket.library >nil:
If NOT Warn
  Echo AmiTCP/IP is already running
  Echo Exiting...
  Quit 20
EndIf

Cpu Check 68020 >nil:
If NOT Warn
  If Exists AmiTCP:AmiTCP.020
    If X EQ "X{DEBUG}"
      Run >nil: <nil: AmiTCP:AmiTCP.020 {DEBUG}
    Else
      Run AmiTCP:AmiTCP.020 {DEBUG}
    EndIf
    Skip started
  EndIf
EndIf
If X EQ "X{DEBUG}"
  Run >nil: <nil: AmiTCP:AmiTCP {DEBUG}
Else
  Run AmiTCP:AmiTCP {DEBUG}
EndIf
Lab started
WaitForPort AMITCP
If NOT Warn
  ; Log in with the default user name (ENV:LOGNAME)
  ;AmiTCP:bin/login -f
  ; Configure AmiTCP, configure lo0 if using servers
  If X EQ "X{SRV}"
    Set LOOPBACK ""
  Else
    Set LOOPBACK LOOPBACK
  EndIf
  AmiTCP:bin/bootpconfig $LOOPBACK {DEBUG}
  ;If NOT Warn
    ;
    ; Mount TCP:
    ;
    Assign TCP: Exists >NIL:
    IF Warn
      Mount TCP: from AmiTCP:devs/Inet-Mountlist
    EndIf
    ;
    ; Start inetd if requested
    ;
    If NOT X EQ "X{SRV}"
      If X EQ "X{DEBUG}"
        Run <NIL: >NIL: AmiTCP:bin/inetd
      Else
        Run AmiTCP:bin/inetd {DEBUG}
      EndIf
    EndIf
    ;
    ; Start utilities in AmiTCP:db/User-Startnet
    ;
    If Exists AmiTCP:db/User-Startnet
      Execute AmiTCP:db/User-Startnet
    EndIf
    ;
    ; Successfull end
    ;
    Echo AmiTCP/IP 4.3 is now on-line. Your host name is $HOSTNAME.
  ;Else
  ;  Echo Interface {IFACE} configuration failed!
  ;  Echo Stopping AmiTCP
  ;  AmiTCP:bin/stopnet FLUSH
  ;EndIf
Else
  Echo AmiTCP couldn't be started!
EndIf

; EOF

4) restart the Amiga

Now navigate to AmiTCP folder and click on "Start AmiTCP". It should work.
Although bootp is not selected while installation, start script still uses bootp and eventually fails, that's why some lines need to be commented-out.
Basically startnet script need to be rewritten. I've saw some scripts on internet, but i don't know how to make ppp0 online. online ppp0 command always fails for me. There is some magic inside bootpconfig, so i couldn't avoid usage of this binary.

NegSol
Captain Atari
Captain Atari
Posts: 215
Joined: Sat Dec 05, 2015 9:22 pm

Re: Internet and Linux Shell for Amiga and ao486

Postby NegSol » Sat Apr 07, 2018 4:31 pm

Excellent! Great news!

As for the DOS side I have no clue. in former DOS times IPX and netbios was all the rage. Never seen a TCP/Stack on DOS (not that I would not like to see it though).

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Sat Apr 07, 2018 5:21 pm

What i actually would like to see is just FTPD for DOS to access the disks from PC. Internet is not really required.
Actually PPPD supports IPX protocol, but i don't know if it possible to marry it with TCP/IP on the linux to get access to filesystem.

Another way, is to route nullmodem through linux->TCP->PC. Like a virtual nullmodem tunnel. Is there such thing?

JackZielke
Atariator
Atariator
Posts: 19
Joined: Sun Mar 25, 2018 8:11 am

Re: Internet and Linux Shell for Amiga and ao486

Postby JackZielke » Sat Apr 07, 2018 7:16 pm

This page has directions for getting DOS online via null modem.
http://matejhorvat.si/en/dos/pppwin.htm

I have not tried them yet. If no one else beats me to it, I will see if I can get my DOS image online. I think you just need to look at steps 3 and 4.

Unrelated: Is there a way to remove a floppy image in ao486 without resetting? I can swap disks but have not figured out how to eject a disk and leave the floppy drive empty.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Sat Apr 07, 2018 11:07 pm

Press "backspace" while choosing the disk image.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Sun Apr 08, 2018 2:01 am

dosppp seems working.It detects IP addresses and reports OK at the end and stays resident.
mTCP unfortunately cannot find the packet driver. I don't know if it's setting problem or anything else non-compatible is involved like BIOS or even some CPU features.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Sun Apr 08, 2018 2:30 am

update: arachne browser works using the same dosppp packet driver.
So, there should be something i'm missing in mTCP settings. Packet int is correct 0x60 - same as reported by dosppp.
I don't see what else should i do to marry dosppp with mTCP.

JackZielke
Atariator
Atariator
Posts: 19
Joined: Sun Mar 25, 2018 8:11 am

Re: Internet and Linux Shell for Amiga and ao486

Postby JackZielke » Sun Apr 08, 2018 8:26 pm

I have a color terminal working but I do not have the ASCII box symbols working. AKA htop looks great but mc looks like garbage.

In MSCUSTOM.INI I changed:
set speed 115200
set flow rts/cts
set term type ansi-bbs
set term bytesize 8
set term color 20 37 40
set term under 20 33 47

In /etc/profile I set
TERM=xterm

I think the Linux character set needs to be set to something other than it is to fix the line art problems but I have not found the right mix yet. I did try setting LC_ALL=C and that did not fix it. I think this is an unicode vs utf8 problem, maybe.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Mon Apr 09, 2018 2:43 am

what terminal app you are using?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Mon Apr 09, 2018 2:47 am

Finally got FTP server working. I had to compile it my self :)
Will post later after more tests.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Mon Apr 09, 2018 4:32 am

added the script on linux side, so ppp_options won't require any editing - IPs will be assigned to PPP link automatically.

JackZielke
Atariator
Atariator
Posts: 19
Joined: Sun Mar 25, 2018 8:11 am

Re: Internet and Linux Shell for Amiga and ao486

Postby JackZielke » Mon Apr 09, 2018 11:41 am

Thanks for the backspace floppy information!

I was testing with kermit. What I have read is that I need a non-utf8 locale. Looking at /usr/lib/locale/locale-archive I think there are only two locales: en_US.utf8 and ru_RU.utf8. I tried NCURSES_NO_UTF8_ACS=1 and that didn't help.

https://groups.google.com/forum/#!msg/alt.os.linux.slackware/Quw80cQlcck/Zsyhf4wb6aMJ
The No_UTF8 variable did not work for them either but setting LANG=en_US fixed it. I have not added new locales to test yet.

BBond007
Atariator
Atariator
Posts: 23
Joined: Wed Feb 28, 2018 3:23 am

Re: Internet and Linux Shell for Amiga and ao486

Postby BBond007 » Fri Apr 13, 2018 4:08 am

Sorgelig wrote:Finally got FTP server working. I had to compile it my self :)
Will post later after more tests.


Sorgelig,

Thank you so much for this awesome feature. I got it working today using RoadShow TCP/IP stack.

I'm super impressed. Used AWEB to download a "SimpleFTP" client from http://www.aminet.net :)

For basic html sites like Aminet, it works well.

To get DNS working (with RoadShow) this is what I did:
ed DEVS:Internet/name_resolution
nameserver=8.8.8.8

Thanks!

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Fri Apr 13, 2018 10:18 am

Roadshow looks very easy at the first look. But later you realize you need to find what to edit. I didn't find where to enter DNS in Roadshow while AmiTCP asks about DNS upon install.
AmiTCP looks more cryptic at install phase, but once installed it's almost instantly ready except that bootp quirk. What is good with AmiTCP - it's de-facto standard for Amiga - i find many apps requiring AmiTCP. I like that AmiTCP comes with its own ftpd, so you get FTP access to Amiga - actually ftpd is all i need from TCP/IP on Amiga ;)

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Fri Apr 13, 2018 10:21 am

I've added archive with DOS FPTD in ao486 repository. Just unpack it and run in DOS. FTP server accepts any user name and any password.

Btw, i couldn't make PPP work under Win95. I've saw several pages about PPP over direct serial connection, but failed to make it work.
If someone will find a working instruction - let me know.
I've tried Win95 first edition, but i think it's better to test on OSR2 which comes with IE.

kolla
Captain Atari
Captain Atari
Posts: 159
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Internet and Linux Shell for Amiga and ao486

Postby kolla » Thu May 10, 2018 5:53 pm

I don't know how interesting this is for other people... I just copied over telnetd and xinetd with friends from a pi to the Linux side (and I had to replace the /bin/login binary with a symlink to busybox), and now I can telnet into the linux side from the Amiga, and from there ssh to the big bad world ;)

Next is to get rshd working, so I can use the rsh from the AmigaShell and scripts to mess around on the Linux side... woop woop 8)
-- kolla

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Thu May 10, 2018 6:22 pm

I don't understand the purpose.
You don't need to copy anything. Just use terminal app on Amiga and connect to Linux side. In OSD just switch UART to Console mode.

kolla
Captain Atari
Captain Atari
Posts: 159
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Internet and Linux Shell for Amiga and ao486

Postby kolla » Thu May 10, 2018 6:54 pm

Sorgelig wrote:I don't understand the purpose.
You don't need to copy anything. Just use terminal app on Amiga and connect to Linux side. In OSD just switch UART to Console mode.


Well, I said that this probably isn't interesting for other people... I want much more than just a console on the Linux :)

* dual-stack on the linux side and a web proxy (TinyProxy) allows Amiga side to reach IPv6 (only) web/ftp services (such as my own Aminet mirror)
* rshd allows me to really remote control _anything_ on the Linux side directly from Amiga, create Amiga GUI that send wpa_supplicant commands etc.
* rshd and passphrase free ssh keyfile to allow direct access to my remote systems from the Amiga, using the Linux as rsh/ssh jumphost
* ... so that I for example can use DirectoryOpus Magellan listers to remote control my vhosts in the cloud, k8s clusters etc.

I typical set up PPP so that Linux side is 10.99.0.1 and Amiga side is 10.99.0.2, so that that connection exists regardless of what the LAN situation on the Linux side is, I have zero use for the Amiga to be "on the LAN", I use the Amiga as the "frontend" or Desktop Environment for the system as a whole.
-- kolla

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Fri May 11, 2018 1:23 am

By just switching UART to Console mode, you also connect to Linux from Amiga through terminal.
And you can do whatever you want on Linux from Amiga. You also can connect to whatever on internet being in linux console from Amiga.
I believe you are doing redundant steps while everything is already there. UART console mode is designed exactly for connection from core to Linux without using PPP layer.

BBond007
Atariator
Atariator
Posts: 23
Joined: Wed Feb 28, 2018 3:23 am

Re: Internet and Linux Shell for Amiga and ao486

Postby BBond007 » Fri May 11, 2018 6:03 am

Sorgelig wrote:By just switching UART to Console mode, you also connect to Linux from Amiga through terminal.
And you can do whatever you want on Linux from Amiga. You also can connect to whatever on internet being in linux console from Amiga.
I believe you are doing redundant steps while everything is already there. UART console mode is designed exactly for connection from core to Linux without using PPP layer.


Would it use a lot more resources to make two serial devices, one for PPP and one for console and no more menu options?

Thanks

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Fri May 11, 2018 8:49 am

There are only 2 UARTs in chip. One is used to USB Console, another is for communication between HPS and core.

kolla
Captain Atari
Captain Atari
Posts: 159
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Internet and Linux Shell for Amiga and ao486

Postby kolla » Fri May 11, 2018 11:20 pm

Sorgelig wrote:UART console mode is designed exactly for connection from core to Linux without using PPP layer.


Sure, but that's not what I want to do. I only use the console mode for debugging purposes, but you can always use DigNet (http://aminet.net/package/util/libs/DigNet) or rxserial (http://aminet.net/package/util/rexx/rxserial) to send commands to the Linux side from the Amiga directly over the serial port, but you are limited to one session only, and it can be quite icky-tricky.

By using PPP (and having the TCP stack and the PPP implementation handle all the retransmitting and other uglinesses of serial port transfers), I have _multiple_ independent logins from the Amiga to the Linux side, and send over commands directly from AmigaShell (or AmigaShell scripts, or AREXX) using rsh, and catch the return data from stdout. I can also implement my own protocols between the Amiga and the Linux side, and let Amiga programs communicate with the Linux side for example over TCP: or whatever. And all while this is going on, I can also have multiple terminal logins (typically with AmTelnet) to the Linux side, and from there have interactive ssh sessions out to the world.

https://kolla.egnyte.com/dl/YG40vuZXWM
Last edited by kolla on Fri May 11, 2018 11:37 pm, edited 1 time in total.
-- kolla

kolla
Captain Atari
Captain Atari
Posts: 159
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Internet and Linux Shell for Amiga and ao486

Postby kolla » Fri May 11, 2018 11:30 pm

BBond007 wrote:Would it use a lot more resources to make two serial devices, one for PPP and one for console and no more menu options?


Better keep the UART for serial console, and rather implement something ethernet alike between the Amiga and the Linux side.
-- kolla

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2011
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Internet and Linux Shell for Amiga and ao486

Postby Sorgelig » Sat May 12, 2018 12:38 am

If there is other higher speed and relatively easy in hardware device for Amiga providing internet connection then i can try to implement.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 2 guests