LisaList2

Advanced search  

News:

I've successfully built LOS from source!: https://lisalist2.com/index.php/topic,644.0.html

Pages: 1 2 3 [4]   Go Down

Author Topic: Moving the many source files to the Lisa  (Read 54243 times)

sigma7

  • Administrator
  • Hero Member
  • *****
  • Karma: +188/-1
  • Offline Offline
  • Posts: 653
  • Warning: Memory errors found. Verify comments.
Re: Moving the many source files to the Lisa
« Reply #45 on: August 15, 2025, 07:19:29 pm »

Has anyone seen RS-232 errors...

I've encountered one error 643 in transferring prolly 1.5 times the whole set of files (the set as recommended by Alex); it was not accompanied by the level 7 interrupt.

Since the problem you've experienced is only semi-repeatable (AFAICT), I wonder if it is an interference issue rather than a configuration or data pattern issue.

I'm using quite long cables, maybe 30' overall composed of a couple long ones strung together, a re-wired 3" null-modem adapter, and a DB25-DE9 adapter; not much for 80's RS-232, but for a USB adapter, perhaps not typical usage.

All the shields are connected, and I have all the equipment power connected to a common ground, as well.

If you have a voltmeter, you might disconnect the serial cable and check the AC voltage between the shields, and/or the grounds (pin 7 of the DB25) to see if the two ends of the link are fighting a ground differential.

Logged
Warning: Memory errors found. ECC non-functional. Verify comments if accuracy is important to you.

snua12

  • Newbie
  • *
  • Karma: +2/-0
  • Offline Offline
  • Posts: 5
Re: Moving the many source files to the Lisa
« Reply #46 on: August 20, 2025, 05:24:32 pm »

I finally managed to transfer all the files successfully!

The issue turned out to be hardware-related: due to past battery leakage, the G (enable) pin of the AM26LS32ACN was not grounded correctly. After fixing that, I also built a short cable according to the pinout http://sigmasevensystems.com/blumanual.html

Code: [Select]
Lisa (DB25M)      PC (DE9F)
  2   Tx  > Rx      2
  3   Rx  < Tx      3
  7   Gnd           5
  6   DSR < RTS     7
 20   DTR > CTS     8

Finally, I had to tweak the Python transfer script to use CTS/RTS flow control instead of DSR/DTR.

Code: [Select]
diff --git a/scripts/lisa_serial_transfer.py b/scripts/lisa_serial_transfer.py
index 6a2b177..53fb4c1 100644
--- a/scripts/lisa_serial_transfer.py
+++ b/scripts/lisa_serial_transfer.py
@@ -99,7 +99,7 @@ def send_single_file(file_path, filename):
             while (byte := source_file.read(1)): # Read the file byte by byte.
                 state_start = time.time()
                 # Flow control in Pyserial is broken, so we have to check DSR manually. If it's low, we need to block until the Lisa's done processing data.
-                while not lisa.dsr:
+                while not lisa.cts:
                     # So say that we're waiting for the Lisa in the progress bar.
                     print_progress_bar(filename, total_files - len(path_list), total_files, source_file.tell(), os.path.getsize(file_path), size, start_time, True)
                     if time.time() - state_start > buffer_timeout: # And if it's not done processing in buffer_timeout seconds, print a warning.
@@ -138,7 +138,7 @@ def send_single_file(file_path, filename):
         print_progress_bar(filename, total_files - len(path_list), total_files, 0, 1, size, time.time(), True)
         time.sleep(2)
         state_start = time.time()
-        while not lisa.dsr: # Wait for the Lisa to be ready for our 'end of transfer' commands, just like above.
+        while not lisa.cts: # Wait for the Lisa to be ready for our 'end of transfer' commands, just like above.
             if time.time() - state_start > buffer_timeout:
                 print('WARNING: Lisa is taking forever to empty its buffer, probably hung!')
                 log_file.write('\nWARNING: Lisa is taking forever to empty its buffer, probably hung! ')
@@ -181,7 +181,7 @@ def send_single_file(file_path, filename):
     # This code executes at the end of a file transfer; it's very similar to the code from the Except above.
     # lisa.flush()
     state_start = time.time()
-    while not lisa.dsr: # Wait for the Lisa to finish processing its data buffer.
+    while not lisa.cts: # Wait for the Lisa to finish processing its data buffer.
         print_progress_bar(filename, total_files - len(path_list), total_files, os.path.getsize(file_path), os.path.getsize(file_path), size, start_time, True)
         if time.time() - state_start > buffer_timeout:
             print('\nWARNING: Lisa is taking forever to empty its buffer, probably hung!')
@@ -259,7 +259,7 @@ sys.stdout.flush()
 input('Run the EXEC file ALEX/TRANSFER.TEXT on your Lisa, and hit RETURN on this computer once the Lisa screen goes blank...')
 
 try: # Attempt to connect to the Lisa over serial, and exit with an error if we fail.
-    lisa = serial.Serial(port=sys.argv[1], baudrate=28800, bytesize=8, dsrdtr=True, timeout=1)
+    lisa = serial.Serial(port=sys.argv[1], baudrate=28800, bytesize=8, rtscts=True, timeout=1)

With these changes in place, the transfers seem to be now reliable.

Thanks again to everyone here for the advice and pointers — it definitely set me on the right track.
Logged

AlexTheCat123

  • Sr. Member
  • ****
  • Karma: +105/-1
  • Offline Offline
  • Posts: 366
Re: Moving the many source files to the Lisa
« Reply #47 on: August 21, 2025, 11:55:27 am »

Glad to hear it! Be sure to make a backup of your disk now before going any further, and let us know if you have any issues with actually building everything.
Logged
Pages: 1 2 3 [4]   Go Up