Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
frnno967 Senior Member Joined: 02/10/2020 Location: United StatesPosts: 105
Posted: 04:34am 10 Dec 2020
Copy link to clipboard
Print this post
This is probably a question for Peter Mather. I'm having trouble getting the CMM2 to communicate with my PC when using COM3 when using OPTION CONSOLE SCREEN.
When connecting the CMM2 to a PC using the USB B Power Port (that doubles as COM3), the CMM2 is able to send data to the PC, but the CMM2 isn't receiving data sent from the PC. I suspect the culprit is that when the CMM2 is in OPTION CONSOLE BOTH mode the firmware asserts all of the proper control signals (DSR, CTS, etc,.) for communication to work, but in OPTION CONSOLE SCREEN mode it doesn't assert the signals. I need it to work correctly in OPTION CONSOLE SCREEN mode so that my terminal program will work correctly with a PC running TCPSER over COM3.
When using OPTION CONSOLE BOTH the connection works bidirectionally, as expected, but this is not my use case to pass-thru the CMM2 output to the PC.
To recap, in OPTION CONSOLE SCREEN mode: CMM2 ---> PC (GOOD) CMM2 <--- PC (NO DATA RX BY CMM2)
I'm using firmware 5.05.06RC5. Thanks in advance.Jay Crutti: Ham Radio Operator, K5JCJ. Computer Enthusiast. Musician. Engineer.
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10590
Posted: 08:11am 10 Dec 2020
Copy link to clipboard
Print this post
Just tested on 5.06.00RC5
option console screen option console save
open "com3:115200" as #1
with teraterm connected on PC
print #1,"Hello"
teraterm sees Hello
Type "bye" into teraterm
? input$(3,1)
prints "bye"
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 478
Posted: 11:06am 10 Dec 2020
Copy link to clipboard
Print this post
It works for me using TeraTerm on a Windows 10 PC. I have flow control turned off in TeraTerm.
Have you tried turning off handshaking or asserting those signals in the terminal program?
frnno967 Senior Member Joined: 02/10/2020 Location: United StatesPosts: 105
Posted: 06:19pm 10 Dec 2020
Copy link to clipboard
Print this post
I believe I've discovered the problem. Your code above works, but when I'm using COM3 in my terminal program the user defined Interrupt routine is not being called when the COM is COM3. The data is in the buffer but it just sits there.
My terminal program opens the COM port with this command: open "COM3:115200,256,get_serial_input" as 5
And this is my subroutine: sub get_serial_input CHARS_IN$ = input$(LOC(#5),#5) print CHARS_IN$; end sub
But get_serial_input is never called if I'm using COM3. If I put print input$(LOC(#5),#5) in the main loop of my program (forcing it to poll the incoming data) then the characters are received.
Could this be a bug with the OPEN comspec$ AS [#]fnbr command ?Jay Crutti: Ham Radio Operator, K5JCJ. Computer Enthusiast. Musician. Engineer.
frnno967 Senior Member Joined: 02/10/2020 Location: United StatesPosts: 105
Posted: 06:41pm 10 Dec 2020
Copy link to clipboard
Print this post
Also, an unrelated issue:
The firmware Xmodem routines won't work over COM3 when OPTION CONSOLE SCREEN is set. It gives an error "Serial Console Disabled." Assuming that's because it's hardcoded to think COM3 is unavailable when OPTION CONSOLE SCREEN is set? Can that be changed?
Thank you.Jay Crutti: Ham Radio Operator, K5JCJ. Computer Enthusiast. Musician. Engineer.
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10590
Posted: 10:35pm 10 Dec 2020
Copy link to clipboard
Print this post
Will post a fix for COM3 issues tomorrow
frnno967 Senior Member Joined: 02/10/2020 Location: United StatesPosts: 105
Posted: 10:43pm 10 Dec 2020
Copy link to clipboard
Print this post
Thank you good sir!Jay Crutti: Ham Radio Operator, K5JCJ. Computer Enthusiast. Musician. Engineer.
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10590
Posted: 01:18pm 12 Dec 2020
Copy link to clipboard
Print this post
Please test the version I've just posted on the RC1 thread to see if I've fixed the com3 issues