3

I have an application that can be controlled via Open Sound Control, a UDP based protocol. Now this works fine via wifi but I NEED a wired connection because wifi will not be available to me later for this project.

I'm using a Galaxy Note 3. I tried to attach a Ethernet->USB adapter that worked on an Android TV stick but it doesn't seem to work with the Note 3 and pretty much any other android phone I tried.

Now is it possible to either get Ethernet working or use a standard USB connection to the Host PC? It doesn't have to be available in the whole LAN, just the PC connected to it via USB needs to be able to send OSC messages to the Note 3.

  • Just for clarification, are we talking about Open Sound Control? – dotVezz Jan 8 '14 at 18:11
  • Exactly, thats the one. – PTS Jan 8 '14 at 18:18
  • I need to stream UDP data, I also have a Note3, and in my case the OSC is Open Spherical Camera. Speaking about abbreviation overload. My phone is not rooted (yet), I could get away without rooting so far. – Csaba Toth Jul 17 '16 at 0:08
2

This was WAY simpler than I thought it was. I was trying to get this working for days now but it's actually really simple. My first approach was using reverse tethering, having the idea that I would need the Android device to get its Internet/LAN connection from the PC and not the other way around. Though that is not the case, just enable USB Tethering on your android device and thats all you need.

After you did that, open a terminal emulator window on the device or open an adb shell session with the command adb shell. Enter netcfg to print out all the IPs and look for a device named rndis0 or usb0 or maybe another name, depending on your ROM or device. Simply look at all the devices that are "UP" and make sure its not Wifi or Mobile data connection, you can recognize them by the device name.

If you think you found the correct adapter (it shouldn't show more than 2-3 devices that are listed as UP and have an valid IP next to it) simply send your OSC messages to that IP adress and it will work just fine. This should work with about any network protocol.

You should be able to access the device over another computer aswell by setting up some port forwarding on the host PC to the android device IP and sending your messages to the PCs IP. Or maybe using the Android IP adress works aswell though I somewhat doubt your Router is aware of the device.

Double check the IP if its not working, it will not be the same sub network as your LAN. I made that mistake with my first try and blindly entered the first 3 number blocks without having a closer look.

  • Clever. Also pretty easy. – dotVezz Jan 8 '14 at 18:30
  • Thanks. Edited it a bit, some more information and less horrible grammar and spelling mistakes. – PTS Jan 9 '14 at 0:35
  • @ProfessorSparkles I have using Android MediaProjection to grab screen buffer and wants to send it to PC over USB. I want to do it over DatagramChannel (UDP). As per your post I have enabled USB tethering on device and could rndis0 as well using netcfg but not sure what to do next! Any idea please? – iuq Jan 19 '16 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.