How to connect TWO android devices to a pc via USB - sockets

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.

Related

Device descriptor request failed

I tried working with my RPi Pico today and my computer doesn't recognize the usb I triple checked the cable is power and data. And yes I'm holding the button
I've also had this annoying issue. Seems to happen even more often on the Pi Pico W.
Use my laptop USB-C port to connect via a USB-C to USB 3.0 hub and this happens every so often.
Bought a powered hub from Amazon: "UGREEN USB C Hub 4 Ports, USB C to USB Hub 3.0". It has a separate USB-C power input in addition to the laptop USB-C connection and it works fine when no other USB devices are connected to the hub. Seems to be an issue similar to what Foibled2 mentioned where the underlying issue may be power related.
I'm struggling with the same thing. Other than uninstalling in Device Manager and rebooting (sometimes several times) I can get it to recover.
There must be a better way.
I've seen references to Zadig, etc. But finally figured out the issue in my circumstance.
I disabled all of my other USB serial devices (Prolific USB for GPS tracker; and CH340 USB for Android Nano).
After that, I could plug / unplug my R Pi Pico between application and USB drive mode without rebooting.
Works now as advertised. Hope this helps short cut a few hours for someone else!

Raspberry PI ad-hoc configuration

I'm working on a project where i have two raspberry PI connected in ad-hoc mode. the project is for transmitting streaming data using UDP supported by a self developed ARQ protocol for reliable data transmission. the thing is that i want my 2 raspberry Pi to be synchronized! i tried to install the NTP server on one device and get the time on the other (as an NTP client) but when i wanted to reconnect them on ad hoc mode again, it was necessary to reboot the devices where the time was lost because the devices don't contain the hardware clock!
is there are any idea how to synchronize the two raspberry in ad-hoc mode ?
thank you!

Any way to receive multicast packets on Android Emulator?

Android emulator does not support multicast currently however I need to test an application that needs multicast packets. I want to do it on Emulator.
Is there a way to receive multicast packets on Android Emulator? I am open to writing some code as an android app.
At the present time, 2 years later, multicast packets still not supported on Android Emulator.
Android Documentation
Multicasting is still not supported by Android studio's emulator, however, you can use Genymotion. Using Genymotion, create two new emulated devices and set their "network mode" to "Bridge". Like this, the emulator will use your computer's network. By reusing your own network you can use multicasting if it is supported by your network. A nice bonus is that your emulators can even communicate with real devices on your network.

Call web service running on Parallels from iPhone connected via USB

I can request a web service running on IIS Express/Parallels from Mac OS with...
http://windows:57239/api/hello
This works fine from the iPhone simulator, but not from an iPhone device connected via USB, when debugging in XCode.
Is it possible to make this work? I would like to debug my API with in-app purchases.
I switched my Parallels instance to Bridged networking mode and let the Wifi's DHCP assign an IP address to it. Then I used this IP address from the iPhone app.
Not entirely satisfying because the IP will vary, but its very cool having an iPhone trigger a break point in Visual Studio running on a virtual instance of Windows.

How do I use Xperia Ray through Eclipse for Android programming?

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.