roberthaag / android-serialport-api

Automatically exported from code.google.com/p/android-serialport-api
0 stars 0 forks source link

Cannot get read/write access to serial ports in QEMU emulator #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 peterjla...@gmail.com on 4 Jan 2011 at 11:52

GoogleCodeExporter commented 9 years ago
start a terminal or adb shell thing then do
su
cd dev
chmod 777 ttyHSUSB0

or ttyHSUSB1 or ttyMSM2 or whatever port you want.

this worked for me at least!

Original comment by hamish....@gmail.com on 5 Feb 2011 at 5:58

GoogleCodeExporter commented 9 years ago
I did it in Xperia X10 mini..

For result:  Unable to chmod 777 tyyMSM2: operation not permitted

Original comment by sanctuar...@gmail.com on 28 Mar 2011 at 7:22

GoogleCodeExporter commented 9 years ago
I am also dealing the same thing from android emulator...

I am trying to  controlling some hardware device (like RFID kit) from
Android Emulator which is installed in a PC...  But i am not getting
how to control the external hardware which is connected to PC  from
Android Emulator.... Can u help me on this topic??? Is it same doing
project under windows  and Linux??

I have written some code using android.hardware.usb package (which is
available in Android 3.1) ... but it is not detecting the hardware
devices attached over USB

Original comment by kasi...@gmail.com on 14 Jul 2011 at 7:52

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I connect the physical device and run my application its gives the error
"Error: You do not have read/write permission to the serial port."

I know this is due to permisssion in my device .

I gave permission on emulator by using adb shell but how can i give on my real 
device? any idea please let me know.....................

Original comment by ashishli...@gmail.com on 20 Jul 2011 at 5:44

GoogleCodeExporter commented 9 years ago
For more information about rooting your phone, you should search on forums like 
xda-developers

Original comment by cedric.p...@gmail.com on 25 Jan 2012 at 5:35

GoogleCodeExporter commented 9 years ago
Look at this answer:

http://stackoverflow.com/a/28504070/779408

Original comment by breceive...@gmail.com on 13 Feb 2015 at 5:21