yooranchen / android-serialport-api Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/android-serialport-api
Automatically exported from code.google.com/p/android-serialport-api
What steps will reproduce the problem?
1. Import project into Eclipse; compile.
2. Set up device (msm2, baud 9600)
3. Click on console/loopback -> process android.serialport.sample has
stopped unexpectedly.
What is the expected output? What do you see instead?
I see...
Sorry!
The application Serial Port (process android.serialport.sample) has stopped
unexpectedly. Please try again.
What version of the product are you using? On what operating system?
Using it on the G1, cyanogen mod.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 22 Feb 2010 at 4:15
Please add support for setting the stop bits and parity.
Original issue reported on code.google.com by [email protected]
on 11 Oct 2014 at 2:25
What steps will reproduce the problem?
1. random delay in sending data and some bytes of data is lost
2.
3.
What is the expected output? What do you see instead?
At present there is loss in bytes of data sent. There is random delay in
sending the data through serial port.
What version of the product are you using? On what operating system?
Beagle bone black and Jelly bean OS
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 7 Nov 2013 at 11:40
What steps will reproduce the problem?
1. run SerialPort API 1.1 with /dev/ttyUSB0 as selected port
2. Open console
3. "Error: The serial port cannot be opened for an unknown reason"
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
AOC MW0821 tablet with android 2.3
Please provide any additional information below.
The device only recognizes the ttyUSB0 port if I turn it on with the
USB-to-serial cable already plugged, and when I try to change the permissions
on the adb console, it says that the file doesn't exist, which is correct, as
the file for the ttyUSB0 isn't on /dev.
Original issue reported on code.google.com by [email protected]
on 13 Jul 2012 at 1:26
hello,
I created a new package, name it as android.prototype
after that I move all the class inside the android.serialport.sample to
android.prototype
I change the manifest.xml as well to android.prototype
the program run well, but it always show error "Please configure your serial
port first" even though i already did...
how to fix this problem?
thank you
Original issue reported on code.google.com by [email protected]
on 22 Jul 2011 at 10:49
Hi,I try to build a communication between the tablet PC and the MCU with PL2303
chip. My tablet PC use Android 4.0 system. My MCU is a 51 series. I choose the
setting '/dev/ttyUSB0' and 'Baud rate 1200' on tablet PC. I tried the
'Loopback' and 'Send 01010101', but the MCU can not receive any data. Does
anyone know what is the problem?
The program in the MCU.
Crystal oscillator 11.0595 MHz
#include <REG52.H>
#include <stdio.h>
unsigned char b;
void main (void)
{
SCON = 0x50;
TMOD|= 0x20;
PCON|=0x80; TH1 = 0xD0;
TL1 = 0xD0;
TR1=1;
ES = 1;
EA = 1;
P0=0xff;
b=0xff;
while(1)
{
if (RI)
{ RI=0;
b=SBUF;
P0=b;
}
}
}
Original issue reported on code.google.com by [email protected]
on 26 Nov 2012 at 9:06
Attachments:
What steps will reproduce the problem?
1. Asus Eeepad Transformer Tablet PC + PL2303 USB to Serial cable
2. OS detects PL2303 as ttyUSB3
3. Run SerialPort API and configure as ttyUSB3 and 9600bps
4. Run Loopback and shows Error permission denied.
What version of the product are you using? On what operating system?
Android 3.2.1 and Kernel 2.6.36.3
How to fix the permission on Asus Transformer?
Thanks,
Mike
Original issue reported on code.google.com by [email protected]
on 14 Dec 2011 at 8:57
Requested feature: Configure read/write timeouts.
There are any plans to add at least read timeout to the lib?
Original issue reported on code.google.com by [email protected]
on 19 Mar 2012 at 12:29
What steps will reproduce the problem?
1. open prgram
2. setup device
3. press console button
4 can't open serial can not be opened for an unknown reason
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
android 2.2
Please provide any additional information below.
logcat debug
I/ActivityManager( 803): Starting activity: Intent {
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
flg=0x10200000 cmp=android.serialport.samp}
I/dalvikvm( 803): Jit: resizing JitTable from 8192 to 16384
I/ActivityManager( 803): Displayed activity
android.serialport.sample/.MainMenu: 136 ms (total 136 ms)
I/ActivityManager( 803): Starting activity: Intent {
cmp=android.serialport.sample/.ConsoleActivity }
D/serial_port( 1190): Opening serial port /dev/ttyS2
D/serial_port( 1190): open() fd = -1
E/serial_port( 1190): Cannot open port
E/SerialPort( 1190): native open returns null
I/ActivityManager( 803): Displayed activity
android.serialport.sample/.ConsoleActivity: 230 ms (total 230 ms)
Original issue reported on code.google.com by [email protected]
on 25 Nov 2010 at 11:21
What steps will reproduce the problem?
1. Choosing Device and Baud Rate in Setup
2. Choosing console
3.
What is the expected output? What do you see instead? A console screen that
would display RX data, but instead get an error with message, "The serial port
can not be opened for an unknown reason."
What version of the product are you using? On what operating system?
SerialPort_0.7.apk, Droid X (Rooted) Android Version: 2.3.3
Please provide any additional information below. Here is the way it was rooted
http://www.droid-life.com/2011/03/29/how-to-root-gingerbread-on-droid-x/
Original issue reported on code.google.com by [email protected]
on 8 Sep 2011 at 12:44
the reason is GPS.
GPS keep steal uart data.
so we need to off GPS(android setting menu).
gl :)
Original issue reported on code.google.com by [email protected]
on 26 Sep 2014 at 8:09
Hi
I am going through Android serial port Api and facing some problem as below
1) When i built and deploy this serial port application on Android 3.0, ndk 5 ,cygwin 5 and Window Xp enviroment then its work properly
2) but when i tried to de built and deploy on Android 2.2 or lower version then i m getting error below
java.io.IOException: Error running exec(). Command: [/system/bin/su] Working Directory: null Environment: null
I Cretaed AVD 2.2 from commnand line and nothing i changed in any other place and deploy then getting error above
I set the permission also from cygwin to dev/ttyS2 but didnt work
can you please tell me what i am doing wrong ?
Thanks in Advance
Original issue reported on code.google.com by [email protected]
on 12 May 2011 at 5:22
What steps will reproduce the problem?
1.STEPS TO INTERFAC ANDROID PHONE WITH EXTERNAL BLUETOOTH
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 8 Feb 2014 at 5:32
What steps will reproduce the problem?
1. Download the latest ndk package (r5b as of today)
2. Try to follow the build instructions for serial-port-api
3. JNI lib is created, but, when we try to import it as a project in eclipse,
it does not ind any valid project in the anroid-seriaport-api folder at all
4. It is better for the project android-sercd, as we go till project build and
downloading to emulator.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Latest serial-api from svn, r5b ndk, on windows XP host.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 10 Mar 2011 at 5:33
What steps will reproduce the problem?
1.connect PL2303 to MID tablet usb host and via serial cable to pc com port
2.open hyperterminal on pc
3.chmod 777 /dev/ttyUSB0 on tablet
4.send characters from hyperterminal
What is the expected output? What do you see instead?
Instead of viewing the characters on the serialportsample console only line
feeds are returned
sending data from the console no output in hyperterm
What version of the product are you using? On what operating system?
serialportapisample latest from market on android 2.3.1 gingerbread (kernel
2.6.32.27)
Please provide any additional information below.
MID tablet I97D uses rockchip 2911 cpu. No modifications seem to be needed to
install the serialportsample to the tablet and ttyUSB0 interface is presented
as soon as pl2303 clone is connected to the USB host port.
Original issue reported on code.google.com by [email protected]
on 3 Jan 2012 at 1:16
What steps will reproduce the problem?
1.download .apk file and try to install it on ICS device (NOVO 7 Paladin)
2.Installation ends with "file corrupt" error.
What version of the product are you using? On what operating system?
Android 4.0.1 ICS and SeialPort-api r46
Please provide any additional information below.
I am not sure if this is an issue with the ICS or the device.
any suggestions? anything I can test.
[email protected]
Original issue reported on code.google.com by [email protected]
on 5 Jan 2012 at 5:06
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 22 Sep 2011 at 6:58
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Does my tablet need to be rooted? I don't seem to have permission to ttyacm0
Original issue reported on code.google.com by [email protected]
on 15 Mar 2012 at 5:42
I'm using the SVN version and a Nexus One with ftdi_sio/pl2303 usbserial
converters.
When started for the first time after a reboot, ConsoleActivity works fine. But
when I leave the activity (whether SerialPortActivity.onDestroy() is called or
not) and restart it later, only sending data works, and no data is received
anymore. What may be the problem here?
Original issue reported on code.google.com by sonic740606
on 22 Oct 2011 at 3:24
What steps will reproduce the problem?
1.using this api in android-AVD, and open the serial port COM1,using below
command:
emulator @androidavd -qemu -serial COM1
2.from outer sent the hex data 0x90 to the COM1
3.using the api method: InputStream.read(buffer) to get data to buffer
What is the expected output? What do you see instead?
in other windows platform's com tools, it can read the data 0x90 from COM1,
but using this api in android AVD, i got 0x10 ...
What version of the product are you using? On what operating system?
android-AVD using android 2.3.1, On Windows XP
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 23 Feb 2012 at 9:18
I think this is a limitation of the QEMU Android emulator. But want to confirm.
What steps will reproduce the problem?
1. Compile project with sample app in Eclipse
2. Deploy to stock emulator AVD
3. Open Serial Port app
4. Click Setup
5. Choose a serial port and baud rate
6. Go back to menu
7. Click Console or Loopback
8. Error (see below)
What is the expected output? What do you see instead?
"Error: You do not have read/write permission to the serial port."
What version of the product are you using? On what operating system?
Android SDK Tools: rev 8
Emulator AVD: API 2.2
Original issue reported on code.google.com by [email protected]
on 4 Jan 2011 at 11:52
What steps will reproduce the problem?
1.I am sending random data from android to UART and observing the output of
serial port in another laptop. The problem is that the random is received from
the serial port with more delay..Why there is delay between each data sent from
UART. How to reduce delay between transfer?
2.
3.
What is the expected output? What do you see instead?
I have to get serial output data without much delay between outputs
What version of the product are you using? On what operating system?
Pandaboard es, ver: 4.0.4 (ICS)
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 2 Nov 2012 at 10:29
What steps will reproduce the problem?
1. Connect the Android Phone to something that sends bytes over the serial
port occasionally, e.g. a sensor or another Android.
2. Start the Console in the SerialPort activity.
3. Wait for reception of the incoming bytes on the Android.
What is the expected output? What do you see instead?
- Most bytes do not appear on the Console in the Recepton field. Only
occasionally one appears, without a defined pattern in what comes through
or not.
What version of the product are you using? On what operating system?
- Android Dev Phone, with Cyanogenmod (both on 4.1.999 and 4.2.5), using
the SerialPort_0.7.apk. No other apps installed.
Please provide any additional information below.
- I have checked that the phone is capable of receiving messages by using
the Loopback test, and by sending messages to itself using the Console. It
seems like the phone is only listening when it is sending something itself.
Original issue reported on code.google.com by [email protected]
on 26 Nov 2009 at 9:28
What steps will reproduce the problem?
1. Error:- please configure your serial port first
2.
3.
What is the expected output? What do you see instead?
- still get this error even after I set the port and baudrate
What version of the product are you using? On what operating system?
Android 2.3.5
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 10 Nov 2011 at 6:29
What steps will reproduce the problem?
1. Build the Project using eclipse in Ubuntu
2. Install the APK using adb
3. Run the serial port program and click setup, then click device
What is the expected output? What do you see instead?
I would expect to see a list of tty devices. I'm not really sure as
nothing shows up?
What version of the product are you using? On what operating system?
I am running on Android 1.5 on my own prototype Hardware. I am using the
standard android build system. My system functions very well.
My Linux kernel is 2.6.28.
My build system is an Ubuntu Machine using eclipse. The build process went
smoothly.
Please provide any additional information below.
I know there are some unknowns because you don't know what hardware I am
using. It is a custom platform based on Marvell PXA310 CPU.
How does the APK find the list of serial devices? is it possible it is
looking in the wrong place?
I have been using ttyS0 as my console port. I created a build with ttyS1
and my original com port no longer works and the app still does not show
any devices.
Any help on getting it to see my tty devices would be appreciated.
Thanks
Original issue reported on code.google.com by [email protected]
on 11 May 2010 at 11:26
What steps will reproduce the problem?
1. Got o the main screen
2.Set the device and baud rate to /ttyUSB0 and 9600
3.Click on the Console button. In the top part only the cursor moves, showing
that it is receiving something but it does not display the readings which are
received.
What is the expected output? What do you see instead?
The temperature and brightness readings from the X-stick should be displayed.
What version of the product are you using? On what operating system?
Android 2.3 on Raspberry Pi
Please provide any additional information below.
We are using Raspberry Pi. A X-stick is connected to the USB port of the
Raspberry Pi which has readings received from a wireless sensor. We have
compiled the kernel such that it shows /ttyUSB0, We have set it up with 9600
baud rate. Once clicking on Console, the cursor moves showing that it is
receiving something from the X-stick but the readings are invisible. Please can
someone help?
Original issue reported on code.google.com by [email protected]
on 24 Jul 2013 at 8:11
What steps will reproduce the problem?
1. I add trace message in serial driver in uart_close function
2. while SerialPortActivity onDestroy, uart_close will not be called
3. If remove following code in private class ReadThread extends Thread,
uart_close will be called
try {
byte[] buffer = new byte[64];
if (mInputStream == null) return;
size = mInputStream.read(buffer);
size =1;
if (size > 0) {
onDataReceived(buffer, size);
}
} catch (IOException e) {
e.printStackTrace();
return;
}
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
android-serialport-api version1.1, on Android 2.3,
Original issue reported on code.google.com by [email protected]
on 12 Dec 2011 at 3:10
I have more the 10 activity screen in my project. each activiy should access
the serial port. if i code and move to another activity, i could not send and
read the serial port. Getting input stream error (Bad File number).
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
my operating system is 4.0.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 18 Mar 2015 at 4:10
What steps will reproduce the problem?
1. Plug Arduino into USB port on the A500 (HC 3.2.1 with Honeylicious ROM)
2. Open up sample application
3. Select the only port that will open
4. Set the Baud to the correct baud (9600)
5. Listen on port
6. Doesn't receive anything or send anything
What is the expected output? What do you see instead?
The Arduino's TX and RX LEDs should light up when TXing and RXing. Instead,
only the power LED lights up. Also, the sample app should show some data from
the Arduino, right?
What version of the product are you using? On what operating system?
Android Honeycomb 3.2.1 with Honeylicious on an Acer A500 (rooted, obviously)
Please provide any additional information below.
Is it a driver issue with the serial adapter on the Arduino or an issue with
the Android side? I'd LOVE to have a serial monitoring application that works
on Android.
Thanks!
Chris
Original issue reported on code.google.com by [email protected]
on 11 Jan 2012 at 5:17
Hi Friends
Using this API am communicating with one Embedded device, here my problem is
whenever
i'll send 20 bytes of data that device send it back 20 bytes sometimes am
receiving properly but some time it is not coming please provide any solution
for this
Original issue reported on code.google.com by [email protected]
on 17 Oct 2012 at 5:07
What steps will reproduce the problem?
1. Please Correct the SVN Address
2. PLease Check and Test it after correcting the address
Original issue reported on code.google.com by [email protected]
on 5 Jan 2012 at 12:06
What steps will reproduce the problem?
1.Install .apk from downloads to IGEPv2 board(beagle board clone)
2.App runs successfully, can detect ports(ttyS0,ttyS1 and ttyS2) even can set
baud rate
3.Crashes when I try to open console, loopback or send 01010101. :(
What is the expected output? What do you see instead?
Crashes on all port
What version of the product are you using? On what operating system?
Android 2.2 froyo and v1.1 of app.
Original issue reported on code.google.com by [email protected]
on 20 Feb 2012 at 6:46
What steps will reproduce the problem?
1. i have a android(4.04) tablet with two usb, already root
2. i also have a PL-2303 adapter line
3. i connet them. like the "Solution 2" in wiki
What is the expected output? What do you see instead?
i can not find the ttyUSB0 in the 'dev/' folder
What version of the product are you using? On what operating system?
a tablet with android(4.04)
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 13 Nov 2012 at 7:09
I have one device that only support 128000 baud rate,I didn't find the baud
rate in SerialPort.c file .
Please tell me how to solve the problem .
Original issue reported on code.google.com by [email protected]
on 13 Feb 2013 at 9:12
When I read data on thread, I want to put data in an byte array.
How can i read data come to serial port with FileInputStream and store in an
array with non-blocking I/O?
Original issue reported on code.google.com by [email protected]
on 20 Nov 2012 at 1:46
What steps will reproduce the problem?
1.lunch the app
2.choosing to send a command using the mFileOutputStream.write
3.the activity is on the background
What is the expected output? What do you see instead?
the activity has to stay in the foreground not in the background
What version of the product are you using? On what operating system?
I workin on the android 2.3.4 gingerbread on an i.MX53 board
Please provide any additional information below.
the application sending the command without any probleme. but it goes to
background
Original issue reported on code.google.com by [email protected]
on 11 Jun 2012 at 12:38
What steps will reproduce the problem?
1.I send serial data from the PC and to SerialPort.apk above AM35X Development
board, but the first time will lose the first byte and back to the PC side,
the second time in order to receive all the bytes,I want the reasons is
Software or hardware.
What is the expected output? What do you see instead?
I send "12345"from PC to SerialPOrt.apk .Will Show"2345"and return"1"to
PC side.
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 6 Jun 2012 at 8:27
while(1)
{
iLen = m_cInputStream.read(bytesBuffer);
if(iLen > 0)
{
// Toast Show
}
Thread.sleep(10000);
}
example source for explain.
and i will send '0' -> then, app will show toast [ 0 ].
and i will send '1' directly -> If, it is ideal situation, then 10second after
showing toast [1].
but didn't showing...
where is my '1'...??? why missing byte?
Original issue reported on code.google.com by [email protected]
on 7 May 2014 at 9:05
What steps will reproduce the problem?
1. Download & Install SerialPort_1.1.apk
2. Run app on same hardware (Freescale MX51-BBG) 2.3.7 (it fails) vs 2.2 (it
passes)
3.
What is the expected output? What do you see instead?
Transmit data emitted on 2.2 (Froyo) and 2.3.7 (Gingerbread).
No Receive data (in Console: reception widget) - ever.
What version of the product are you using? On what operating system?
Downloaded and ran latest SerialPort_1.1.apk from this site.
Please provide any additional information below.
In debugging custom app running serialport lib I notice in debugger a new msg
in ReadThread, mInputStream fileSystem;
in Froyo used to be: "OSFileSystem (id...)"
in Gingerbread it's: "BlockGuard$WrappedFileSystem (id....)
(currently researching this...)
But since your SerialPort_1.1.apk behaves identically w/o a ReadThread - this
seems most likely to be meaningless.
Why work on Android 2.2 and no Rcv on Android 2.3.7?
Original issue reported on code.google.com by [email protected]
on 10 Jan 2014 at 12:28
Attachments:
What steps will reproduce the problem?
1. Open project in eclipse
2. Install it from eclipse
3. Start the console application
4. Edit the source and install again it from eclipse
What is the expected output? What do you see instead?
Uninstall->install->run, but the uninstall freezes the machine when
the app is running
Original issue reported on code.google.com by [email protected]
on 14 Sep 2011 at 1:00
What steps will reproduce the problem?
1.run my aplication at android 2.3
What is the expected output? What do you see instead?
open fd (-1) cannot open porting
What version of the product are you using? On what operating system?
1.1 version doesnt works at android 2.3
Please provide any additional information below.
What is flag in serial port constructor ?
Original issue reported on code.google.com by [email protected]
on 16 Mar 2012 at 11:14
What steps will reproduce the problem?
1. Try to set settings for parity, data bits and stop bits
2. Could not find any method to set parity.
3.
What is the expected output? What do you see instead?
There should be a way to set parity, data bits and stop bits for serial port
connection.
What version of the product are you using? On what operating system?
Android 2.2
Please provide any additional information below.
I could not find any method/way to open a serial port connection with parity,
data bits settings.
Original issue reported on code.google.com by [email protected]
on 25 Jan 2012 at 1:37
What steps will reproduce the problem?
1. I installed SerialAPI_1.1.apk on my Beagle Bone Black running Texas
Instruments Android 4.2.2 image
2. The apk installed normally...
3. When I run the program and try to do anything that accesses serial, I get
"Error: You do not have read/write permission to the serial port."
4. How do I get permission?
5. I have tried to do the things listed at the following 2 links
a. http://beaglebone.cameon.net/home/serial-ports-uart
b. http://stackoverflow.com/questions/19683336/root-permission-to-configure-uart1-in-beaglebone
c. I cannot install any text editor because I once again, do not have permission, so I cannot follow the steps from b above...
I think the problem is that I don't have root. Is there a way to get that on
this image/device combo?
Original issue reported on code.google.com by [email protected]
on 30 Dec 2014 at 9:13
What steps will reproduce the problem?
1.I am able to read n write into the file on an SD card in android using the
below code
try {
File root = Environment.getExternalStorageDirectory();
if (root.canWrite()){
File gpxfile = new File(root, "gpxfile2.gpx");
FileWriter gpxwriter = new FileWriter(gpxfile);
BufferedWriter out = new BufferedWriter(gpxwriter);
out.write("Hello world");
out.close();
}
} catch (IOException e) {
Log.e(TAG, "Could not write file " + e.getMessage());
}
But when I tried to implement the same for reading & writing from serial port
using android serial-port-api i was not able to make it as this is very
critical & as am new to android development,
could any body please help me in modifying the android serial-port-api in such
way that am able to read n write from serial port using android serial port api
What is the expected output? What do you see instead?
To edit the android serial port api for writing & reading data into
the file using java file operations such way that the data from serial
port is directly written into the file & read from the file on an SD
card
What version of the product are you using? On what operating system?
Android 2.3.3
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 30 Jan 2012 at 1:56
What steps will reproduce the problem?
1. How set parity and data bits on serial port ?
2. On 2.3.6 in class SerialPortFinderFile
dev = new File("/dev");
File[] files = dev.listFiles();
files have a null value;
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Samsung Galaxy Note, 2.3.6
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 Dec 2011 at 3:35
What steps will reproduce the problem?
1. Install the android serial port API app on an android board, connect the
USB-to-UART device to Laptop/PC USB port.
2. Send data from Android device to Laptop/PC -- Received perfectly at
Laptop/PC side.
3. Send data from Laptop/PC to android device -- Data is missed, randomly bytes
are lost.
What is the expected output? What do you see instead?
Data should be received without any loss at Android device.
Data is missed, randomly bytes are lost while receiving data at the android
device.
What version of the product are you using? On what operating system?
Android 4.2.2 on Freescale i.mx6 board (device)
Please provide any additional information below.
No modifications to the code is done, it's exactly used as it is from the
source.
----------------------------------------------
Need this urgently, please help.
Original issue reported on code.google.com by [email protected]
on 18 Aug 2014 at 12:59
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 [email protected]
on 22 Jul 2010 at 11:38
What steps will reproduce the problem?
1. prepare a ramdisk.img with custom permissions in ueventd.rc (/dev/ttyS* 0666
root root)
2. copy the example application to the device
3. select the loopback example
What is the expected output? What do you see instead?
Received back > 0, but all bytes sent appearing as Lost bytes
What version of the product are you using? On what operating system?
Android 2.3.7, Kernel version 2.6.29
Please provide any additional information below.
I tried to increase the read timeout to 10s but it doesn't help.
Logcat says:
10-15 19:29:35.006: D/serial_port(1490): Opening serial port /dev/ttyS0 with
flags 0x2
10-15 19:29:35.006: D/serial_port(1490): open() fd = 35
10-15 19:29:35.006: D/serial_port(1490): Configuring serial port
10-15 19:29:35.375: I/ActivityManager(861): Displayed
android_serialport_api.sample/.LoopbackActivity: +406ms
after exit:
10-15 19:29:53.565: W/KeyCharacterMap(1490): No keyboard for id 0
10-15 19:29:53.565: W/KeyCharacterMap(1490): Using default keymap:
/system/usr/keychars/qwerty.kcm.bin
10-15 19:29:53.906: D/serial_port(1490): close(fd = 35)
Original issue reported on code.google.com by [email protected]
on 15 Oct 2013 at 7:30
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Using Android 2.1 for Automotive Infotainment Head Unit.
Please provide any additional information below.
Is it possible to use this Android Serial port API to read the data using
serial port of iMx51 controller ?
more info: iMx51 in communicating with NEC V850 controller over UART!
Thanks
Yogesh
Original issue reported on code.google.com by [email protected]
on 6 Jun 2011 at 8:22
hello. again...
i don't know your e-mail.
so, i'll write here. and simply.
base source code is this android-serialport-api.
and only changed SerialPortActivity.java file.
--- original source ---------------------------
private class ReadThread extends Thread {
@Override
public void run() {
super.run();
while(!isInterrupted()) {
int size;
try {
byte[] buffer = new byte[64];
if (mInputStream == null) return;
size = mInputStream.read(buffer);
if (size > 0) {
onDataReceived(buffer, size);
}
} catch (IOException e) {
e.printStackTrace();
return;
} catch(Exception e){ }
}
}
}
---------------------------------------------------
----- and changed ---------------------------------
private class ReadThread extends Thread {
@Override
public void run() {
super.run();
while(!isInterrupted()) {
int size;
try {
byte[] buffer = new byte[64];
if (mInputStream == null) return;
size = mInputStream.read(buffer);
if (size > 0) {
onDataReceived(buffer, size);
}
} catch (IOException e) {
e.printStackTrace();
return;
} catch(Exception e){ }
try
{
Thread.sleep(1000);
}catch(InterruptedException e){ }
}
}
}
---------------------------------------------
just added
Thread.sleep(1000);
and try to send '1' -- 600ms lather --> '2' -- 600ms later -> '3' ....~
then this source can't receive all of char.
this source will received '1', '3', '5'....~
Original issue reported on code.google.com by [email protected]
on 2 Jul 2014 at 8:40
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.