6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed Nov 13, 2024 1:04 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sat Jun 22, 2019 3:12 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
I started using using Serial as a terminal program on OSX as a console for my 65C02 SBC boards some time ago. I like the simple interface, easy configuration and high function that it provides. It also supports Xmodem and other serial data transfer protocols, which I've also written into my Monitor. However, I recently added an (Xmodem) upload function to my Monitor and found some odd funtion with Serial. The odd function being that Serial didn't appear to release the port (back to use as a console) after the transfer was completed. My Monitor shows a file transfer competed or error message based on the completion, but the message was never showing up. In short, Serial was simply ignoring input after the transfer. After completed, if I hit a key on the keyboard, it would come back and function normally.

I also alerted Decisive Tactics (author of Serial) (https://www.decisivetactics.com/products/serial/) about this odd behavior and they did respond, but to date no new updates have been made available. So I decided to perform some additional testing and found out what was going on... unfortunately, no easy workaround.

In short, Serial completes the Xmodem receive and then prompts the user (dialogue box) for a filename to save the data to. During the time you fill out the filename and optional path information, any data sent to Serial via the serial port is simply ignored/lost. Once the the filename is entered and finished, Serial once again starts listening to the serial port. As a workaround, I simply added a 15 seconds delay after the EOT and ACK (which completes the transfer) and so long as the filename entry is completed before the delay ends, I get the complete message from my Monitor program.

I have sent their support group a new email detailing the problem in hopes that they will fix this issue. A simple recommended fix would be to prompt for the filename before receiving the data, while an optional fix would be to buffer any received data once the transfer is complete and the user is entering the filename. I'm hoping they fix it in a future release so I can remove the band-aid!

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 28, 2019 6:10 pm 
Offline

Joined: Sat Dec 24, 2016 11:00 pm
Posts: 29
Location: Southern California
I use Serial quite successfully with my SBC, including with my XMODEM implementation. I've seen the same effect, but my strategy is simply to have a short busy-loop pause after the last packet is received and that seems to have been working fine.

_________________
Mite 6502: http://www.dourish.com/projects/mite.html


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 28, 2019 6:26 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
Or, you could wait for input before switching back to console mode.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 01, 2019 3:40 am 
Offline

Joined: Thu Mar 10, 2016 4:33 am
Posts: 181
I use Serial myself and it works well, but lately I've been using GNU screen most of the time, mainly so I don't have to leave my terminal. It looks like it supports XMODEM, maybe give it a try? I installed it via homebrew.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 01, 2019 11:55 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Chromatix wrote:
Or, you could wait for input before switching back to console mode.


Maybe my post wasn't quite clear. From my Monitor code, I can receive packets from Serial perfectly fine, but then again, with Xmodem, the receiving end is what controls the transfer of packets, not the sender.

I noticed the problem after adding the function to Send data from my Monitor to Serial. As Serial is the receiving end, it controls the transfer of packets via standard Xmodem protocol. Once the transfer is completed (my Monitor sending an EOT and Serial responding with an ACK), Serial presents a dialogue box to enter the filename to save the received data to. During this time, Serial doesn't acknowledge or buffer any data received (from my Monitor) until the filename entry and save is completed. In other words, it just looses the data received.

As a result of this behavior, I can't actually code anything that will change it, other than adding the 15 seconds delay, after which my Monitor will send a Data Transfer Complete message. However, if I don't complete the entry and save of the filename within the 15 seconds, the final message data will be ignored by serial. It's an annoying bug within serial... and likely less of an issue for other users, as my Monitor uses the same serial port for console and Xmodem data transfers.

Hopefully this makes the issue more clear.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 01, 2019 12:03 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
jds wrote:
I use Serial myself and it works well, but lately I've been using GNU screen most of the time, mainly so I don't have to leave my terminal. It looks like it supports XMODEM, maybe give it a try? I installed it via homebrew.


I was using ExtraPutty on a Windows 7 VM, which works fine... and also found Zoc7 on OSX that also works fine. Oddly, I just prefer using Serial... but have also used the Terminal built into OSX, but will look at GNU screen and look into the Xmodem support. Thanks.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 10, 2019 4:24 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Today, Decisive Tactics released an updated version of Serial for OSX, version 1.4.0 (was previously 1.3.9). In addition to other features and bug fixes, they also fixed the problem I found which is the subject of this post. I have tested it by removing the 15 seconds delay from the Xmodem save function and I after clicking on save I get the transfer completed message without issue.

I'll be following up with their support team by sending a thank you email :D

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: