Giter Site home page Giter Site logo

Comments (20)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
just wondering... has this problem been fixed yet?

Original comment by [email protected] on 13 Jan 2010 at 6:24

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
The issue stopped being an immediate problem when I started sending messages 
with
length longer than 1 byte, and incorporated some control signals. Somehow it 
seems to
have problems initializing reception, perhaps a buffer needs to be filled 
somewhere?

Original comment by [email protected] on 14 Jan 2010 at 8:14

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Sorry guys, I just discoverd this "issues" section :s (I do not receive email
notification when new issues are submitted).
I will take a look on this issue !

Original comment by [email protected] on 22 Feb 2010 at 10:38

  • Changed state: Accepted

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Hi,
I have just built a usb-serial cable for my android and am experiencing this 
problem. 
My setup is: HTC Magic (MT3G) running cyanogenmod 4.2.15.1 with the kernel 
changed to 
this one: http://www.allthingsgeek.com/gcms/index.php?mod=article&id=22. The 
USB to 
Serial adapter is a cp210x based nokia usb data cable from ebay, it works well 
on 
other devices.

Note that serial I/O did not work *at all* with the stock cyanogenmod kernel. 
AFAIK 
the one linked above is identical but with CONFIG_HTC_HEADSET unset.

Looking forward to hearing of any progress :)

Original comment by [email protected] on 27 Mar 2010 at 12:22

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Issue is confirmed (identical symptoms) on Vodafone Magic (32B) with CyanogenMod
4.2.15.1 and a build of android-2.6.29-donut from cyanogen's git repo with
CONFIG_HTC_HEADSET unset.

Additionally, some of the received bytes appear scrambled, not what has been 
sent to
the port.

Original comment by [email protected] on 11 May 2010 at 5:25

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Hi, 
This is Laxman Dodda. When i build directly this apk on android2.2. Giving 
error in cosole. Error is "You dont have read/write permisions to the serial 
prot". And in Log the msg is 

12-09 12:14:20.665: WARN/System.err(5899): java.io.IOException: Error running 
exec(). Command: [sudo] Working Directory: null Environment: null
12-09 12:14:20.665: WARN/System.err(5899):     at 
java.lang.ProcessManager.exec(ProcessManager.java:226)
12-09 12:14:20.665: WARN/System.err(5899):     at 
java.lang.Runtime.exec(Runtime.java:196)
12-09 12:14:20.665: WARN/System.err(5899):     at 
java.lang.Runtime.exec(Runtime.java:285)

Original comment by [email protected] on 9 Dec 2010 at 3:13

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
@laxmanbalu: You should at least make sure that you have access to the root 
account in the phone. According to the Log, you don't.

Original comment by [email protected] on 9 Dec 2010 at 8:27

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
sometimes may receive data,sometimes don't receive data from uart port!as 
follow system errs:
W/System.err(  768): java.io.InterruptedIOException: Read timed out
W/System.err(  768):    at 
org.apache.harmony.luni.platform.OSFileSystem.readImpl(Native Method)
W/System.err(  768):    at 
org.apache.harmony.luni.platform.OSFileSystem.read(OSFileSystem.java:118)
W/System.err(  768):    at 
java.io.FileInputStream.read(FileInputStream.java:312)
W/System.err(  768):    at 
java.io.FileInputStream.read(FileInputStream.java:267)
W/System.err(  768):    at 
android.serialport.sample.SerialPortActivity$2.handleMessage(SerialPortActivity.
java:119)
W/System.err(  768):    at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(  768):    at android.os.Looper.loop(Looper.java:123)
W/System.err(  768):    at 
android.app.ActivityThread.main(ActivityThread.java:4627)
W/System.err(  768):    at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(  768):    at java.lang.reflect.Method.invoke(Method.java:521)
W/System.err(  768):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
W/System.err(  768):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
W/System.err(  768):    at dalvik.system.NativeStart.main(Native Method)

Original comment by [email protected] on 27 Dec 2010 at 10:16

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Hello!

I have the same problem, but I suspect that debug daemon steals symbols from 
the serial port. It is not easily killed, so I can't say exactly right now. 
Didn't have enough time to dig in.
Has everybody ever got receiving working (console or loopback) on any device?
Great project, anyway:-)

Original comment by [email protected] on 14 Mar 2011 at 9:13

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Hi! 

