Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening device file with O_DIRECT fails on Dream/CM5.0.8 #4

Closed
GoogleCodeExporter opened this issue May 7, 2015 · 7 comments
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1. install SerialPort_0.7.apk (CM5 already has serial port enabled)
2. start SerialPort example, configure it
3. start the console example, it will fail with "The serial port can not be 
opened for an unknown reason"


Problem seems to be in line 96 of SerialPort.c:
> fd = open(path_utf, O_RDWR | O_DIRECT | O_SYNC);
The device file is open()ed using O_DIRECT, which fails on my Dream/CM5.0.8.
Removing O_DIRECT works, but shows another Problem:

At least at my CM image, there seems to be a divisor of 4 configured for the 
ttyMSM2 port. So, when configured to 4800 baud, it will actually use 1200 baud.

This is bad, because from all standard rates, only 1200(4800), 2400(9600) and 
9600(38400) can be used.

Original issue reported on code.google.com by hubert.d...@googlemail.com on 22 Jul 2010 at 11:38

@GoogleCodeExporter
Copy link
Author

The issue also exists on cm 6.1 on nexus one. Once O_DIRECT is removed, the 
unknown error will no longer occur.

Original comment by stephen....@gmail.com on 26 Nov 2010 at 9:40

@GoogleCodeExporter
Copy link
Author

I'll look into the O_DIRECT issue.. 
I had a problem with O_DIRECT and also the su on a stock iconia A500 device..

Might try and improve the error reporting in the library..

Original comment by npda...@gmail.com on 16 Aug 2011 at 5:53

@GoogleCodeExporter
Copy link
Author

O_DIRECT seems problematic, I will remove it in next release, thanks for the 
report.

Original comment by cedric.p...@gmail.com on 23 Oct 2011 at 9:37

@GoogleCodeExporter
Copy link
Author

Original comment by cedric.p...@gmail.com on 25 Oct 2011 at 10:13

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Issue 5 has been merged into this issue.

Original comment by cedric.p...@gmail.com on 25 Oct 2011 at 10:15

@GoogleCodeExporter
Copy link
Author

Has this issue been fixed in SerialPort_1.1.apk? I am still having the same 
issue on Gingerbread 3.2.2 "Cannot open port for unknown reason." 

Original comment by jrem...@gmail.com on 10 Nov 2011 at 1:35

@GoogleCodeExporter
Copy link
Author

O_DIRECT flag has been removed in SerialPort_1.1.apk (maybe in 1.0, I 
forgot...).

Original comment by cedric.p...@gmail.com on 14 Nov 2011 at 5:30

  • Changed state: Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant