Author Topic: How to find installed Serial Ports?  (Read 919 times)

Offline buckeye

  • Full Member
  • ***
  • Posts: 199
How to find installed Serial Ports?
« on: December 13, 2010, 01:16:42 PM »
I'm trying to get my built-in fax modem to send faxes with efax-gtk but it can't find my hardware.  I can't find my serial hardware using the PCLOS Control Center.  What is the utility to probe & verify my serial hardware is working? 

Ultimately I'd like to get my com ports to work with XP running in a Virtualbox.  I've tried a number of Vbox setting with no luck.  I can't see my serial ports in PCLOS, and XP can't see the COM ports in Vbox.

Is there a trick to this?

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15309
  • ┌∩┐(◕_◕)┌∩┐
Re: How to find installed Serial Ports?
« Reply #1 on: December 13, 2010, 01:22:56 PM »
Any use buckeye ?

http://www.cyberciti.biz/faq/find-out-linux-serial-ports-with-setserial/

There is an app in the repos called "setserial"
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: How to find installed Serial Ports?
« Reply #2 on: December 13, 2010, 01:27:03 PM »
You might try

statserial   from the repository

Quote
A tool which displays the status of serial port modem lines
The statserial utility displays a table of the signals on a standard
9-pin or 25-pin serial port and indicates the status of the
handshaking lines.  Statserial is useful for debugging serial port
and/or modem problems.

Offline buckeye

  • Full Member
  • ***
  • Posts: 199
Re: How to find installed Serial Ports?
« Reply #3 on: December 13, 2010, 01:54:44 PM »
I followed the link.  Seems dmesg | grep tty is deprecated and it recommended setserial.

I used:

setserial -g /dev/ttyS[0123]

it gave me /dev/ttyS0 with a UART on it the others were "Permission denied".    setserial -g /dev/modem returned the same UART.

So next I tried minicom -s as admin to set a dfl file.  I set the Serial Device to /dev/ttyS0 then I ran minicom as admin and got:

minicom: cannot open /dev/ttyS0: No such file or directory.

I tried setserial -g /dev/ttyS[0123] again and this time I got "Permission denied" on all ports.

I've been trying ttyS0 and ttyS1 in my terminal & fax software and they all complain about no port.  But the hardware is there.  It's a PCI fax/modem card.  Any ideas?


Offline buckeye

  • Full Member
  • ***
  • Posts: 199
Re: How to find installed Serial Ports?
« Reply #4 on: December 13, 2010, 02:06:18 PM »
Installed statserial & ran it on /dev/ttyS0.  It said:

statserial: can't open device `/dev/ttyS0': No such file or directory

and I can see why.  I looked at my /dev directory and ttyS0 is no longer there.  Somehow it was deleted.

from bad to worse, I guess.

Offline buckeye

  • Full Member
  • ***
  • Posts: 199
Re: How to find installed Serial Ports?
« Reply #5 on: December 13, 2010, 02:35:53 PM »
Is there a way to re-create the ioctl file for my ttyS0 serial device?

I think minicom deleted my ioctl file and replaced it with a plain text file in my /dev/ directory.

Thanks in advance.

Offline buckeye

  • Full Member
  • ***
  • Posts: 199
Re: How to find installed Serial Ports?
« Reply #6 on: December 13, 2010, 03:11:11 PM »
OK, I rebooted & ttyS0 is back in the /dev/ directory as an ioctl file.

Offline buckeye

  • Full Member
  • ***
  • Posts: 199
Re: How to find installed Serial Ports?
« Reply #7 on: December 13, 2010, 04:10:21 PM »
Just realized that my internal modem might be a Windows Softmodem and I doubt PCLOS has drivers for it.  ttyS0 might be the RS-232 interface port with nothing attached.  I'll get that hooked up to an external modem and report what happens in a little while.

The statserial command seems to be working and reports I/O pin status.  Once I get a break-out box hooked up I'll see if I can toggle the status pins.

Thanks all.

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: How to find installed Serial Ports?
« Reply #8 on: December 13, 2010, 04:27:24 PM »
nobody mentioned it, you are right, winmodems are crap but perhaps it has a driver, you should mention which modem is

serial external modems are the only real way on linux without loosing your sanity with ports and drivers
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline buckeye

  • Full Member
  • ***
  • Posts: 199
Re: How to find installed Serial Ports?
« Reply #9 on: December 13, 2010, 09:41:57 PM »
Sure enough, ttyS0 works just fine.  statserial polls the modem control bits just fine & I can set/clear them with an RS-232 break out box.  Hooked up a Best Data 56K fax/modem & I can do AT commands to it.  When I send:

at+gcap

I get back:

+GCAP: +FCLASS,+MS,+ES,+DS

so it looks like the modem is working and supports fax 2 commands.  But it does not work with efax-gtk.  When I try to send a fax, efax errors out with the following log:

Socket running on port 9900
efax-0.9a: 23:02:16 opened /dev/modem
efax-0.9a: 23:02:17 using V3.210-V90_2M_DLSCONEXANTV90 in class 2
efax-0.9a: 23:02:17 dialing T<my email fax phone number here>
efax-0.9a: 23:02:31 The remote ID is  "   SpanDSP Fax Ident"
efax-0.9a: 23:02:31 connected
efax-0.9a: 23:02:58 Error: wrong response after command: +FDT
efax-0.9a: 23:02:58 Warning: wrong response after command: +FK
efax-0.9a: 23:02:58 failed page /home/stan_ely_k/Desktop/faxtest.pdf.001
efax-0.9a: 23:02:59 finished - invalid modem response

I tried to send a PDF and a PS file.  Same results both times.

Any ideas would be greatly appreciated.

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: How to find installed Serial Ports?
« Reply #10 on: December 14, 2010, 06:03:21 AM »
Is it sending the correct commands/syntax  for that modem?

Trying to recall when I last used one a few years ago ......  but there was somewhere to edit the commands sent .....

Offline buckeye

  • Full Member
  • ***
  • Posts: 199
Re: How to find installed Serial Ports?
« Reply #11 on: December 14, 2010, 07:51:49 AM »
Right, I think that's the problem.  The modem is a "Smart One 56SX-2" and I don't know what it's command set is.