I think I had the same problem (scrambled and missing bytes).. and. I got it to 
work on a HTC G1. The problem seems to have something to do with with interrupt 
handling and sleep behaviour in android. 

Serial input started to work in the console when I touched the screen. See if 
this happens to you too...

I "solved" it by adding an empty thread that just loops forever -- without 
sleeping.(Initial solution was a metal clamp that triggered touch-events on the 
screen. :-) )

Good luck! :)

Original comment by [email protected] on 14 Mar 2011 at 9:28

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
I have read wiki carefully and found this: "headset detection and debug console 
code in the kernel must be disable".

Harald,
thanks for the tip, I will give it a try as well :-)

Original comment by [email protected] on 14 Mar 2011 at 9:44

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Hi Everyone,

I am trying to read data from a serial port in the below given opencv
link, I have no problem with
sending bytes. Everything works fine. There is a problem when i
receive bytes. Every time a read a byte from ttymxc0 something happens
and the byte is not only read for the first time it is sending some
junk data  but after pressing the the two enter keys it is able to
read the data correctly but my concern to read the data without
pressing any enter keys in the beginning only.

http://code.google.com/p/android-serialport-api/source/checkout

So could any body provide sme corrected code to get rid of this
annoying serial port read problem,

Am new to this android applications development, pls help me.

Advanced Thanks,
Srinivasan S


Original comment by [email protected] on 5 Dec 2011 at 9:48

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
   There is a problem when i receive bytes.
   It just receive data when enter the receiving data activy at the firt time. ReadThread in SerialPortActivity just executes 5 or 10 times. then stop when code work here "size = mInputStream.read(buffer);"

   need help. who knows? thanks ahead.

Original comment by [email protected] on 10 Jan 2012 at 2:32

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
I come here again.
my problem is solved about "fail to continue to receive after first aquire 
data".
That's because my console is occupying serial port which my app would like to 
use. More infomation, please 
http://code.google.com/p/android-serialport-api/wiki/Htc

Thanks [email protected] for his code shareing. Thank you very much.

Original comment by [email protected] on 18 Jan 2012 at 2:15

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Hi everybody,

I built the code and installed in my tablet, I entered the device and baudrate 
in the setup, but next in the when I tried to enter to the Console, Loopback or 
Send 010101 activity, the app show me the following message:

"Sorry!
The application ... (process ...) has stopped unexpectedly. Please try again." 
and apears the only botton "Force close" and leave the app.

What happens?

In the other, I have the same problem (when I only installed the the downloaded 
.apk) when I recevied bytes.

Thanks,

Andres.

Original comment by [email protected] on 20 Jan 2012 at 10:50

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Andres, you should provide a logcat

Original comment by [email protected] on 25 Jan 2012 at 5:27

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
According to comments, the origin of the bug is:
* either an hardware sleep problem
* either an other application which has opened the port at the same time

Sorry guys but in both cases I cannot fix the problem in the API.

Original comment by [email protected] on 25 Jan 2012 at 5:32

  • Changed state: WontFix

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Hi Cedric,

I resolved the first problem, I didn't compile de jni with the NDK. I build the 
code and works, but I still have the problem when I receive bytes. Yes, the bug 
are probably  origins in these 2, however could you bring me suggestions for 
fix this, about the code. I try some solutions because Im doing a little 
project that do the Android like a master and the microcontroller a slave, like 
a interface for other peripherics. I send commands since the Android and then a 
wait for a response, but I have problems in the response. I tested with the 
loopback, changing the value to send (0 to 64), and works but then the program 
not receive and lost bytes appears. In the fact, for stablish the first fluid 
comunication, I had to open and close (re-enter to the loopbackActivity) 4 or 5 
times, then recent works, Its like some kind of sincronization at first, but 
its not that, or maybe, I dont know. I read about other codes, like GNUIOtest, 
but it is more complex, but the part for receiving bytes is almost the same, in 
java code part.

So, could you bring some advices or suggestions for do what I try to do?. I 
appreciate a lot any help. 

Sorry for my english, I try to avoid use Google translate, I do my best.

Greetings.

Andres.   

Original comment by [email protected] on 7 Feb 2012 at 3:57

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
[deleted comment]

from android-serialport-api.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
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 comment by [email protected] on 17 Oct 2012 at 5:05

from android-serialport-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.