I need to prototype an Android application which communicates to external hardware using serial I/O. Can the emulator send and receive serial data over a PC's com port?
The Android emulator itself supports this feature, I see people use
"emulator -qemu -serial COM1" on Windows PC
or
"emulatro -qemu -serial /dev/ttyS0" on Linux PC
I have not tried it by myself yet, but that is the way in the big picture.
I came across this:
http://code.google.com/p/android-serialport-api/
this library will let you use Java to access the serial port on your Android device
Related
now i have 1 smartphone and 1 laptop and there is no wifi access here, can i run my flutter project through my smartphone hotspot. just like companion on kodular
note: I don't use a USB cable for some reason
You can use Wifi AVD plugin to debug your application wirelessly but you have to connect your device via USB for the first time.
Please check this out. You can use wireless adb connection
https://developer.android.com/studio/command-line/adb
I am planning to develop a Ethernet test tool on android tablet. I know that it's better to run at wireless at Android. But I need the following information.
Does Android has driver support for Ethernet Cable
Does android has driver to access ethernet on USB port?
I know that this is not a programming question. But I found nowhere else to get the answers for these queries. Please don't consider this as off-topic. It would be helpful for me, if I can get the details.
Yes Android includes Ethernet over USB driver, and this function can be accessed by at least two ways:
(1) Adb port forwarding enabled by the following command in terminal. This requires adb being installed. Use any port number you want.
adb forward tcp:1234 tcp:1234
(2) USB tethering. It's usually found in Settings -> Wireless & Networks -> More... -> Tethering & portable hotspot -> USB tethering. If you connect your android device to a Linux computer via micro-USB cable and enable this function, your Linux computer will consider this cable as an "Ethernet" connection (actually shown as 'usb0' by ifconfig).
The answer is Yes. Android has Ethernet over USB Driver. I would use USB tethering. You can find it in Settings -> Wireless & Networks -> More... -> Tethering & portable hotspot -> USB tethering. If you connect your android device to a Linux computer via micro-USB cable.
I was able to find the documentation online for my question.
Thanks for help. I will close this postLink.
I wrote an app which runs on two android tablets at the same time. The app enables both devices to communicate with a java server which is running on the pc, via WLAN socket communication.
The problem with the WLAN connection is that it doesn't always seem to be reliable. So I wanted to setup a socket communication to the server via USB cables.
My problem no is how to connect TWO android devices to the server via USB cables. I found this tutorial for connecting ONE device to the server via ADB, but I see no possibility using this approach for two devices:
http://www.anothem.net/archives/2010/10/15/android-usb-connection-to-pc/
Has anyone an idea how to solve it? Thanks!
If your tablet is runs ICS or newer Android OS, then it is very likely that it has OTG capable micro-USB socket, and you can add a USB-Ethernet dongle, and then connect the 2 tablets to your PC over ethernet, instead of USB. This, might be the most elegant solution.
Of course, you'd need a switch (or hub) to connect them together. Also note that, not all USB-Ethernet dongles may work out-of-the-box. You might have to experiment with few models, especially the el-cheapo ones to get them to work.
I downloaded the Suite for the phone, the Google USB drivers and the Phone's connection drivers. So far, the phone works perfectly with the PC but Eclipse still refuses to see the phone and Device Manager is convincing me that I have no hardware compatible with the Google USB drivers. Therefore the Google USB drivers are downloaded but not installed or assigned to any device. I followed every answer on stackoverflow that there is so far, but none have solved the problem.
First, set your device into USB / debug mode.
Second, after you connect your device to the USB make sure your drivers is installed properly.
And last verify that adb.exe can detect you device from cmd (if running in windows) ..(path to your SDK)\platform-tools\adb device
If last step fails, then re-install you device driver, it should be handled automatically by sony pc-companion for your xperia phone.
You also have to enable USB-Debugging in Settings->Developer Options on your phone.
I am developing an Android app for a class I'm taking. I've been using the emulator to date. I know what to see if it runs on the real HW.
My PC runs Windows 7. I downloaded the latest google/Android USb driver. I have enabled the USB Debugging feature on the tablet already. When I plug the tablet into the PC via USB, the PC doesn't seem to see the tablet at all.
What do I need to do to get these two devices to see one another.
thanks,
wk
HI, I'm using superpad 3, and just have adb connection over ethernet, all you need is type cmd: "connect your.pad.ip" and then Eclipse will see your device.