Page 2 of 2

Re: Deploy-and-run from PC to Beeb?

Posted: Mon Sep 03, 2018 5:35 pm
by sydney
I've been using cutecom to send my ssd's to the Master for testing but wanted something I could use from the command line.
Today I discovered writetoserial on github which is a small command line program that takes a filename, speed and port as arguments and squirts my ssd over the serial port to my UPURS enabled Master. It's great! I'll probably write a small 'deploy' script which will assemble, create an ssd and send it straight to the master all in one go.

Re: Deploy-and-run from PC to Beeb?

Posted: Mon Sep 03, 2018 6:08 pm
by guddler
Clearly this IS a very dumb question or you'd already be doing it, but if this isn't Windows (and maybe even if it is) why can't you simply copy the file to the serial port (the /dev/BLAH) from the command line? THat's what I used to do when I had a linux based serial solution on my Amiga.

There are commands that set the handshaking and transfer rate etc. for the port (again command line)

What am I missing?

Re: Deploy-and-run from PC to Beeb?

Posted: Mon Sep 03, 2018 6:21 pm
by sydney
My linux knowledge is pretty limited and I struggled with enabling flow control and so gave up. I've read up on setserial, stty, ckermit and probably others.

Re: Deploy-and-run from PC to Beeb?

Posted: Mon Sep 03, 2018 6:44 pm
by guddler
Ah ok. Not sure if the Amiga thing was using flow control. I know you’ve found a tools now but I’ll see if I can dig it out. I remember it was a headache to work out but simple enough to repeat once you knew what to do.

Re: Deploy-and-run from PC to Beeb?

Posted: Mon Sep 16, 2019 12:06 am
by VectorEyes
Arise necro-thread!

Has anyone ever used UPURSFS with MacOS? Did you get it working? I think I have everything set up correctly but I find that I can't actually execute any HostFS commands (or any *commands at all, really) ... the machine just waits forever for the command to complete, but never prints any output.

I am using the recommended FTDI cable for USB->Serial at the Mac end and a UPURS cable for Serial->Userport at the Master end.

I have downloaded the UPURS ROM image and put it onto a cartridge for use in the Master.

I have *UNPLUGGED all other Filesystem ROMS, just to see whether they were conflicting with UPURSFS. But I see the same symptoms when they're plugged in.

When the serial cable is connected to the Mac, I see "HostFS:UPURS 0.03" on startup on the Master.

With the cable disconnected, I see the same, but it says "No RTS" at the end.

... So, clearly it knows that it is/isn't connected...

I am using TubeHost.pl on the Mac.

I've tried various combinations of options to run the script: -s, -U, specifying the baud rate, etc. Nothing seems to help.

For reference I'm running the following command in a terminal window:

perl ./TubeHost.pl -U /dev/tty.usbserial-FT93UCZ7 115200


Does anyone have any suggestions for what I'm doing wrong or how I might troubleshoot?

Thanks!

Re: Deploy-and-run from PC to Beeb?

Posted: Mon Sep 16, 2019 4:52 pm
by sweh
VectorEyes wrote:
Mon Sep 16, 2019 12:06 am
perl ./TubeHost.pl -U /dev/tty.usbserial-FT93UCZ7 115200
Try using /dev/cu.usbserial.... instead.

Re: Deploy-and-run from PC to Beeb?

Posted: Mon Sep 16, 2019 10:25 pm
by VectorEyes
sweh wrote:
Mon Sep 16, 2019 4:52 pm
VectorEyes wrote:
Mon Sep 16, 2019 12:06 am
perl ./TubeHost.pl -U /dev/tty.usbserial-FT93UCZ7 115200
Try using /dev/cu.usbserial.... instead.
Thanks sweh! Sadly it didn't make any difference.

I also realised I had an old version of UPURSFS so upgraded to the latest one (0.08) but that didn't help either.

Should I see any output at all in the terminal window when I run TubeHost.pl? Currently it's completely empty which seems a little suspicious.

I'm about to try to 1. (re-)learn Perl and 2. learn how to use the Perl debugger, but if you've any other suggestions I'm all ears!

Re: Deploy-and-run from PC to Beeb?

Posted: Mon Sep 16, 2019 10:35 pm
by VectorEyes
Upon further investigation:

Tubehost.pl is hanging on the following line:

system("stty $BAUD crtscts ignbrk ignpar -icrnl -ixon -opost -isig -icanon -iexten -echo < $socket_path");


Would this suggest some kind of driver issue?

Re: Deploy-and-run from PC to Beeb?

Posted: Mon Sep 16, 2019 10:47 pm
by MartinB
I’m afraid I can’t help with UPURSFS because it wasn't my 'thing', (I’m only responsible for the original UPURS system), so I’ll have to leave the expert comment on that to Stephen (sweh). My only suggestion though if you continue to struggle would be for you to first confirm that the basic UPURS system works which would vindicate the cables etc. So, if you haven't already, could you perhaps try some simple UPURS to/from transfers using the Linux-recommended (by others - not me being a Windows person!) Cutecom ?

Re: Deploy-and-run from PC to Beeb?

Posted: Tue Sep 17, 2019 12:23 am
by VectorEyes
Thanks Martin. I seem to have got it working! For those who might want to try UPURSFS on MacOS in the future:

- The -U option didn't work. I had to use -s. ie:

perl ./TubeHost.pl -s /dev/tty.usbserial-FT93UCZ7 115200

- There seems to be a bug on MacOS whereby if you have the FTDI USB->Serial cable plugged in on boot, and you have installed the FTDI drivers, the default MacOS drivers sneak in first and do something which prevents the device being accessed. The solution (sigh...) is to unplug and re-plug the FTDI cable from the computer!

Now I have all kinds of problems getting UPURSFS to start as the default filesystem, but that's a problem for another day...

Re: Deploy-and-run from PC to Beeb?

Posted: Tue Sep 17, 2019 10:18 am
by Elminster
I don’t use UPURSFS but I do use UPURS on Mac and the cable is always plugged in (for the last 3 years) and I have 3 or 4 other FTDI device (not just UPURS) on the machine. Never had an issue with them being plugged in at boot. What MacOS version are you on?

Re: Deploy-and-run from PC to Beeb?

Posted: Tue Sep 17, 2019 10:58 am
by sweh
VectorEyes wrote:
Mon Sep 16, 2019 10:35 pm
Upon further investigation:

Tubehost.pl is hanging on the following line:

system("stty $BAUD crtscts ignbrk ignpar -icrnl -ixon -opost -isig -icanon -iexten -echo < $socket_path");


Would this suggest some kind of driver issue?
Typically commands like that hang on serial ports if there's not the right signal asserted (eg DTR or CD). These signals are _meant_ to be ignored on opening with "cu" devices ("cu" stands for "Call Unit", and historically was the port used for "dial out", whereas "tty" was the port used for "dialin". So the getty would be in "tty" and would block until the modem asserted CD/DTR, allowing the "cu" port to be used for outgoing calls on the modem).

Re: Deploy-and-run from PC to Beeb?

Posted: Tue Sep 17, 2019 12:59 pm
by VectorEyes
Making considerable progress! I will post here with what I had to do to get things working shortly...

I'm trying to work it out by looking online but does anyone know which areas of memory (workspace) I might need to preserve when using HostFS / UPURSFS? I am trying to run a demo (Wave Runner) over UPURSFS but it's failing badly, most likely because the demo uses lots of areas of memory that it strictly shouldn't...

Re: Deploy-and-run from PC to Beeb?

Posted: Tue Sep 17, 2019 4:59 pm
by myelin
Looking at my TubeHost code, I changed that line to:

system("stty -f $socket_path $BAUD crtscts ignbrk ignpar -icrnl -ixon -opost -isig -icanon -iexten -echo");

I think this made it work on macOS; I don't seem to have any other interesting modifications.

Re: Deploy-and-run from PC to Beeb?

Posted: Wed Sep 18, 2019 12:50 am
by sweh
myelin wrote:
Tue Sep 17, 2019 4:59 pm
Looking at my TubeHost code, I changed that line to:

system("stty -f $socket_path $BAUD crtscts ignbrk ignpar -icrnl -ixon -opost -isig -icanon -iexten -echo");

I think this made it work on macOS; I don't seem to have any other interesting modifications.
Did you use the tty or cu device?

("-f" isn't portable; on Linux it'd be "-F". But this could easily be handled. If you wanna raise a pull request...!)