Author Topic: Lady Heather on RPi "no com port open" error  (Read 3206 times)

0 Members and 2 Guests are viewing this topic.

Online Robert763Topic starter

  • Super Contributor
  • ***
  • Posts: 2842
  • Country: gb
Lady Heather on RPi "no com port open" error
« on: November 15, 2020, 05:09:25 pm »
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?

 

Offline tkamiya

  • Super Contributor
  • ***
  • Posts: 2178
  • Country: us
Re: Lady Heather on RPi "no com port open" error
« Reply #1 on: November 16, 2020, 03:55:17 am »
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. 
 

Online Robert763Topic starter

  • Super Contributor
  • ***
  • Posts: 2842
  • Country: gb
Re: Lady Heather on RPi "no com port open" error
« Reply #2 on: November 16, 2020, 09:09:40 am »
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.
 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 750
  • Country: de
Re: Lady Heather on RPi "no com port open" error
« Reply #3 on: November 16, 2020, 05:25:11 pm »
     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).
 

Online Robert763Topic starter

  • Super Contributor
  • ***
  • Posts: 2842
  • Country: gb
Re: Lady Heather on RPi "no com port open" error
« Reply #4 on: November 16, 2020, 06:40:23 pm »
Hi,
The latest "Linux and other OS's" Beta HeatherX11
The message comes up in the LH green vector font before the main screen opens.

Robert G8RPI.
« Last Edit: November 16, 2020, 08:45:04 pm by Robert763 »
 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 750
  • Country: de
Re: Lady Heather on RPi "no com port open" error
« Reply #5 on: November 16, 2020, 11:47:47 pm »
     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.
« Last Edit: November 16, 2020, 11:51:38 pm by guenthert »
 

Online Robert763Topic starter

  • Super Contributor
  • ***
  • Posts: 2842
  • Country: gb
Re: Lady Heather on RPi "no com port open" error
« Reply #6 on: November 17, 2020, 12:37:39 pm »
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.

 
 

Offline mjkuwp

  • Supporter
  • ****
  • Posts: 260
  • Country: us
  • mechanical engineering defector
    • The Mz Lab
Re: Lady Heather on RPi "no com port open" error
« Reply #7 on: November 23, 2020, 12:14:15 am »


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
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: Lady Heather on RPi "no com port open" error
« Reply #8 on: November 23, 2020, 02:45:17 am »
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.
« Last Edit: November 23, 2020, 02:53:45 am by cdev »
"What the large print giveth, the small print taketh away."
 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1212
  • Country: gb
Re: Lady Heather on RPi "no com port open" error
« Reply #9 on: November 24, 2020, 01:51:26 pm »
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.


 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: Lady Heather on RPi "no com port open" error
« Reply #10 on: November 24, 2020, 03:24:13 pm »
Could you post your current "config.txt" and "cmdline.txt"?
"What the large print giveth, the small print taketh away."
 

Online Robert763Topic starter

  • Super Contributor
  • ***
  • Posts: 2842
  • Country: gb
Re: Lady Heather on RPi "no com port open" error
« Reply #11 on: November 28, 2020, 01:18:49 pm »
Could you post your current "config.txt" and "cmdline.txt"?

There is only Heather.cfg see attached.
Note that CuteCom works with AMA0.

Rober G8RPI.
 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1212
  • Country: gb
Re: Lady Heather on RPi "no com port open" error
« Reply #12 on: November 29, 2020, 08:12:00 pm »
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 check

do "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



« Last Edit: November 29, 2020, 08:21:25 pm by artag »
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 2017
  • Country: au
    • Halestrom
Re: Lady Heather on RPi "no com port open" error
« Reply #13 on: November 30, 2020, 01:07:55 am »
Does it make a difference if you write /dev/ttyama0 instead of dev/ttyama0 ?

[...]

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.

Yes 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 :P]



Whenever people have problems accessing UART nodes in /dev/ my immediate suspicions are:

1. Permissions
2. Already being read from by another program

Robert763: 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 :P .   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.txt

followed by:

grep '/dev/tty' -C20 stracelog.txt

« Last Edit: November 30, 2020, 01:11:02 am by Whales »
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 2017
  • Country: au
    • Halestrom
Re: Lady Heather on RPi "no com port open" error
« Reply #14 on: November 30, 2020, 01:16:23 am »
Looking at the source of Lady Heather:

Code: [Select]
   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 I think this may be caused when Lady Heather can't determine what brand/make of GPS unit you are using.  Your use of the /dev/tty* node may actually be fine, with something else at play causing the issue.

Online Robert763Topic starter

  • Super Contributor
  • ***
  • Posts: 2842
  • Country: gb
Re: Lady Heather on RPi "no com port open" error
« Reply #15 on: November 30, 2020, 12:52:11 pm »
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.
 

Online Robert763Topic starter

  • Super Contributor
  • ***
  • Posts: 2842
  • Country: gb
Re: Lady Heather on RPi "no com port open" error
« Reply #16 on: January 22, 2021, 11:27:33 am »
Sorry for delayed response. Work and other projects got in the way.
It was the missing /
-id=/dev/ttyama0 enables the port  :-+

Thanks for all the help.
 
The following users thanked this post: Whales

Online Robert763Topic starter

  • Super Contributor
  • ***
  • Posts: 2842
  • Country: gb
Re: Lady Heather on RPi "no com port open" error
« Reply #17 on: February 04, 2021, 02:34:55 pm »
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? :palm: 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  |O.
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  |O ).
So a lot more work than I wanted but the end result is good.
 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf