[CoolTerm-Betas] Pseudo-terminal PTY

Franzi Edo. edo.franzi at ukos.ch
Tue Oct 4 17:52:19 EDT 2022


Hi Roger,
Here is what I tried on my Mac:

1. On the Unix terminal I have opened 2 separate sessions.
    - on T1 I type
           screen /dev/ptyw1
    - on T2 I type
           screen /dev/ttyw1

When I type on T1 the text is displayed on T2
When I type on T2 the text is displayed on T1

2. I close the 2 Unix terminals
On the CoolTerm I open 2 separate sessions
- on the first session I select the Serial Port
    /dev/ptyw1
- on the second session I select the Serial Port
    /dev/ttyw1

When I type on CoolTerm that has opened /dev/ttyw1, the characters are displayed on the CoolTerm that has opened  /dev/ptyw1: this seems OK
When I type on CoolTerm that has opened /dev/ptyw1, NO characters are displayed on the CoolTerm that has opened  /dev/ttyw1: this seems to me wrong

3. Correct, I use “raw mode”

Edo





> On 4 Oct 2022, at 20:29, Roger Meier <roger.meier at pobox.com> wrote:
> 
> Thanks for the feedback. I have a few follow up questions:
> 
> - How did you create these two devices? Perhaps I can recreate this on my end. I assume this is on macOS?
> - What do you mean by "row mode"? Do you mean "raw mode"?
> - What was the indication of the problem you got? Did you get a particular error code?
> - CoolTerm should close all serial ports when disconnecting. Are the devices working after you quit CoolTerm?
> 
> The support for virtual ports in CoolTerm for macOS and Linux is very rudimentary. When attempting to change any hardware settings (such baud rate, data bits, stop bits, parity, etc), I get an error 25 ('inappropriate ioctl for device'). My workaround is to simply ignore this particular error and open the port anyways since hardware settings, in theory, shouldn't matter for virtual ports. This is the only way I was able to get virtual ports working in CoolTerm.
> 
> Roger
> 
> 
> On Sat, Oct 1, 2022 at 1:19 AM Franzi Edo. <edo.franzi at ukos.ch <mailto:edo.franzi at ukos.ch>> wrote:
> Hi Roger,
> Great! With the support of the virtual ports, CoolTerm is now really exceptional!
> 
> I tested a bit this implementation and I have to report a couple of problems:
> 
> 1. I open 2 CoolTerm sessions. One session with /dev/ttyw2 and the second session with /dev/ptyw2
>    - The communication works only in a row mode. However, even in row mode after some exchanges between the 2 sessions one terminated abruptly with an indication of a problem. Unfortunately, Coolterm doesn’t close the comm device and I cannot use it anymore.
> 
> 2. It is the consequence of the point 1.
>    - Coolterm doesn’t close the comm device after an error and the port cannot be use it anymore.
> 
> 
> Anyway, great for your first implementation.
> Regards
> Edo
> 
> 
> 
>> On 30 Sep 2022, at 23:31, Roger Meier <roger.meier at pobox.com <mailto:roger.meier at pobox.com>> wrote:
>> 
>> Hi Edo,
>> 
>> I found a workaround for CoolTerm to work with virtual serial ports. Here is a build you can try
>> 
>> https://www.dropbox.com/s/z1eaddkistn5kvp/CoolTermMacBuild1106.zip?dl=0 <https://www.dropbox.com/s/z1eaddkistn5kvp/CoolTermMacBuild1106.zip?dl=0>
>> 
>> CoolTerm does not automatically recognize virtual ports, but you can add them via a ports.ini text file placed with in the same directory as the CoolTerm app. The build linked above already includes such a file with one entry for /dev/ttys001. You can add any other such devices to this file, one per line. Make sure you restart CoolTerm after editing this file. After that, the ports from the ports.ini file will show up in the pull down menu in the connection settings.
>> I have tested this successfully with virtual ports created with socat as well as ble-serial <https://github.com/Jakeler/ble-serial>.
>> 
>> Regards,
>> 
>> Roger
>> 
>> 
>> 
>>> On Jan 28, 2022, at 5:08 PM, Roger Meier <roger.meier at pobox.com <mailto:roger.meier at pobox.com>> wrote:
>>> 
>>> There is known issue with the serial API I’m using and its compatibility with virtual ports. I opened a ticket with Xojo, the iDE I’m using to develop CoolTerm, to support virtual serial devices (created with scout, for example) in their serial API. Once that works, supporting it with CoolTerm won’t be a problem.
>>> 
>>> Roger
>>> 
>>> 
>>>> On Jan 25, 2022, at 12:40 AM, Franzi Edo. <edo.franzi at ukos.ch <mailto:edo.franzi at ukos.ch>> wrote:
>>>> 
>>>> Hi all,
>>>> It would be nice to allow the usage of pseudo-com devices (i.e. macOS PTY, /dev/ptyXY).
>>>> This could open nice possibilities.
>>>> The popup menu for selecting the com device could be enriched with those devices (i.e. we can list such devices in a file in order to customize the selection (like for the baud rate)).
>>>> BR
>>>> Edo
>>>> 
>>>> _______________________________________________
>>>> CoolTerm-Betas mailing list
>>>> CoolTerm-Betas at the-meiers.org <mailto:CoolTerm-Betas at the-meiers.org>
>>>> http://the-meiers.org/mailman/listinfo/coolterm-betas_the-meiers.org <http://the-meiers.org/mailman/listinfo/coolterm-betas_the-meiers.org>
>>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://the-meiers.org/pipermail/coolterm-betas_the-meiers.org/attachments/20221004/8071aa21/attachment.htm>


More information about the CoolTerm-Betas mailing list