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.
|
Forum Index : Microcontroller and PC projects : Serial console for CMM2 on Linux
Author | Message | ||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8567 |
In a separate thread issues were raised about using a serial console on Linux based computers to access the CMM2. In this thread I will explain how to do it in a way that works - or at least for me and TassyJim. First you need to download and install the latest CMM2 firmware V5.05.02RC28 available from http://geoffg.net/Downloads/Maximite/Colour_Maximite_2_MMBasic.zip Make sure you refresh your browser so it downloads the new copy. This was updated at 09:00 GMT on the 16/05/20 Then install PUTTY On the Raspberry Pi the command for this is: sudo apt-get install putty Now follow the instructions on the Microchip website for using LINUX with their MCP2221A USB/UART chip (NB this also works exactly the same for a Microbridge equipped CMM2). This has been tested on a Pi4 running Raspbian Buster. On some LINUX installs (not Raspbian) the system includes a modem manager that tries to treat any ACM device as a modem and sends unwanted characters to it during initialisation. Unless you are actually using a modem then disable this completely sudo systemctl stop ModemManager.service sudo systemctl disable ModemManager.service Run PUTTY and it should then work as expected. Don't change any of the defaults. The keyboard and function key setting should be ESC[n~ Hope this helps - please report any issues. Edited 2020-05-16 19:09 by matherp |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3831 |
Thank you Peter, I can confirm that RC28 fixes the issue for: RPi 3 Model B+ Raspbian GNU/Linux 9 (stretch) Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux Putty 0.67 (which is the current version for this Raspbian distribution) I'm a "monkey see, monkey do" kind of guy when it comes to anything system-level but I have strong suspicions that the above is unnecessary when using PuTTY and (if of any use at all) is applicable to using a command line serial terminal from Linux. - the first line creates a symbolic link from /dev/ttyS3 -> /dev/ttyACM0. - presumably so that the second line can set the baud specifically for use via ttyS3 rather than all uses of ttyACM0. HOWEVER my reading of the internet suggests 'stty' calls are not persistent across reboots, and I haven't been setting it each time, and I've now deleted my /dev/ttyS3 link and using /dev/ttyACM0 directy still works with PuTTY. I believe that for PuTTY on Raspbian (and probably Linux in general) all you need to do is (though the PuTTY UI): 1. Set "Connection type" -> "Serial" 2. Set "Serial line" -> /dev/ttyACM0 3. Set "Speed" -> 115200 4. Set "The Backspace key" -> Control-H 5. Set "The Function keys and keypad" -> ESC[n~ 6. Optional: set window size 100 x 50 7. Optional: set the colour for the ANSI Blue code to something lighter as the default is unreadable on a black background Now I've got some working tooling I can start bashing the CMM2 properly. Thanks again, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3831 |
It's also worth noting that PuTTY (at least on Linux) allows multiple connections to the same serial port !!! You don't want to do this, but if having got it working for the first time you then find you start getting nonsense in the output it's possibly because you've connected another instance without closing the first. Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5882 |
8. set the serial handshaking to "none" 9. set the font small enough to make sure that your 50 lines fit on your display. Putty does strange things if it decides to resize your terminal for you. I agree with using /dev/ttyACM0 directly. I think that the reason for using the symbolic link to a standard serial port is to prevent some comms programs from sending modem control codes. I had a lot of trouble with the ModemManager.service on my Linux PC probing the port. Jim Edited 2020-05-17 07:55 by TassyJim VK7JH MMedit MMBasic Help |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 3496 |
This is a very handy feature !! I use expect scripts using CU to control devices through serial port, and by having Putty opened, I can intervene if a script runs off. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Print this page |