Page 1 of 2

Emulator Networking

Posted: Sat May 09, 2020 2:15 pm
by Derek_Stewart
Hi,

If I have 2 occurrences of QL emulators running: QPC2 or SMSQmulator or Q-emulator or UQLX on the same host machine.

Is there a way to virtual network each emulator?

I had thought of using TCP/IP to identify each QL emulator instance.

Re: Emulator Networking

Posted: Sat May 09, 2020 7:28 pm
by stephen_usher
Well, unless all of those emulators implement something in the same way then they won't be able talk to each other.

Of course, what could be done as the QL-NET is already a CDMA network protocol is to just encapsulate QL-NET packets within an Ethernet broadcast packet and let the emulators listen to the network for QL-NET packets.

Re: Emulator Networking

Posted: Sat May 09, 2020 8:27 pm
by tofro
stephen_usher wrote:Well, unless all of those emulators implement something in the same way then they won't be able talk to each other.

Of course, what could be done as the QL-NET is already a CDMA network protocol is to just encapsulate QL-NET packets within an Ethernet broadcast packet and let the emulators listen to the network for QL-NET packets.
But only if not somebody would already have invented this... );
(Fortunately, Martin has left the broadcast bit out as that really isn't a good idea)

Re: Emulator Networking

Posted: Sat May 09, 2020 9:38 pm
by Peter
stephen_usher wrote:Of course, what could be done as the QL-NET is already a CDMA network protocol is to just encapsulate QL-NET packets within an Ethernet broadcast packet and let the emulators listen to the network for QL-NET packets.
That would mean to turn the emulators into something similar to ethernet network sniffers. On the normal socket level they wouldn't even see the packets. The requirement for low-level ethernet access would exclude SMSQmulator, and even for QPC or UQLX it's not a nice thing.

Re: Emulator Networking

Posted: Sat May 09, 2020 10:23 pm
by stephen_usher
You can have multicast and broadcast packets in user mode. No need to go into promiscuous mode. If in doubt choose a UDP port and standardise but use a broadcast address.

Re: Emulator Networking

Posted: Sun May 10, 2020 11:31 am
by Derek_Stewart
Hi,

Thank you for the information, I am not sure what you are talking about.

But I downloaded IPDRIVER by Martin Head, loaded in "Ipdriver_cde" two emulators on the same computer.

QPC2 4.05 (Server) SMSQ/E v3.36
NET_START 1
FSERVE

Qemulator Minvera v1.98
NET_START 2

entering DIR n1_win1_ brought the directory of the QPC2 WIN1 on Qemulator in Minvera. All very easy with Martin's excellent netdriver.

I tried this on SMSQmulator as well, which worked well.

I assume that if I used NET_START "<ip_address>" on each emulator on different computers on the same network, then access to the QL server would available.

Re: Emulator Networking

Posted: Sun May 10, 2020 12:04 pm
by tofro
stephen_usher wrote:You can have multicast and broadcast packets in user mode. No need to go into promiscuous mode. If in doubt choose a UDP port and standardise but use a broadcast address.
Stephen,

Networking support and exposed host API in current QL emulators is somewhat limited. Dilwyn and Martin (the IP heroes in QL ;) ) have worked on this and found a number of "not supported" items that severely limit what you can and cannot do with the networking stacks.
  • UDP support is very rudimentary. Access to ports from QL applications is limited, UDP servers are hard, if not impossible to properly implement on the QDOS end
  • Multicast addresses can, in principle, be used, but join or leave is basically impossible (which renders the whole thing a bit academic)
What seems to work best and very reliable (and also with more or less all emulators that expose the host network stack) is TCP streams.

Tobias

Re: Emulator Networking

Posted: Sun May 10, 2020 5:08 pm
by Giorgio Garabello
If you want to hurry you can simply use two copies of Black Phoenix, the software is already installed and configured

http://www.hunggartorino.it/ql/discover ... k-phoenix/

Image

Re: Emulator Networking

Posted: Mon May 11, 2020 10:51 am
by Martin_Head
Derek_Stewart wrote:Hi,

Thank you for the information, I am not sure what you are talking about.

But I downloaded IPDRIVER by Martin Head, loaded in "Ipdriver_cde" two emulators on the same computer.

QPC2 4.05 (Server) SMSQ/E v3.36
NET_START 1
FSERVE

Qemulator Minvera v1.98
NET_START 2

entering DIR n1_win1_ brought the directory of the QPC2 WIN1 on Qemulator in Minvera. All very easy with Martin's excellent netdriver.

I tried this on SMSQmulator as well, which worked well.

I assume that if I used NET_START "<ip_address>" on each emulator on different computers on the same network, then access to the QL server would available.
Be careful with trying to use FSERVE on Qemulator. Unless it's been fixed in the recent version (not got round to testing it). Qemulator will seem to hang. It does not actually hang, it just sits waiting for connections, with the QL side stopped. So you cannot multitask, or break out.

If you use the IPRouter program you can join the 'external' and 'internal' networks together.

Re: Emulator Networking

Posted: Mon May 11, 2020 9:50 pm
by Derek_Stewart
Martin_Head wrote: Be careful with trying to use FSERVE on Qemulator. Unless it's been fixed in the recent version (not got round to testing it). Qemulator will seem to hang. It does not actually hang, it just sits waiting for connections, with the QL side stopped. So you cannot multitask, or break out.

If you use the IPRouter program you can join the 'external' and 'internal' networks together.
The FSERVE server worked okay on Qemulator v3.3 and Minerva v1.98, connected to QPC2 and SMSQmulator.

This is all I was after, but I will try the IPRouter to connect an emulator on Windows and Linux.
Giorgio Garabello wrote:If you want to hurry you can simply use two copies of Black Phoenix.
I am sure that OQTopus is agood aplication, but I prefer configure the network access by using the appropriate commands.