Opening device file with O_DIRECT fails on Dream/CM5.0.8
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
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
Google Code Exporter commented
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
Google Code Exporter commented
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
Google Code Exporter commented
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
Google Code Exporter commented
Original comment by cedric.p...@gmail.com
on 25 Oct 2011 at 10:13
- Changed state: Started
Google Code Exporter commented
Issue 5 has been merged into this issue.
Original comment by cedric.p...@gmail.com
on 25 Oct 2011 at 10:15
Google Code Exporter commented
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
Google Code Exporter commented
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