LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-23-2011, 06:55 AM   #1
balaqemu
LQ Newbie
 
Registered: Aug 2011
Posts: 19

Rep: Reputation: Disabled
Serial port problem


Hi,
I'm trying to read and write data using simple serial port C code .

I can open the serial Port /dev/ttyACM0 .
but when ever I try to write something I get the following error

"open error 5 Input/output error:

Pls help to fix this problem

Last edited by balaqemu; 08-25-2011 at 06:51 AM.
 
Old 08-24-2011, 09:17 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Permissions? Initially try to run as root (or with sudo). Still the same error?

Else it might be time to show the relevant code.
 
Old 08-25-2011, 06:50 AM   #3
balaqemu
LQ Newbie
 
Registered: Aug 2011
Posts: 19

Original Poster
Rep: Reputation: Disabled
Hi,
I tried this through the root user also , but still same problem .
actually I connect a USB device called CC2530ZNP from TI to the USB port , and this creates virtual serial port with port name /dev/ttyACM0 . I could see this in /dev/ ..

But when I try to read the data from that port I get the input/output error .

The following is the code i'm using http://www.comptechdoc.org/os/linux/programming/c/com.c .
I run this on ubuntu 11.04. and it works fine with the other ports like /dev/ttyS0 .

what may be the problem , ?

regards
Bala
 
Old 08-25-2011, 10:31 AM   #4
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434
Blog Entries: 1

Rep: Reputation: 55
wrote in the wrong thread, sorry

Last edited by aizkorri; 08-25-2011 at 10:33 AM. Reason: wrote in the wrong thread
 
Old 08-29-2011, 12:45 PM   #5
balaqemu
LQ Newbie
 
Registered: Aug 2011
Posts: 19

Original Poster
Rep: Reputation: Disabled
Kernal compile with USB device

Hi,
Still I'm not able to solve the serial port problem .
When I do $ cat /dev/ttyACM0 I get the error "input/out put error "

I contacted the vendor they said that I need rebuild kernel with silght modification at the USB device driver .
I just enable the ACM device before compiling the kernal ..

Is there any way to do few setting to USB drivers with out compiling the kernal ..?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is a USBtty (USB serial port) treated the same as tty (normal serial port) in C? spudgunner Programming 1 11-12-2010 01:19 PM
serial port problem in C knobby67 Programming 2 07-15-2010 02:49 AM
Problem with serial port billyseth Linux - Kernel 1 10-27-2006 01:07 PM
Serial port problem floydes Programming 1 10-14-2004 11:50 AM
serial port problem... linux4john Linux - Software 1 10-30-2003 10:02 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration