Visit Our UNIX and Linux User Community


/dev/ttyS0: Device or resource busy


 
Thread Tools Search this Thread
Special Forums Hardware /dev/ttyS0: Device or resource busy
# 1  
Old 02-19-2011
/dev/ttyS0: Device or resource busy

hello to everybody

I have Ubuntu Lucid 10.04 installed on my Desktop and I have a PCI serial card in my computer and it has only one serial port.

Actually I want to use this serial port for the serial communication and for that I executed this command :

Code:
$ setserial -g /dev/ttyS[0123]

and I got this as output:

Code:
/dev/ttyS0: Device or resource busy
/dev/ttyS1, UART: undefined, Port: 0xee00, IRQ: 16
/dev/ttyS2, UART: undefined, Port: 0xed00, IRQ: 17
/dev/ttyS3, UART: unknown, Port: 0xec00, IRQ: 17

in this it is showing that my serisl port named /dev/ttyS0 is busy and can't be used for the serial communication.

But it is happening from past couple of days, and before that everything was just fine and on the execution of the previous command it was giving this as output:

Code:
/dev/ttyS0, UART: undefined, Port: 0xef00, IRQ: 16
/dev/ttyS1, UART: undefined, Port: 0xee00, IRQ: 16
/dev/ttyS2, UART: undefined, Port: 0xed00, IRQ: 17
/dev/ttyS3, UART: unknown, Port: 0xec00, IRQ: 17


So now what is this happening ...........................Smilie


I also googled a lot and got various hints but nothing worked well , and I tried to know whether the interrupt no. 16 being used by some other device than for that I checked the /proc/interrupts file and got the following result:

Code:
           CPU0       CPU1       
  0:         69          0   IO-APIC-edge      timer
  1:         43       5783   IO-APIC-edge      i8042
  8:          1          0   IO-APIC-edge      rtc0
  9:          0          0   IO-APIC-fasteoi   acpi
 12:     455224          0   IO-APIC-edge      i8042
 14:          0          0   IO-APIC-edge      ata_piix
 15:          0          0   IO-APIC-edge      ata_piix
 16:        891     121426   IO-APIC-fasteoi   uhci_hcd:usb5, i915, HDA Intel, serial
 17:          4          0   IO-APIC-fasteoi 
 18:          0          0   IO-APIC-fasteoi   uhci_hcd:usb4
 19:     149907          0   IO-APIC-fasteoi   ata_piix, uhci_hcd:usb3
 20:         56      49397   IO-APIC-fasteoi   ohci1394, eth0
 23:     478297          0   IO-APIC-fasteoi   ehci_hcd:usb1, uhci_hcd:usb2
NMI:          0          0   Non-maskable interrupts
LOC:    1844145    1720957   Local timer interrupts
SPU:          0          0   Spurious interrupts
PMI:          0          0   Performance monitoring interrupts
PND:          0          0   Performance pending work
RES:      74493      98624   Rescheduling interrupts
CAL:         90        128   Function call interrupts
TLB:       7221       7432   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:         23         23   Machine check polls
ERR:          1
MIS:          0

~
~
~
~

In this file I saw that the serial port and the Intel HDA both are using the same interrupt no 16 and therefore I think the serial port is not responding or is busy.

I checked the other serial port /dev/ttyS1 with the same IRQ 16 and executed this command :

Code:
$ setserial /dev/ttyS1 -a

and got the following result:

Code:
/dev/ttyS1, Line 1, UART: undefined, Port: 0xee00, IRQ: 16
    Baud_base: 115200, close_delay: 50, divisor: 0
    closing_wait: 3000
    Flags: spd_normal skip_test



So this was free and I tried to use it.
So I tried to switch over to other serial port by running the following command:

Code:
$ setserial /dev/ttyS1 uart 16550A
$ setserial /dev/ttyS1  -a

and the result was this:

Code:
/dev/ttyS1, Line 1, UART: 16550A, Port: 0xee00, IRQ: 16
    Baud_base: 115200, close_delay: 50, divisor: 0
    closing_wait: 3000
    Flags: spd_normal skip_test

So I tried to use it and when I did this the system gets shutdown.Smilie


I tried this with the other two ports also but got nothing working and the system shuts down in each case and the result obtained all the time was same :

Code:
$ setserial /dev/ttyS0 -a
/dev/ttyS0: Device or resource busy

So I want to know how I can troubleshoot this problem .......please help me out of this .


Thank you

Last edited by pludi; 02-19-2011 at 07:03 AM..

Previous Thread | Next Thread
Test Your Knowledge in Computers #820
Difficulty: Easy
Before CSS, nearly all presentational attributes of HTML documents were contained within the HTML markup.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Mount : Device busy

mount -f nfs 1234:/export/ert /der/fr/ert mount : /der/fr/ert: device busy normally I will then do an fuser filesystem and kill the pids, which I did. now if I do an fuser /der/fr/ert I get the mount point and no pid > fuser /der/fr/ert /der/fr/ert: but it... (1 Reply)
Discussion started by: goya
1 Replies

2. HP-UX

Failed to open tape device /dev/rmt/0mn:Device busy (errno = 16)

Hi, Unable to make tape backup, please help. /opt/ignite/bin/make_tape_recovery -a /dev/rmt/?mn -I -v -m tar -x inc_entire=vg00 * Creating local directories for configuration files and archive. ======= 04/25/16 16:28:08 IST Started /opt/ignite/bin/make_tape_recovery. (Mon... (4 Replies)
Discussion started by: anuragr
4 Replies

3. UNIX for Advanced & Expert Users

lvm swapon failed Device or resource busy

Is there a trick to mounting swap in n a lvm? I can't get it to work. # swapon -va swapon on /dev/mapper/VG-lv_swap swapon: /dev/mapper/VG-lv_swap: found swap signature: version 1, page-size 4, same byte order swapon: /dev/mapper/VG-lv_swap: pagesize=4096, swapsize=4294967296,... (1 Reply)
Discussion started by: cokedude
1 Replies

4. UNIX for Dummies Questions & Answers

UNIX rm -rf error "rm: cannot remove `filename' : Device or resource busy"

Hi Everyone, I am trying to remove a directory: $ rm -rf directory_name/ rm: cannot remove `directory_name/filename': Device or resource busy What does this mean, and why can't I remove these files? I already tried moving into the directory, and removing the files individually, but I... (7 Replies)
Discussion started by: Anna_Z
7 Replies

5. UNIX Desktop Questions & Answers

cygwin error device or resource busy

Hello!!! My problem is: i'm trying to send At commands from Pc to mobile phone using bluetooth and cygwin and i would like to read the device's answers on the shell bash. And so, i open two terminals in this way: xterm & In the first i write: cat /dev/ttyS2 because the device is... (9 Replies)
Discussion started by: blianna
9 Replies

6. UNIX and Linux Applications

/dev/ttyS2 device or resource busy

Ciao a tutti!!! il mio problema questo: sto cercando di inviare dei comandi AT da PC a cellulare utilizzando il bluetooth e cygwin e vorrei visualizzare le risposte nella shell bash. Per farlo apro due terminali utilizzando le seguente istruzioni: xterm & Sul primo scrivo cat /dev/ttyS2 ... (1 Reply)
Discussion started by: blianna
1 Replies

7. UNIX Desktop Questions & Answers

cygwin /dev/ttyS2: Device or resource busy

Ciao a tutti!!! il mio problema questo: sto cercando di inviare dei comandi AT da PC a cellulare utilizzando il bluetooth e cygwin e vorrei visualizzare le risposte nella shell bash. Per farlo apro due terminali utilizzando le seguente istruzioni: xterm & Sul primo scrivo cat /dev/ttyS2 ... (0 Replies)
Discussion started by: blianna
0 Replies

8. UNIX for Dummies Questions & Answers

Device or resource busy??

Hi, I'm trying to do a sharity mount to mount a terastation network drive. I'm getting a Device or resource busy message after my mount command. Please see output below... # /usr/local/sharity3/bin/sharity mount smb://labbackup01/bakup_data /mnt/labbackup01 Device or resource busy.... (2 Replies)
Discussion started by: orahi001
2 Replies

9. HP-UX

Cannot umount - device busy

Anyone have any idea why I cannot umount a directory even though fuser shows no process attached to it? fuser -cu /data/oracle/GMPSHRDM/export /data/oracle/GMPSHRDM/export: umount /data/oracle/GMPSHRDM/export umount: cannot unmount /data/oracle/GMPSHRDM/export : Device busy umount:... (2 Replies)
Discussion started by: keelba
2 Replies

10. UNIX for Dummies Questions & Answers

umount, device busy, but..

I'm trying to unmount a file system, but umount says the device is busy. A fuser -c /myfs tells me that nothing on this fs is in use. Any idea? Oh, and btw, why isn't my signature beeing displayed? Show user's signature is enabled and I have entered one :/ (10 Replies)
Discussion started by: sTorm
10 Replies

Featured Tech Videos