Serial port access problems

I have an application that reads weather data from a weather station via a one wire network.
All worked fine until I did a system update a month ago. For some reason it now cannot access the network. I can run a loopback using cutecom without error and the network is working fine under Windows. If I try to run a text mode program that does the same reading etc. it doesn’t register an error or anything but it does not return any data instead ending with this statement in the terminal:
g_module_open IO: Success

I have checked permissions etc. and am now completely stumped. Anyone got any idea what might be going on??

What does these commands report?

 dmesg | grep tty
setserial -g /dev/ttyS* 

I know you mentioned that the necessary permissions seem to be ok. Which version of openSUSE are you using? With 11.2, I think you need to be a member of dialout (and uucp for lock file creation).

dmesg | grep tty
console [tty0] enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:09: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0a: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
linux-2vc5:/home/benbowc/NetBeansProjects/example/dist/Debug/GNU-Linux-x86 # setserial -g /dev/ttyS*
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS5, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS6, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS7, UART: unknown, Port: 0x0000, IRQ: 0

And uname reports:
2.6.27.45-0.1-pae #1 SMP 2010-02-22 16:49:47 +0100 i686 i686 i386 GNU/Linux

TIA

And uname reports:
2.6.27.45-0.1-pae #1 SMP 2010-02-22 16:49:47 +0100 i686 i686 i386 GNU/Linux

Thats your kernel version. I just wanted to know which version of openSUSE you were using. As a regular user, open a console and check the output of

groups

You can add yourself to the appropriate group (dialout, uucp) via YaST if necessary.

Are you sure this isn’t just a serial port config (eg serial speed) issue? This can be configured by setserial or within cutecom iteslf.

man setserial

OpenSuse 11.1
Member of dialout and uucp already.
Serial port is configured by software as it starts up so should be no issue there.
Is there some version of the kernel that is required to use serial ports or something? To me it looks like Gnome or something is getting in the way. I might try going to a lower run level and see if the text mode stuff works without the GUI running.

Is there some version of the kernel that is required to use serial ports or something?

No. Anyway, your dmesg and setserial results reveal correct operation here.

To me it looks like Gnome or something is getting in the way. I might try going to a lower run level and see if the text mode stuff works without the GUI running.

Good idea.

Did you initially install cutecom via yast software installer? What version?

rpm -qa |grep cutecom

I notice via webpin search that there is a couple of versions available (and also cutecom-qt3 for KDE users):

Webpin

Cutecom came from SVN. There is no rpm available. This one is Qt 4 and seems to work flawlessly. Version 0.22.0
Dropping to text mode for a while. Might be a while before I come back with results.
Cheers

There is no rpm available.

Yes there is, but you need to check out the webpin link I provided.

Oh OK wasn’t aware of that WebPin version…
CuteCom works fine and can read and write from the port no trouble. Its starting to look like there has been some change to the IO routines and the code no longer works. Seems strange I’m not getting errors but if one program works and another doesn’t it is starting to look like its a code problem. If I can figure out how to get some test code into an IDE so I can step through it maybe I can find the issue.
For the record I still got that g_module_open IO:Success message and no results.

I guess a Qt library update broke it somehow. For the record, can you post your list of repos?

zypper lr -d

It might just be that something is amiss. I’m not an expert here, so hopefully something obvious, (even if it allows you to file a bug report).

This will help you to find out what was updated recently:

rpm -qa --last

Further ideas: I think if you install one of the cutecom packages listed via webpin, you will find the package manager will take care of any dependencies (eg missing Qt packages), and this may correct the issue you’re having. Alternatively, try compiling and re-installing the cutecom app again. It may throw an error about what is missing.

zypper lr -d

| Alias | Name | Enabled | Refresh | Priority | Type | URI | Service

