Lady Heather on RPi "no com port open" error - Page 1
Forum section: electronics / general

author: Robert763
author_rank: Super Contributor
timestamp: November 15, 2020, 05:09:25 pm
content: So I'm trying to set up an old Raspberry Pi 2 with a touch screen as a front end for my Thunderbolt. First of all I'm not a Linux user. However I've managed to build the software and got it all running, except that it can't open the the serial port. I've tried all the fixes I can find online and in the readme e.g. usermod dialout etc. The confing settings including dev/ttyAMA0 are showing up on LH ok but when starting a "no com port open" message flashes up. Hardware is OK CuteCom with port AMA0 selected will talk t a PC (proper serial port not USB adaptor) with no issues.Any suggestions?

author: tkamiya
author_rank: Super Contributor
timestamp: November 16, 2020, 03:55:17 am
content: Are you 100% sure no other program is holding that com port? What about hand-shake? Is it expecting carrier detect or some other signal to go ready before talking? I've actually experienced both.

author: Robert763
author_rank: Super Contributor
timestamp: November 16, 2020, 09:09:40 am
content: Com port is available. CuteCom can use it. Yes I've tyred it before and after running CuteCom.This seems to be a Lady Heather specific issue.

author: guenthert
author_rank: Frequent Contributor
timestamp: November 16, 2020, 05:25:11 pm
content: Which version of Lady Heather are you using? I don't have the problem here and after a cursory look in the source code, can't find where that error is reported (there is a "no_com" label in heathgps.cpp, but no such output).

author: Robert763
author_rank: Super Contributor
timestamp: November 16, 2020, 06:40:23 pm
content: Hi,The latest "Linux and other OS's" Beta HeatherX11The message comes up in the LH green vector font before the main screen opens.Robert G8RPI.

author: guenthert
author_rank: Frequent Contributor
timestamp: November 16, 2020, 11:47:47 pm
content: I could have shared the version I don't have problems with: 5.0 (stated as such in the readme.txt file, sadly there are no git tags). Most recent commit here is 2147baf0275543a0b8cb33324fb1080eb4704ec6 at Fri Jan 19 16:18:38 2018 -0700.Generally, if I have difficulties of similar kind with applications in Linux, I attempt to run them under strace, e.g.strace -f heather, which should then indicate which system call fails and which arguments where given there.

author: Robert763
author_rank: Super Contributor
timestamp: November 17, 2020, 12:37:39 pm
content: Hi,Thanks for the help, but as non-linux user (other than this) I don't understand it.I was hoping somone may have got LH running on a RPi before.

author: mjkuwp
author_rank: Unknown
timestamp: November 23, 2020, 12:14:15 am
content: I don't know what this lady heather is, but I have used the serial ports with gpio and using Rasbian as the oS. Sometimes there are different names assigned to the port such as ttyUSB0 or ttyAMA0 or even ttyS0 and I have had to navigate around one board version that used a serial port in some way related to the Bluetooth.Googling around I found this, maybe it is related.https://lists.febo.com/pipermail/time-nuts_lists.febo.com/2018-November/094614.html

author: cdev
author_rank: Super Contributor
timestamp: November 23, 2020, 02:45:17 am
content: Watch out! OS upgrades have repeatedly changed how different hardware versions handle everything, UARTs being one of them. You need to keep up with the changes. You get a good idea of all the different configurations in a file in the overlays folder at the root level, in the boot folder. Make sure to read the entire thing. Advice given for one OS version or for one kind of RPI (there are now many of them) won't necessarily work for another one.Not getting the video display modes right can also cause strange problems with video monitors.

author: artag
author_rank: Super Contributor
timestamp: November 24, 2020, 01:51:26 pm
content: Does it work if you use a USB port instead ?Heather uses a slightly odd way to specify device names - it constructs names like /dev/ttyUSB0 internally. I presume you're using the /id=/dev/ttyAMA0 config option to choose a nonstandard (for linux) name but maybe that's broken - it probably isn't often used.

author: cdev
author_rank: Super Contributor
timestamp: November 24, 2020, 03:24:13 pm
content: Could you post your current "config.txt" and "cmdline.txt"?

author: Robert763
author_rank: Super Contributor
timestamp: November 28, 2020, 01:18:49 pm
content: Quote from: cdev on November 24, 2020, 03:24:13 pmThere is only Heather.cfg see attached.Note that CuteCom works with AMA0.Rober G8RPI.

author: artag
author_rank: Super Contributor
timestamp: November 29, 2020, 08:12:00 pm
content: Does it make a difference if you write /dev/ttyama0 instead of dev/ttyama0 ?Also, case is significant. I don't have a Pi running right now I can checkdo "ls /dev/tty*" to see what the actual device is called.In DOS, the device nodes such as COM1 are not really in the filesystem, they're faked and so there's no need for /dev.In Unix, you need the actual location in the filesystem, and the path will default to the current directory, not root.So trying to open dev/ttyAMA0 might, depending on where you have the LH stuff, try to open /home/robert/ttyAMA0

author: Whales
author_rank: Super Contributor
timestamp: November 30, 2020, 01:07:55 am
content: Quote from: artag on November 29, 2020, 08:12:00 pmYes it will make a difference, the version without the leading slash will be completely wrong (it will be read as relative to the current directory). Indeed Linux doesn't special-case certain filesystem names like Windows and DOS do. (EDIT: actually I lie, stdin stdout stderr tend to have special numeric file descriptors of 0 1 2, but I'm not sure if this is enforced or not)[Fun task: try and create a filed called "aux.txt" or "con.jpeg" on Windows]Whenever people have problems accessing UART nodes in /dev/ my immediate suspicions are:1. Permissions2. Already being read from by another programRobert763:are you running Cutecom as your own user or as root? Does it prompt you for a password at any point? What about Lady Heather?Temporary hack to try: sudo chmod a+rw /dev/tty* . This temporarily grants all users read & write permissions to all of your USB uarts (and all of your ttys, but if it's a single-user computer then you probably don't care).If this doesn't work: I would start debugging lady heather. My starting point would be to run it via strace and see what error codes are being generated when it tries to open /dev/ttyXYZ. Eg something like:strace ./ladyheath 2>stracelog.txtfollowed by:grep '/dev/tty' -C20 stracelog.txt

author: Whales
author_rank: Super Contributor
timestamp: November 30, 2020, 01:16:23 am
content: Looking at the source of Lady Heather:Code:else if(rcvr_type == (-1)) {s = "No COM port open";goto bad_port;}It's a bit hard to follow (long slab of code), but Ithinkthis may be caused when Lady Heather can't determine what brand/make of GPS unit you are using. Your use of the /dev/tty* nodemayactually be fine, with something else at play causing the issue.

author: Robert763
author_rank: Super Contributor
timestamp: November 30, 2020, 12:52:11 pm
content: Hi,Thanks for all the help. It lsounds like the / is the issue. The serial port does not transmit anything when LH starts so I don't think it is lack of a GPS. The terminal function within LH does not transmit data either.I've something else on the bench at the moment, but will get the RPi set up and try adding the / when that is finished. I'll also try a USB serial port adaptor.Robert G8RPI.

author: Robert763
author_rank: Super Contributor
timestamp: January 22, 2021, 11:27:33 am
content: Sorry for delayed response. Work and other projects got in the way.It was the missing /-id=/dev/ttyama0 enables the portThanks for all the help.

author: Robert763
author_rank: Super Contributor
timestamp: February 04, 2021, 02:34:55 pm
content: So an update and final result.As you know, I decided to try upgrading to Lady Heather running on a Raspberry Pi. Only problem is I've never been a big Linux user and haven't touched it for at least 5 years. So compiling some code for for a beta version of LH will be no problem, right?So bought a 5" HDMI LCD with touchscreen and a Pi B (I already had another B).So first problem was the compiler would not run on the old version of Raspbian on the Pi B. Tried updating Raspbian which was impossibly slow on the B. So I bought a Pi 3B did the compile on that and then put the SD card in the B. That worked OK. Then got the HDMI screen working, another pain. Next big pain was getting the serial port to work. Ordered a 3.3V RS232 chip and built that up and not too hard to get it working with a terminal program. Getting it to run in LH was another level. Final hurdle was that missing / in the config file. Got the touch screen working next only to find it broke the serial port.Then looked at fitting it all in the existing case, an old HP System 1 1/2 width. This highlights the "maker" crap nature of the Pi, LCD and interface. It's easy to plug the Pi on the back of the display and get it running, but the LCD has no mountings and blocks the whole I/O port with no pass through.And the HDMI connector sticks out the top. This meant I had to make a breakout ribbon cable for the I/O and turn the screen upside down to mount it at the top of the front panel. That was more display config changes (broke the comm port again).So a lot more work than I wanted but the end result is good.