pywinkeyerdaemon

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

pywinkeyerdaemon

Drew Arnett
Finally knocked off some todos including porting to python3.  (still
runs on 2 as well)

Also, finally added in message +/- controls (tested with TLF) and
support for cwdaemon prosigns.  (I hadn't been using these sorts of
things, so hadn't missed them personally, but they've
been on the TODO list too long.)

+++TEST--- doesn't work unless there's a setspeed first.  (I didn't
find that function in the winkeyer interface.)  In testing, I found
that tlf sends a setspeed command at startup, so no problems.

https://github.com/drewarnett/pywinkeyerdaemon

Best regards,

Drew
n7da

Reply | Threaded
Open this post in threaded view
|

Re: pywinkeyerdaemon

Joop Stakenborg-4
Hi Drew,


is pywinkerdaemon intended to work with USB ports? I get:

$ ./pywinkeyerdaemon.py -d /dev/ttyUSB1 -p 6788
Traceback (most recent call last):
   File "./pywinkeyerdaemon.py", line 310, in <module>
     winkeyer = Winkeyer(args.device)
   File "./pywinkeyerdaemon.py", line 43, in __init__
     self.host_open()
   File "./pywinkeyerdaemon.py", line 57, in host_open
     assert self.port.read(1).decode() == test_char
AssertionError


Joop PG4I

Op 26-11-19 om 00:44 schreef Drew Arnett:

> Finally knocked off some todos including porting to python3.  (still
> runs on 2 as well)
>
> Also, finally added in message +/- controls (tested with TLF) and
> support for cwdaemon prosigns.  (I hadn't been using these sorts of
> things, so hadn't missed them personally, but they've
> been on the TODO list too long.)
>
> +++TEST--- doesn't work unless there's a setspeed first.  (I didn't
> find that function in the winkeyer interface.)  In testing, I found
> that tlf sends a setspeed command at startup, so no problems.
>
> https://github.com/drewarnett/pywinkeyerdaemon
>
> Best regards,
>
> Drew
> n7da
>

Reply | Threaded
Open this post in threaded view
|

Re: pywinkeyerdaemon

Drew Arnett
I'll trouble shoot this with Joop off list.  Shouldn't be related to
the type of serial port, but we will see.  First step was a better
assertion statement that would provide the value that failed to match.
Good sign that the code got that far before throwing an error.  Will
be looking at K1EL docs, as that test came from there IIRC.

Drew
n7da

On Fri, Nov 29, 2019 at 8:18 PM Joop Stakenborg
<[hidden email]> wrote:

>
> Hi Drew,
>
>
> is pywinkerdaemon intended to work with USB ports? I get:
>
> $ ./pywinkeyerdaemon.py -d /dev/ttyUSB1 -p 6788
> Traceback (most recent call last):
>    File "./pywinkeyerdaemon.py", line 310, in <module>
>      winkeyer = Winkeyer(args.device)
>    File "./pywinkeyerdaemon.py", line 43, in __init__
>      self.host_open()
>    File "./pywinkeyerdaemon.py", line 57, in host_open
>      assert self.port.read(1).decode() == test_char
> AssertionError
>
>
> Joop PG4I
>
> Op 26-11-19 om 00:44 schreef Drew Arnett:
> > Finally knocked off some todos including porting to python3.  (still
> > runs on 2 as well)
> >
> > Also, finally added in message +/- controls (tested with TLF) and
> > support for cwdaemon prosigns.  (I hadn't been using these sorts of
> > things, so hadn't missed them personally, but they've
> > been on the TODO list too long.)
> >
> > +++TEST--- doesn't work unless there's a setspeed first.  (I didn't
> > find that function in the winkeyer interface.)  In testing, I found
> > that tlf sends a setspeed command at startup, so no problems.
> >
> > https://github.com/drewarnett/pywinkeyerdaemon
> >
> > Best regards,
> >
> > Drew
> > n7da
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: pywinkeyerdaemon

Drew Arnett
Two issues:
1.  I expanded prosigns after inserting the +++ --- speed control
statements.  Whoops.  Fixed that.
2.  I had an echo test after host open.  Not sure why I did that,
other than I must have been in a hurry.  Haven't changed that yet, but
commenting it out in the code helped Joop during some early
troubleshooting, so I may make that change after reviewing the
winkeyer documentation.  This is likely keyer implementation specific.
(I've been testing with an hamcrafters winkeyer USB, but should dig
out my old Arduino K3NG implementation.)

I suspect between the two, Joop's problem should be fixed.  Will
continue to follow up per his test report.  I especially need to do
something about #2 above.

Besides +++ --- and a complete cwdaemon compatible prosign
implementation, I added tune capability as well to pywinkeyerdaemon,
so ALT-T works from tlf now.  Looks like tlf does a 6 second timeout
for tune, cwdaemon supports 0 to 10 seconds, and winkeyer 0 to 99.  I
guess how long is too long varies wildly depending on the situation!
:-O  :-)  ALT-T would have been great to have yesterday when I was
dealing with a fussy autotuner.

Best regards

Drew
n7da

On Sat, Nov 30, 2019 at 4:29 AM Drew Arnett <[hidden email]> wrote:

>
> I'll trouble shoot this with Joop off list.  Shouldn't be related to
> the type of serial port, but we will see.  First step was a better
> assertion statement that would provide the value that failed to match.
> Good sign that the code got that far before throwing an error.  Will
> be looking at K1EL docs, as that test came from there IIRC.
>
> Drew
> n7da
>
> On Fri, Nov 29, 2019 at 8:18 PM Joop Stakenborg
> <[hidden email]> wrote:
> >
> > Hi Drew,
> >
> >
> > is pywinkerdaemon intended to work with USB ports? I get:
> >
> > $ ./pywinkeyerdaemon.py -d /dev/ttyUSB1 -p 6788
> > Traceback (most recent call last):
> >    File "./pywinkeyerdaemon.py", line 310, in <module>
> >      winkeyer = Winkeyer(args.device)
> >    File "./pywinkeyerdaemon.py", line 43, in __init__
> >      self.host_open()
> >    File "./pywinkeyerdaemon.py", line 57, in host_open
> >      assert self.port.read(1).decode() == test_char
> > AssertionError
> >
> >
> > Joop PG4I
> >
> > Op 26-11-19 om 00:44 schreef Drew Arnett:
> > > Finally knocked off some todos including porting to python3.  (still
> > > runs on 2 as well)
> > >
> > > Also, finally added in message +/- controls (tested with TLF) and
> > > support for cwdaemon prosigns.  (I hadn't been using these sorts of
> > > things, so hadn't missed them personally, but they've
> > > been on the TODO list too long.)
> > >
> > > +++TEST--- doesn't work unless there's a setspeed first.  (I didn't
> > > find that function in the winkeyer interface.)  In testing, I found
> > > that tlf sends a setspeed command at startup, so no problems.
> > >
> > > https://github.com/drewarnett/pywinkeyerdaemon
> > >
> > > Best regards,
> > >
> > > Drew
> > > n7da
> > >
> >

Reply | Threaded
Open this post in threaded view
|

Re: pywinkeyerdaemon

Drew Arnett
I removed the echo test, too.  There is an option in K3NG keyer,
OPTION_WINKEY_STRICT_HOST_OPEN that tripped up the echo test I had in
the wrong part of the sequence.  Arguably, K3NG with that option
behaves the way I would expect based on the K1EL documentation.  The
winkeyer I have (which returns version code 30) apparently isn't
strict.

I dug out my old homebrew K3NG keyer shield and programmed an Arduino.
Yes, I was able to reproduce the problem Joop reported.  Looks like
K3NG flushes the buffer on a 'cancel buffered speed change' command.
I need to read K3NG source to understand the details of why it is
implemented this way.  winkeyer doesn't.  Which is correct?  Who am I
to say?  Understanding the root cause, now, I can modify the
pywinkeyerdaemon source to workaround this K3NG keyer bug.  Better to
do that or to write a patch for K3NG or both?  Workaround involves
using the 'buffered speed command' indefinitely.  I had thought that
would be appropriate to use for just a single message.  Maybe not.
Hmm.

Best regards,

Drew
n7da

On Sun, Dec 8, 2019 at 4:30 PM Drew Arnett <[hidden email]> wrote:

>
> Two issues:
> 1.  I expanded prosigns after inserting the +++ --- speed control
> statements.  Whoops.  Fixed that.
> 2.  I had an echo test after host open.  Not sure why I did that,
> other than I must have been in a hurry.  Haven't changed that yet, but
> commenting it out in the code helped Joop during some early
> troubleshooting, so I may make that change after reviewing the
> winkeyer documentation.  This is likely keyer implementation specific.
> (I've been testing with an hamcrafters winkeyer USB, but should dig
> out my old Arduino K3NG implementation.)
>
> I suspect between the two, Joop's problem should be fixed.  Will
> continue to follow up per his test report.  I especially need to do
> something about #2 above.
>
> Besides +++ --- and a complete cwdaemon compatible prosign
> implementation, I added tune capability as well to pywinkeyerdaemon,
> so ALT-T works from tlf now.  Looks like tlf does a 6 second timeout
> for tune, cwdaemon supports 0 to 10 seconds, and winkeyer 0 to 99.  I
> guess how long is too long varies wildly depending on the situation!
> :-O  :-)  ALT-T would have been great to have yesterday when I was
> dealing with a fussy autotuner.
>
> Best regards
>
> Drew
> n7da
>
> On Sat, Nov 30, 2019 at 4:29 AM Drew Arnett <[hidden email]> wrote:
> >
> > I'll trouble shoot this with Joop off list.  Shouldn't be related to
> > the type of serial port, but we will see.  First step was a better
> > assertion statement that would provide the value that failed to match.
> > Good sign that the code got that far before throwing an error.  Will
> > be looking at K1EL docs, as that test came from there IIRC.
> >
> > Drew
> > n7da
> >
> > On Fri, Nov 29, 2019 at 8:18 PM Joop Stakenborg
> > <[hidden email]> wrote:
> > >
> > > Hi Drew,
> > >
> > >
> > > is pywinkerdaemon intended to work with USB ports? I get:
> > >
> > > $ ./pywinkeyerdaemon.py -d /dev/ttyUSB1 -p 6788
> > > Traceback (most recent call last):
> > >    File "./pywinkeyerdaemon.py", line 310, in <module>
> > >      winkeyer = Winkeyer(args.device)
> > >    File "./pywinkeyerdaemon.py", line 43, in __init__
> > >      self.host_open()
> > >    File "./pywinkeyerdaemon.py", line 57, in host_open
> > >      assert self.port.read(1).decode() == test_char
> > > AssertionError
> > >
> > >
> > > Joop PG4I
> > >
> > > Op 26-11-19 om 00:44 schreef Drew Arnett:
> > > > Finally knocked off some todos including porting to python3.  (still
> > > > runs on 2 as well)
> > > >
> > > > Also, finally added in message +/- controls (tested with TLF) and
> > > > support for cwdaemon prosigns.  (I hadn't been using these sorts of
> > > > things, so hadn't missed them personally, but they've
> > > > been on the TODO list too long.)
> > > >
> > > > +++TEST--- doesn't work unless there's a setspeed first.  (I didn't
> > > > find that function in the winkeyer interface.)  In testing, I found
> > > > that tlf sends a setspeed command at startup, so no problems.
> > > >
> > > > https://github.com/drewarnett/pywinkeyerdaemon
> > > >
> > > > Best regards,
> > > >
> > > > Drew
> > > > n7da
> > > >
> > >