—±--------------------------------------------±--------------------------------------------±--------±--------±---------±-------±--------------------------------------------------------------------------------------------±-------
1 | 20090131-180129 | 20090131-180129 | Yes | Yes | 99 | rpm-md | Index of /repositories/KDE:/KDE4:/UNSTABLE:/Desktop/openSUSE_11.1 |
2 | 20091220-170504 | 20091220-170504 | Yes | Yes | 99 | yast2 | Index of /distribution/11.1/repo/non-oss |
3 | KDE:Qt | KDE:Qt | Yes | Yes | 99 | rpm-md | Index of /repositories/KDE:/Qt/openSUSE_11.1 |
4 | Libdvdcss_repository | Libdvdcss repository | Yes | Yes | 99 | rpm-md | http://www.opensuse-guide.org/repo/11.1/ |
5 | Main Repository (NON-OSS) | Main Repository (NON-OSS) | No | Yes | 99 | NONE | Index of /distribution/11.0/repo/non-oss/suse |
6 | Main Repository (OSS) | Main Repository (OSS) | No | Yes | 99 | NONE | Index of /distribution/11.0/repo/oss |
7 | NVIDIA Repository | NVIDIA Repository | Yes | Yes | 99 | rpm-md | http://download.nvidia.com/opensuse/11.1 |
8 | Packman | Packman | Yes | Yes | 99 | rpm-md | Index of /pub/linux/misc/packman/suse/11.1 |
9 | Packman Repository | Packman Repository | Yes | Yes | 99 | rpm-md | Index of /pub/packman/suse/11.1 |
10 | VLC | VLC | No | Yes | 99 | rpm-md | Index of /pub/vlc/SuSE/11.0/ |
11 | games | games | Yes | No | 99 | rpm-md | Index of /repositories/games/openSUSE_11.1 |
12 | http://download.nvidia.com/opensuse/11.0 | http://download.nvidia.com/opensuse/11.0 | Yes | Yes | 99 | rpm-md | http://download.nvidia.com/opensuse/11.0 |
13 | Index of /pub/packman/suse/11.0 | Index of /pub/packman/suse/11.0 | Yes | Yes | 99 | rpm-md | Index of /pub/packman/suse/11.0 |
14 | openSUSE 11.1-0 | openSUSE 11.1-0 | Yes | No | 99 | yast2 | cd:///?devices=/dev/sr0 |
15 | openSUSE-11.0-Updates | openSUSE-11.0-Updates | No | Yes | 99 | NONE | Index of /update/11.0 |
16 | openSUSE:11.1:Update | openSUSE:11.1:Update | Yes | Yes | 99 | rpm-md | Index of /update/11.1 |
17 | repo | openSUSE BuildService - OpenOffice.org | Yes | Yes | 99 | rpm-md | Index of /repositories/OpenOffice.org:/STABLE/openSUSE_11.1 |
18 | repo-debug | openSUSE-11.1-Debug | No | Yes | 100 | NONE | Index of /debug/distribution/11.1/repo/oss |
19 | repo-non-oss | openSUSE-11.1-Non-Oss | Yes | Yes | 100 | yast2 | Index of /distribution/11.1/repo/non-oss |
20 | repo-oss | openSUSE-11.1-Oss | Yes | Yes | 100 | yast2 | Index of /distribution/11.1/repo/oss |
21 | repo-source | openSUSE-11.1-Source | Yes | Yes | 100 | yast2 | Index of /source/distribution/11.1/repo/oss |
22 | repo-update | openSUSE-11.1-Update | Yes | Yes | 20 | rpm-md | Index of /update/11.1 |
23 | repo_1 | openSUSE BuildService - Database | Yes | Yes | 99 | rpm-md | Index of /repositories/server:/database/openSUSE_11.1 |
24 | repo_2 | openSUSE BuildService - PHP | Yes | Yes | 99 | rpm-md | Index of /repositories/server:/php/openSUSE_11.1

I think we are talking at cross purposes here. Cutecom works just fine and can interact with the port no troubles. The other applications will not work at all through the port and I get no sensible response in the error logging. It almost seems the IO calls are not working correctly and there is no transmission occurring. I will have to look into the code to see if there is something thats deprecated. I am very surprised by that but have no other explaination???

Well, I can see why an update broke something. I’m only surprised your system works at all. I can see you have repos for openSUSE 11.0 in the mix. Delete these for a starter: 5,6,10,12,13,14,15

For example

zypper rr 15

