[SOLVED] Serial port

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] Serial port

Postby bkv1958 » Apr 27th, '12, 22:25

Hi

I need to use the serial port on my Dell Latitude D630, but the application can't find it. Neither can I find it in the hardware section of Mageia Control Center. do you know what the problem is?

Thanks.
Last edited by bkv1958 on May 6th, '12, 18:26, edited 1 time in total.
bkv1958
 
Posts: 10
Joined: Jan 22nd, '12, 21:25

Re: Serial port

Postby doktor5000 » Apr 28th, '12, 17:37

Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Serial port

Postby bkv1958 » Apr 28th, '12, 22:18

doktor5000 wrote:Maybe you want to have a look at http://www.cyberciti.biz/faq/find-out-l ... setserial/ ?

Thanks,
I get this out

Code: Select all
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4


Still, my application says there is no serial port.
bkv1958
 
Posts: 10
Joined: Jan 22nd, '12, 21:25

Re: Serial port

Postby Ken-Bergen » Apr 29th, '12, 04:17

bkv1958 wrote:Still, my application says there is no serial port.
Perhaps telling us what the application is would help, or is that top secret?
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: Serial port

Postby bkv1958 » Apr 29th, '12, 11:06

Ken-Bergen wrote:
bkv1958 wrote:Still, my application says there is no serial port.
Perhaps telling us what the application is would help, or is that top secret?


No it is not secret :) It is JMRI, a java application. http://jmri.sourceforge.net/

I had also expected to see the serial port in the hardware section of the control center.
bkv1958
 
Posts: 10
Joined: Jan 22nd, '12, 21:25

Re: Serial port

Postby djennings » Apr 29th, '12, 12:12

Take a look at the permissions of /dev/ttyS0 Maybe your user does not have permission to access it.
Code: Select all
ls -l /dev/ttyS0
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: Serial port

Postby bkv1958 » Apr 29th, '12, 12:52

I get this:
crw-rw---- 1 root dialout 4, 64 Apr 29 11:00 /dev/ttyS0
bkv1958
 
Posts: 10
Joined: Jan 22nd, '12, 21:25

Re: Serial port

Postby djennings » Apr 29th, '12, 14:14

bkv1958 wrote:I get this:
crw-rw---- 1 root dialout 4, 64 Apr 29 11:00 /dev/ttyS0


There is your problem. The port is owned by root and members of the group dialout can access it, but others cannot.
The solution is to open MageiaControlCentre>System>Users>Groups and edit the group dialout to add yourself as a member.
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: Serial port

Postby bkv1958 » Apr 29th, '12, 16:59

still no luck. Is there an other program which I could try, that would look for serial ports?
bkv1958
 
Posts: 10
Joined: Jan 22nd, '12, 21:25

Re: Serial port

Postby djennings » Apr 29th, '12, 19:26

Tp test a serial port
http://www.cyberciti.biz/faq/find-out-linux-serial-ports-with-setserial/
setserial is in the setserial package. You may need to install it

To confirm you are a member of the dialout group
Code: Select all
more /etc/groups | grep dialout
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: Serial port

Postby bkv1958 » Apr 29th, '12, 19:55

This is what I get

Code: Select all
[bjorn@localhost rsync]$ setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
        Baud_base: 115200, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal skip_test


more /etc/group | grep dialout
dialout:x:83:bjorn

bkv1958
 
Posts: 10
Joined: Jan 22nd, '12, 21:25

Re: Serial port

Postby juergen_harms » Apr 30th, '12, 08:39

In case your problem is not yet sorted out:

- If you launch your application by clicking a menu or desktop item, you should look what happens if you launch it from a command line in a shell console - the application might print valuable information to its standard or error output that might contain helpful information

- Many tty applications use the /var/lock/tty directory for creating lock files that prevent several applications using the tty port in an uncoordinated way. Mageia does not create that directory by default (and I do not know whether your applications really needs it - is there documentation, for instance in a README file?). Nevertheless, may be worth while to try to create one if problems persist; you do that from a shell console and with root privileges:
    mkdir /var/lock/tty
    chgrp dialout /var/lock/tty
    chmod g+w /var/lock/tty
will create such a directory (and does not do any harm). Sorry for this "preventive dump" - I dont regularly visit this forum
juergen_harms
 
Posts: 130
Joined: Mar 30th, '11, 22:36

Re: Serial port

Postby djennings » Apr 30th, '12, 14:38

bkv1958 wrote:This is what I get

Code: Select all
[bjorn@localhost rsync]$ setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
        Baud_base: 115200, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal skip_test


more /etc/group | grep dialout
dialout:x:83:bjorn


That looks like it is working to me.
To confirm operation you can use minicom to output characters to the port and receive responses assuming you know how to control whatever is on the other end. There is a minicom package in Mageia.
http://en.wikipedia.org/wiki/Minicom
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

[Solved]Re: Serial port

Postby bkv1958 » May 6th, '12, 18:20

Thanks, I got it to work. Must say, I am no quite certain what did the trick. At least I learned something abount dealing with serial ports, thanks
bkv1958
 
Posts: 10
Joined: Jan 22nd, '12, 21:25


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest