Lostgallifreyan’s ORG-Link

This special section for all the COMMS LINK and communications issues
User avatar
Zenerdiode
Posts: 38
Joined: Wed Jan 04, 2023 12:45 am

Lostgallifreyan’s ORG-Link

Post by Zenerdiode »

It’s good to see Lostgallifreyan has found his way to the new forum. I asked a question about ORG-Link on the old forum before it closed. I’m using a USB-RS232 converter and ORG-Link works poorly. I think it’s my setup as others have no issues.

Does ORG-Link look for any hardware pins? My USB converter has only RTS/CTS and I was wondering if ORG-Link is looking for DSR/DTR too? I also read that OL works better on 32 bit systems than 64.

I’ve set up a dedicated laptop, it’s a 64 bit machine but I’ve put a clean Windows XP 32 build on it. With that, and OL, I can manage to get some comms at 1200 baud. I use the set time function, OL prompts me to the Comms Link BOOT option with no parameters. When I do that, it’s a good 30 seconds before either a timeout from the Organiser or if I’m lucky, the first block gets sent through. Then another wait of 30 seconds before a gamble if the second block gets through or not.

If it works without DTR/DSR, would you advise of some comms parameters to try? I forgot to mention that my setup works perfectly with Hyperterminal at 9600 8N1.
Christopher. - Check out my TRAP message, it’s not difficult to decode and is sometimes uttered under the breath when said message appears… :|
User avatar
Martin
Global Admin
Posts: 201
Joined: Mon Jan 02, 2023 5:18 pm

Lostgallifreyan’s ORG-Link

Post by Martin »

Chris

It is not necessarily the Comms Server (ORG-Link_v2) that is causing the problem. In Jaaps excellent paper 'Using Comms Link' (here) He mentions the difficulties he had with different USB-RS232 converters.

To check this you could confirm the connection using Psi2Win which doesn't have all the features of ORG-Link but will at least prove the 'connection' when transferring files with the Organiser protocol set to Psion. Although you will see that Jaaps main difficulties were with DosBOX. If you don't have a copy of Psi2Win you will find one (here).

While testing version two of ORG-Link another member has difficulties on a 64 bit Windows PC. But I've never managed to replicate these difficulties with a USB Comms Link on a 64 bit Windows 11 Tablet/Laptop.

I know Lostgallifreyan will be interested to know if your issue is replicated with Psi2Win because if it then it points to the lead and If Psi2Win works flawlessly then it may be a repeat of the 64 bit Windows issue.

In good faith
Martin

EDIT
PS I like Lostgallifreyan am keen to understand if this is a repeat of the 64 bit issue.. If it will help I have a 'spare' (Olivier's) USB Coms Link that I keep at the workshop just in case. I could lend you this for a few days if it will help get to the bottom of this issue. Then you can return it when we know more!
.
EDIT the Edit
PPS On reflection, rather than get involved with one of Olivier's no longer manufactured and hard to find USB Comms Links I have one of Andrew's prototype USB Comms Links here that plays well with ORG-Link_v2 and 64 bit Windows 11. I could lend you that which will help to confirm if the issue is with ORG-Link or the USB to Serial Converter.
.
Andrew if you are watching, did you ever complete the 'hard wired' version of your Comms Link? Perhaps Chris could borrow/use one of them!
.
Again... still sincere and in good faith... Martin
amenjet
Posts: 179
Joined: Tue Jan 03, 2023 7:54 pm

Re: Lostgallifreyan’s ORG-Link

Post by amenjet »

Martin wrote: Sat Feb 04, 2023 7:06 pm
Andrew if you are watching, did you ever complete the 'hard wired' version of your Comms Link? Perhaps Chris could borrow/use one of them!
I am watching. I do have one version of the hard wired adapter. I have some cables as well, and some PCBs that aren't fully built yet. So working on it (and lots of other things). Currently looking at a test program that I can run to check that the RTS/CTS/DTR signals are actually working, which I haven't done up until now. Do people out there use the hardware handshaking? i think USB is so fast that it's not necessary.

Andrew
MartinP
Posts: 45
Joined: Wed Jan 04, 2023 7:51 pm

Re: Lostgallifreyan’s ORG-Link

Post by MartinP »

Just to note: DTR and DSR are connected together on the original Psion CommsLink. They're not used for handshaking, but the idea is that a DTR from the PC will be sent back as a DSR, if the PC needs one, and the DTR will switch on the Organiser via the AC_B signal line at the top slot.
Also, when the Psion protocol is selected, hardware handshaking does not seem to be used. So I don't even bother to connect the RTS and CTS signals on my CommsLink adapter.
MartinP.

EDIT: I just looked at the CommsLink manual and found that in addition to what I wrote above, DTR/DSR can also be used for one-way handshaking: for the other end to tell the Organiser that it is ready to receive. Just goes to show that you should always check the manual! :oops:
Last edited by MartinP on Mon Feb 06, 2023 4:16 pm, edited 1 time in total.
amenjet
Posts: 179
Joined: Tue Jan 03, 2023 7:54 pm

Re: Lostgallifreyan’s ORG-Link

Post by amenjet »

Yes, I can test the DTR easily, the Organiser turns on RTS/CTS isn't as easy, I need to write some assembly language stuff to do that, hence the upgrade to the assembler...

Andrew
User avatar
Zenerdiode
Posts: 38
Joined: Wed Jan 04, 2023 12:45 am

Re: Lostgallifreyan’s ORG-Link

Post by Zenerdiode »

…I feel like such an idiot :roll:

Many thanks indeed, Martin, for your generous offer of a loan of your USB devices, however I don’t have a need for them now. I decided to re-check my work on Sunday evening; and I found I had CTS/RTS crossed. Two minutes with a bit of flux and solder and I’ve got it working perfectly.

Very strange that with the cross - even though on both ORG-Link and PSI2WIN using no handshaking and PSION protocol - they got bunged up, but straightforward HyperTerminal worked fine.

I confirm ORG-Link works perfectly now at 9600 baud. This is with Windows 7 32 on a 64 bit machine.

MartinP - yes, the CL bounces back DTR as DSR (you can see the PCB trace on the CL connecting the two) but as you mention, I didn’t know if ORG-Link was expecting to see DSR asserted. My USB converter has an FTDI chip and I was able to flash it to have DSR all the time. I’ll now experiment to see if that is a ‘don’t care’.

Thank you all for bearing with me.
Christopher. - Check out my TRAP message, it’s not difficult to decode and is sometimes uttered under the breath when said message appears… :|
Lostgallifreyan
Posts: 83
Joined: Thu Jan 12, 2023 8:25 pm

Re: Lostgallifreyan’s ORG-Link

Post by Lostgallifreyan »

ORG-Link doesn't use anything but TX and RX normally, because Psion protocol is a call-and-response thing with moderately sized packets. Each end will usually only send new data when an ACK arrives to tell it the last bit got through ok. It uses a sequence number to maintain packet order too, so it's very well behaved. I think it's a nice protocol, though awkward to parse at times.

The one bit of ORG-Link that does use RTS/CTS and DSR/DTR is the port relay. If you have two devices that talk to each other ok, you could maybe try ORG-Link as a way to connect them via two ports on a computer, so it complete the signal path. If the devices at each end are working well with hardware flow control through this arrangement, then you'll know that the computer (and software on it) is too.

One thing that can affect it is different RS-232 voltage levels, and long cables. Serial is complex, and it's always possible that ORG-Link might fail in a context where something else works, because I can't test things I don't have, and the permutations are endless...

About alternative USB links, Andrews is maybe a good contender, hopefully using the FTDI chip used in Oliviers's link. In absense of either, there's a one-port Startech device, part number ICUSB2321F, and a variant that has two RS-232 ports on it too, that also use this chip, which is good because the FTDI W98 driver for it is very good. If anyone needs that, let me know, because its INF file needed a bit of modification to enable it to see more devices.

PS. Thankyou, Zenerdiode! That last bit of info is very welcome news.
MartinP
Posts: 45
Joined: Wed Jan 04, 2023 7:51 pm

Re: Lostgallifreyan’s ORG-Link

Post by MartinP »

Glad to hear you got it working Zenerdiode!
Just to add to that, I've been using Org-Link on Windows 10 64-bit (build 19042) for a while now, without any problems.
Lostgallifreyan, have you considered making ORG-Link open source, which might future-proof it to some extent?
Martin P.
Lostgallifreyan
Posts: 83
Joined: Thu Jan 12, 2023 8:25 pm

Re: Lostgallifreyan’s ORG-Link

Post by Lostgallifreyan »

I have, and I won't let it die with me if I can avoid that. For now I won't release it though, because doing that can dilute a vision. I like code that is the result of a singular vision, taken to as much completion as reasonable or possible. I like to code in that spirit. It's why I prefer Windows to Linux. Linux can look like a donkey designed by committee, it's very hard to choose. Even BSD proliferates to the point where it's tough just to choose which variant to use (I'd use OpenBSD if I needed it). The Win32 API is a work of genuine brilliance, even genius, despite flaws, and so much so that the core is unchanged for nearly 30 years now, there is a lot of software that depends on it, and I aimed at the deepest compatibility with its most enduring methods. This is why I can make it run on machines I'll never even see, because no-one's going to 'deprecate' those methods now, too much depends on them. Even the Linux bods want this (unless they reject WINE and all its works in a fit of abstemiousness).

A lot of coders have a different philosophy, and end up with compilers and kernel calls that result in tasks that could work well on a ZX Spectrum, but written in code that could only run on a 64-bit behemoth with an OS no older than 6 months from the given date! I code partly as an act of resistance to that.

Also, I'm not getting paid, so the piper gets to call his own tune. But, as you know, I'm open to ideas. If there is some software pack that people still find indispensible, that uses the Comms Link in some particular way, and needs a server on a PC to handle things the way it does for spreadsheets, then I'd consider it. So long as it can be done without breaking the existing code (and any trust it may have gained).

Eventually, no matter what, the code will be in public domain, but that will not be before the program is well established, not least because if that never happens there may not be much point. :)
MartinP
Posts: 45
Joined: Wed Jan 04, 2023 7:51 pm

Re: Lostgallifreyan’s ORG-Link

Post by MartinP »

Lostgallifreyan,
Interesting to hear your motivation, I was just curious to have a peak under the hood, but there's no real need and ORG-Link works just fine for me as it is.
Martin P.
Post Reply