Recent

Author Topic: Problem with serial ports.  (Read 5807 times)

Ugen312

  • New member
  • *
  • Posts: 7
Problem with serial ports.
« on: April 07, 2011, 05:43:18 pm »
OS Ubuntu 10.10, Lazarus 0.9.28.

I have 1+6 serial port installed. ttyS0 - Mother Board and ttyS[1-6] - PCI MCS9845.
All ports working with Serial-Port Monitor (common program in ubuntu), but using synaser or Sdpo works only first four ports ttyS[0-3], when i am trying to connect to the rest - program freezes. Any Help?

Well i figure out that if i first open port with "Serial port terminal" then i can work with it.

my config's from Ubuntu:

ugen@ugen-desktop:~$ ls -l /dev/ttyS*
crw-rw---- 1 root dialout 4, 64 2011-04-08 14:14 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 2011-04-08 14:15 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 2011-04-08 14:18 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 2011-04-08 14:18 /dev/ttyS3
crw-rw---- 1 root dialout 4, 68 2011-04-08 14:19 /dev/ttyS4
crw-rw---- 1 root dialout 4, 69 2011-04-08 14:19 /dev/ttyS5
crw-rw---- 1 root dialout 4, 70 2011-04-08 14:23 /dev/ttyS6

ugen@ugen-desktop:~$ dmesg | grep tty
[    0.000000] console [tty0] enabled
[    0.930556] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.931620] 00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.932158] 0000:01:01.0: ttyS4 at I/O 0xdc00 (irq = 22) is a 16550A
[    0.932434] 0000:01:01.0: ttyS5 at I/O 0xd880 (irq = 22) is a 16550A
[    0.932695] 0000:01:01.0: ttyS6 at I/O 0xd800 (irq = 22) is a 16550A
[    0.932953] 0000:01:01.0: ttyS1 at I/O 0xd480 (irq = 22) is a 16550A
[    0.933213] 0000:01:01.0: ttyS2 at I/O 0xd400 (irq = 22) is a 16550A
[    0.933472] 0000:01:01.0: ttyS3 at I/O 0xd080 (irq = 22) is a 16550A

ugen@ugen-desktop:~$ setserial -g /dev/ttyS*
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0xd480, IRQ: 22
/dev/ttyS2, UART: 16550A, Port: 0xd400, IRQ: 22
/dev/ttyS3, UART: 16550A, Port: 0xd080, IRQ: 22
/dev/ttyS4, UART: 16550A, Port: 0xdc00, IRQ: 22
/dev/ttyS5, UART: 16550A, Port: 0xd880, IRQ: 22
/dev/ttyS6, UART: 16550A, Port: 0xd800, IRQ: 22


« Last Edit: April 08, 2011, 12:55:05 pm by Ugen312 »

Ugen312

  • New member
  • *
  • Posts: 7
Re: Problem with serial ports.
« Reply #1 on: April 11, 2011, 01:47:17 pm »
Well, something needs to do with os Ununtu (or linux).
If data cable is plugged in to the com port during OS boot then program has access to port, other way it freeze with timeout error.

What linux do during OS boot that it disable port without cables?

Ugen312

  • New member
  • *
  • Posts: 7
Re: Problem with serial ports.
« Reply #2 on: April 12, 2011, 01:28:33 pm »
Well, one problem i solved. It was wrong modem setting dtr dsr etc.
But if there is no modem connected (empty serial port) so Synaser wait for response and program freeze until timeout or i connect a modem.
Try to change     RTS    DTR parameters, but the same result.

From synaser example

ser.connect('/dev/ttyS3');  --- goes in waiting status, so why or how add a timeout to make it halt with an error if no response?

Promlem solved, it is in Ubuntu version build, installed 10.04 and everything works!
« Last Edit: April 14, 2011, 06:03:15 am by Ugen312 »

 

TinyPortal © 2005-2018