QL to PC network

A place to discuss general QL issues.
gbejniet
ROM Dongle
Posts: 21
Joined: Sun Feb 02, 2020 10:21 pm

Re: QL to PC network

Post by gbejniet »

martyn_hill wrote:There is no reason why a native PC app couldn't be written to allow at least simple file-transfer between QL and PC over the QL network using the QLUB. An 'exercise for the reader', as they say - and I understand that another forum member has devised such an app in Python...
Just seen this - I'm happy to share a very scrappy bit of Python if desired, although I've already been porting it to C and didn't want to do anything that could potentially get in the way of Martyn's work on this by creating "expectations".

But, yes, also agree that this device is the answer to your question (and it was dead simple to build).


gbejniet
ROM Dongle
Posts: 21
Joined: Sun Feb 02, 2020 10:21 pm

Re: QL to PC network

Post by gbejniet »

OK I'm relenting here and attaching said Python. It uses pySerial and sends a file with source and destination specified (and timing profile).

Anyone wanting to use it will probably need to edit to get the serial port name right (and revert my AH ROM timing tweak). Only tested on a Mac so far.

It could of course be fleshed out into a suite of functionality for integrating Windows/Mac/Raspberry Pi etc with the net but again, I don't want to pre-empt anything the originator of the device wants to do.
Attachments
sendfilemq.py.zip
a port of the file sending part of SendFileMQv22_bas
(3.28 KiB) Downloaded 90 times


gbejniet
ROM Dongle
Posts: 21
Joined: Sun Feb 02, 2020 10:21 pm

Re: QL to PC network

Post by gbejniet »

Here's an updated version. Now it sends and receives files, optionally prepending or stripping a header respectively. Three timings (ah, ql, zx) supported. Also a utility for generating said headers.

(Trying to port to C may not have been the best idea, looking back...)

Also included is a simple "gopher" handler to allow peers to request files. There's a discussion elsewhere of the value or otherwise of hosting a file server, FSERVE and so on - I decided to write the simplest thing that could possibly work, so a client just sends "/<filename><crlf>" and fetches back the file in response. Note that it does not listen for inbound requests from any station, which would make it a true "server". Nor does it attempt to be smart in any way about the files e.g., inferring headers. You would want already to have prepended headers to the files where they are expected.

Feel free to throw rocks etc.
Attachments
qlub.py.zip
(5.3 KiB) Downloaded 87 times


Post Reply