There’s probably a lot of others that could be causing problems for you. I recommend keeping only the oss, non-oss, update, and packman repos enabled. I’m not sure that the KDE:Qt repo (3) is a good idea either. When your done, I would repost your repo list to see what else might need adjusting. This is at the limit of my knowledge.

Not sure how the 11.0 repos got there but I’m not sure what if any effect they would have. Presumably when you update a package it grabs the latest version anyway. I stand to be corrected :slight_smile:
As it is now:

| Alias | Name | Enabled | Refresh | Priority | Type | URI | Service

—±---------------------±---------------------------------------±--------±--------±---------±-------±--------------------------------------------------------------------------------------------±-------
1 | 20090131-180129 | 20090131-180129 | Yes | Yes | 99 | rpm-md | Index of /repositories/KDE:/KDE4:/UNSTABLE:/Desktop/openSUSE_11.1 |
2 | 20091220-170504 | 20091220-170504 | Yes | Yes | 99 | yast2 | Index of /distribution/11.1/repo/non-oss |
3 | Libdvdcss_repository | Libdvdcss repository | Yes | Yes | 99 | rpm-md | http://www.opensuse-guide.org/repo/11.1/ |
4 | NVIDIA Repository | NVIDIA Repository | Yes | Yes | 99 | rpm-md | http://download.nvidia.com/opensuse/11.1 |
5 | Packman | Packman | Yes | Yes | 99 | rpm-md | Index of /pub/linux/misc/packman/suse/11.1 |
6 | Packman Repository | Packman Repository | Yes | Yes | 99 | rpm-md | Index of /pub/packman/suse/11.1 |
7 | games | games | Yes | No | 99 | rpm-md | Index of /repositories/games/openSUSE_11.1 |
8 | openSUSE:11.1:Update | openSUSE:11.1:Update | Yes | Yes | 99 | rpm-md | Index of /update/11.1 |
9 | repo | openSUSE BuildService - OpenOffice.org | Yes | Yes | 99 | rpm-md | Index of /repositories/OpenOffice.org:/STABLE/openSUSE_11.1 |
10 | repo-debug | openSUSE-11.1-Debug | No | Yes | 100 | NONE | Index of /debug/distribution/11.1/repo/oss |
11 | repo-non-oss | openSUSE-11.1-Non-Oss | Yes | Yes | 100 | yast2 | Index of /distribution/11.1/repo/non-oss |
12 | repo-oss | openSUSE-11.1-Oss | Yes | Yes | 100 | yast2 | Index of /distribution/11.1/repo/oss |
13 | repo-source | openSUSE-11.1-Source | Yes | Yes | 100 | yast2 | Index of /source/distribution/11.1/repo/oss |
14 | repo-update | openSUSE-11.1-Update | Yes | Yes | 20 | rpm-md | Index of /update/11.1 |
15 | repo_1 | openSUSE BuildService - Database | Yes | Yes | 99 | rpm-md | Index of /repositories/server:/database/openSUSE_11.1 |
16 | repo_2 | openSUSE BuildService - PHP | Yes | Yes | 99 | rpm-md | Index of /repositories/server:/php/openSUSE_11.1

These repos are duplicated: 2 and 11, 10 and 12, 8 and 14, 5 and 6 are different mirrors, same repo though. This won’t do any harm, but no sense keeping both copies.

See if

zypper up -t package

or

zypper ve

suggests any changes.

I think we are talking at cross purposes here. Cutecom works just fine and can interact with the port no troubles. The other applications will not work at all through the port and I get no sensible response in the error logging.

Sorry, I missed this. So you’re saying cutecom works ok, but not other serial terminal apps?

Ran both those and many updates were installed.

Yes it is other applications that fail and I cannot fathom why. I find it really odd I get that “g_module_open IO:Success” message in the terminal after the program startup then nothing. Its really strange as all this used to work flawlessly.
Thanks for your assistance, hopefully I can get it sorted sometime soon!

Hey guess what!!!
Its working again and I have no idea what was wrong!
Must have been some library incompatability or something.

Thank you so very much you just made my day :wink:

Thanks for the update. Take care with those repos! :slight_smile: