Sponsored Content
Top Forums UNIX for Dummies Questions & Answers setserial not working on linux running on Beagleboard (ARM development board) Post 302569229 by julumme on Sunday 30th of October 2011 10:15:37 AM
Old 10-30-2011
setserial not working on linux running on Beagleboard (ARM development board)

Hi,

I'm trying to develop an application to work with serial infra-red module, but I'm having difficulties to even get my module started. My HW is Beagleboard, which has 1 UART serial port, normally used for console, which I have disabled (I re-created the boot.scr, without the console arguments), and I have modified the getty config, not to try to attach to ttyO2.
On 3.x omap kernels, the serial port is now called ttyOx instead of ttySx, though I guess that doesn't really matter ? I guess the port and irq are the most important things..

During boot, I can see following information regarding the configuration:
Code:
[    0.000000] Kernel command line: console=tty0 root=/dev/mmcblk0p2 rootwait ro vram=12MB omapfb.mode=dvi:1280x720MR-16@60 fixrtc buddy=none mpurate=auto
[    0.000000] console [tty0] enabled
[    0.768524] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
[    0.768768] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
[    0.769012] omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
[    0.769226] omap_uart.3: ttyO3 at MMIO 0x49042000 (irq = 80) is a OMAP UART3

When system tries to load the lirc module (for infra-red) I get this
complain about IRQ being busy:
Code:
[   12.396392] lirc_serial: IRQ 74 busy

Now, I'm not sure now why that is still happening, as I think nobody should be connected to ttyO2 anymore. But anyway, around internet people say I should release the UART manually, and I try it with setserial, with strange reply:
Code:
ubuntu@omap:/etc$ sudo setserial /dev/ttyO2 uart none
Cannot set serial info: Invalid argument

If I try without sudo, I get "Permission denied"

Also strangely, when I try to look at the port status:
Code:
ubuntu@omap:/etc$ sudo setserial -g /dev/ttyO[0-3]
/dev/ttyO0, UART: undefined, Port: 0x0000, IRQ: 72
/dev/ttyO1, UART: undefined, Port: 0x0000, IRQ: 73
/dev/ttyO2, UART: undefined, Port: 0x0000, IRQ: 74
/dev/ttyO3, UART: undefined, Port: 0x0000, IRQ: 80

Shoudn't there be something in those port addresses ?
Does it matter that "MMIO" is used ? Normally IO port seems to be indeed 0x**** format, now the address for serial port is much higher (0x********)

Any ideas how I should proceed ?

Last edited by julumme; 10-30-2011 at 11:16 AM.. Reason: -
 

9 More Discussions You Might Find Interesting

1. Linux Benchmarks

P4 2.6C Asus P4C800 M/board on Gentoo Linux

Here is my bench result. I also have a suspect file-copy result (giving me an index of 0.0) which would significantly drop the overall average. Anyway, if someone comes up with a reason as to why this may be, please let me know. Notes ... (0 Replies)
Discussion started by: greg32
0 Replies

2. Linux

jsp not working on linux running tomcat server

hey there we cant seem to get jsp to load pages properly on linux running tomcat 4 server. everytime we run .jsp files, the source code comes up instead of the actual file contents. any suggestions?? cheers mile1982 (1 Reply)
Discussion started by: mile1982
1 Replies

3. Linux

How to drive a LCD on ARM based linux System

Hello sir, I am Vijay Manohar. I am a writing a device driver for LCD frame buffer device. In this , LCD has been mapped at physical address 0x3000000. Now I want to implement mmap entry point. I have two questions regarding this Can I use this physical address as one of the parameters to... (0 Replies)
Discussion started by: VijayManohar
0 Replies

4. Programming

When a process is down - how to get a coredump in arm board?

Running a multi-threaded program in my arm board one day or more ,The process down . In order to get a coredump to analysis of the stack , . I use commands ulimited -c unlimited . but when the process down . no coredump But I write a test #include <stdio.h> int main(void){ ... (14 Replies)
Discussion started by: aobai
14 Replies

5. UNIX for Advanced & Expert Users

Trace "free(): invalid next size (normal)" error on arm-linux board

Hi guys, i'm running a program on samsumg 6410 arm cpu board. it caused an "free(): invalid next size (normal)" fail. i try to use gdb for remote debugging: 1, start gdb server on board: gdbserver 192.168.1.20:1234 ./HostAP Process ./HostAP created; pid = 499 Listening on port... (8 Replies)
Discussion started by: ss1969
8 Replies

6. What is on Your Mind?

Raspberry Pi - An ARM GNU/Linux box for $25. Take a byte!

Raspberry Pi An ARM GNU/Linux box for $25. Take a byte! FAQs What's a Raspberry Pi? The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It's a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets,... (5 Replies)
Discussion started by: Neo
5 Replies

7. Programming

Running c code in ARM QEMU

I created and Compiled a C program to run in QEMU for ARM. When I run the program using the command #qemu-arm -L /home/arm-2010.09/arm-none-linux-gnueabi/libc ./test it gives me the following error: If 'qemu-arm' is not a typo you can use command-not-found to lookup the package that contains... (0 Replies)
Discussion started by: rupeshkp728
0 Replies

8. Hardware

Xenomai On ARM board EXYNOS 4210 ODROID-PC

Hi I am trying to port xenomai on exynos 4210 arm board. With some research I have found a way to port the board on the exynos board but the problem is that on the exynos-4210 website they have provided a patched version of linux-3.0.15 kernel for implementing on the board. On this kernel I am... (1 Reply)
Discussion started by: mohitjandwani
1 Replies

9. Programming

IDE's for the ARM processor on Linux

Hello everyone. I am running Debian on an ARM7 Device (aka my android phone). Everything is great. Works well. I would love to use it for Development. Mainly my interests are in Web Development, and Java development. So far the only useful IDE for debian arm is Netbeans. Which is pretty... (0 Replies)
Discussion started by: CDevelop
0 Replies
LDATTACH(8)						       System Administration						       LDATTACH(8)

NAME
ldattach - attach a line discipline to a serial line SYNOPSIS
ldattach [-dhV78neo12] [-s speed] [-i iflag] ldisc device DESCRIPTION
The ldattach daemon opens the specified device file (which should refer to a serial device) and attaches the line discipline ldisc to it for processing of the sent and/or received data. It then goes into the background keeping the device open so that the line discipline stays loaded. The line discipline ldisc may be specified either by name or by number. In order to detach the line discipline, kill(1) the ldattach process. With no arguments, ldattach prints usage information. LINE DISCIPLINES
Depending on the kernel release, the following line disciplines are supported: TTY(0) The default line discipline, providing transparent operation (raw mode) as well as the habitual terminal line editing capabilities (cooked mode). SLIP(1) Serial Line IP (SLIP) protocol processor for transmitting TCP/IP packets over serial lines. MOUSE(2) Device driver for RS232 connected pointing devices (serial mice). PPP(3) Point to Point Protocol (PPP) processor for transmitting network packets over serial lines. STRIP(4) AX25(5) X25(6) Line driver for transmitting X.25 packets over asynchronous serial lines. 6PACK(7) R3964(9) Driver for Simatic R3964 module. IRDA(11) Linux IrDa (infrared data transmission) driver - see http://irda.sourceforge.net/ HDLC(13) Synchronous HDLC driver. SYNC_PPP(14) Synchronous PPP driver. HCI(15) Bluetooth HCI UART driver. GIGASET_M101(16) Driver for Siemens Gigaset M101 serial DECT adapter. PPS(18) Driver for serial line Pulse Per Second (PPS) source. OPTIONS
-d | --debug Causes ldattach to stay in the foreground so that it can be interrupted or debugged, and to print verbose messages about its progress to the standard error output. -h | --help Prints a usage message and exits. -V | --version Prints the program version. -s value | --speed value Set the speed of the serial line to the specified value. -7 | --sevenbits Sets the character size of the serial line to 7 bits. -8 | --eightbits Sets the character size of the serial line to 8 bits. -n | --noparity Sets the parity of the serial line to none. -e | --evenparity Sets the parity of the serial line to even. -o | --oddparity Sets the parity of the serial line to odd. -1 | --onestopbit Sets the number of stop bits of the serial line to one. -2 | --twostopbits Sets the number of stop bits of the serial line to two. -i value | --iflag [-]value{,...} Sets the specified bits in the c_iflag word of the serial line. Value may be a number or a symbolic name. If value is prefixed by a minus sign, clear the specified bits instead. Several comma separated values may be given in order to set and clear multiple bits. SEE ALSO
inputattach(1), ttys(4) AUTHOR
Tilman Schmidt (tilman@imap.cc) AVAILABILITY
The ldattach command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. util-linux February 2010 LDATTACH(8)
All times are GMT -4. The time now is 03:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy