I'm trying to configure a Proxicast PocketPort 2 Modem Bridge to work as a NAT router which will plug directly into the WAN port of my router. The PocketPort 2 is set by default to ttyUSB1 and I can configure that to anything I want. The PocketPort 2 is complaining with "Failed to open /dev/ttyUSB: No such device".
Question:, What command can I use in Cynogenmod's terminal to find out which ttyXXX is set for the Phone's usb port?
Related
I have a local wireless internet company and I am wondering if there is any way to develop a "driver" that would allow me to use a usb ethernet adapter with an Acer Iconia A500 tablet running Andriod Honeycomb.
I know that it has wifi and cellular connectivity, but for my techs in the field, doing installations, this would be a great tool. We are currently using netbooks running windows 7 lite, but a tablet would be much easier to tote around and faster on loading etc.
Does anyone have any idea if this is possible? I know the Iconia A500 has a full size usb port, but I also know that nothing will work without the right driver installed. All we need to be able to do, is open a browser window and input in our ip addresses so we can gain access to the motorola and ubiquity radios that we are trying to provision in the field.
Any suggestions would be appreciated.
not sure if it works with honeycomb, but on ICS I have used a usb ethernet adapter with the tablet, mind you that some applications dont work with it, but the browser and market place do. What you'll need to do first is have your tablet rooted, then download either android terminal emulator or Gscript lite (with gscript lite you can save the script for use again.) In the terminal you will want to run netcfg, this will show you all of your interfaces and will tell you if your usb to ethernet adapter is detected. If it is detected there will be an interface called usb and then a number aka usb0 or possibly even eth0. next you will want to take that interface and make sure it is up by running ifconfig usb0 up. next you'll need an ip address, if yours is assigned dynamically then run dhcpcd usb0 then setprop dns1 8.8.8.8 (or use whatever DNS server you wish). Now if you need a static address, such as 192.168.0.2 or something you would run ifconfig usb0 192.168.0.2. Also all of these commands will need root so make sure you type in su beforehand.
Hello everyone,
I am taking networking classes and I was wondering if it's possible, instead of carrying a laptop with me, to use my SGS2(rooted) to configure switches/router with.
I bought a female to female usb adapter, and i also have a USB to serial cable. So all the cabling is fine, but still when I open a console emulator i get nothing going there...
I believe it may be parity related, but there seem to be no console parity settings on any of the terminal emulators that i was able to find on the market.
Usualy, if you extablish a console connection from a laptop via USB, the usb port gets defaulted to COM3 or COM4. Do android devices have a defaulted COM port to the usb connection, Is there a config file where I can change it, or is it supported at all?
any help would be appreciated,
thanks
May I know OPO support Ethernet via OTG?
I tried connect directly, and using same apps, but it seems failed.
I need to use the ethernet port and config the static ip to the port, any suggestion guy, or easier way to do it
And I found a way, but required root
1 - using terminal with root permission
2 - config the ip and add ip/gw to the eth0, which can show the config by ifconfig
Is it possible??
Please feel free to advise it, thanks
offtopic: but why?
I Google it and found it is very easy to connect via eth otg using tablet, and config IP
But opo is not able to show up eth configuration
This script is for non rooted phones, as on rooted ones TCP listening for adb can be configured on the device and it doesn't need to be plugged to the USB beforehand, meanwhile on un-rooted ones it should be apparently done after every phone reset. I've made this script so I don't have to manually enter commands every time eye wish to start scrcpy after a phone reset. The script also minimizes which also hides the scrcpy command line afterwards, but can also be hidden.
What it does:
- Minimizes the window
- Issues "ifconfig" to the device to get its IP.
- Enables port listening and connects to the device over WiFi
- Waits a bit
- Starts scrcpy.
Usage:
- Connect the phone
- Allow the dialog on the phone //if asked
- Open the script
- Allow the dialog on the phone //if asked
- You can disconnect the device
- Should be all.
The script has to be placed in the scrcpy's directory to work, and should only work correctly with one device connected.
To hide the window you can change the following line:
Code:
ctypes.WinDLL('user32').ShowWindow(ctypes.WinDLL('kernel32').GetConsoleWindow(),6)
to :
ctypes.WinDLL('user32').ShowWindow(ctypes.WinDLL('kernel32').GetConsoleWindow(),0)
and if you wish to run scrpy with some arguments you can do so by editing the following line:
Code:
os.system("scrcpy -s "+AyyyP+":4774")
where you can either add other arguments befor the "-s" part or after the ":4774" like so:
os.system("scrcpy -m 720 -s "+AyyyP+":4774")
or so:
os.system("scrcpy -s "+AyyyP+":4774 -m 720")
the changes should be doable in almost any text editor. Scrcpy attributes can be currently found here.
Also python 3.x has to be installed on the PC which should be obtainable here.
Sidenote: File is located in a .zip so I was able to upload it, just extract it beforehand.
If you have any questions feel free to ask .
Reserved.
Thank you for this python scrcpy script on behalf of everyone who loves scrcpy/sndcpy mirroring onto the PC as I do, where I'd like to take the developer up on his offer of:
If you have any questions feel free to ask
Click to expand...
Click to collapse
As most people know, Android 10 and below allowed wireless adb connections AFTER a USB connection was first established (adb tcpip 5555 && adb connect [IP]:5555), but that changed (for the better) in Android 11 and above with the new new Developer options Wireless debugging random port assignments (adb connect [IP]:[PORT] or adb pair [IP]:[PORT] [PIN]) such that the adb wireless connection never needs USB cable ever again.
Given Android 11 allows Developer options Wireless debugging via a random port, and Android 12 new Developer options Wireless debugging allows that to be accessed even easier with a new Developer options Wireless debugging tile, the only thing missing is a way to get, after the fact, the random port assignment that Android uses for the adb wireless connection to your PC.
[adb,scrcpy,vysor] What ports does Android 12 randomly set when Wi-Fi connecting via Wireless debugging adb "pair" or "connect" commands?
Does anyone know how to obtain that random Android port address from the PC?
I am asking for detailed instructions on how to install it on the galaxy s22U? I can't handle it on my own.
What ports does Android 12 randomly set when connecting wirelessly to adb via either the Wireless debugging "pair" or the "connect" adb PC commands?
Brief history:
While Android has forever been able to initially connect over TCP Port 5555 over USB first, and then the USB cable could have been disconnected to mirror Android over to the PC wirelessly on your LAN...
... As of Android 12, there are fantastic new "Developer options" for "Wireless debugging" which allow us to mirror Android over to any PC (Mac/Windows/Linux) without ever needing a USB cable ever again!
Brief background:
1. The wonderful screen mirroring tools (Vysor, Scrcpy, Sndcpy,etc.) connect using adb
2. We write scripts on the PC to mirror multiple devices onto the PC sans consoles
3. Each Android device has a random port assignment for adb "pair" & "connect" commands
C:\> adb connect 192.168.0.2:[RANDOM-PORT]C:\> adb pair 192.168.0.2:[RANDOM-PORT] [RANDOM-PIN]
We need a tool to TEST which random port Android 12 sets Developer options Wireless debugging to.
We have a variety of tools as described in this recent thread today:
(PSA) Using the new Android 12 TILE for 'Developer options' 'Wireless debugging' to establish adb connection over Wi-Fi without USB
But those port-scanning tools take FOREVER to run on all possible ports.
Hence it behooves us to limit the port scan to just the ports Android 12 uses for Wireless debugging.
C:\> portqry -n 192.168.0.2 -r 30000:40000C:\> netstat -ano -p tcp | findstr "92.168.0.2"C:\> adb shell "ifconfig|grep -A 1 wlan0|tail -n 1|cut -f2 -d:|cut -f1 -d' '"C:\> adb mdns servicesC:\> nmap 92.168.0.2etc.
That is the reason I ask this very specific question:
What ports does Android 12 use for Developer options Wireless debugging?
I just came home and connected to scrcpy via adb over port 41703
C:\> adb connect 192.168.0.2:41703 && scrcpy
Click to expand...
Click to collapse
And then I ran the Microsoft port query command (which is slow as a lazy dog), but at least portqry.exe listed that port as "listening"...
c:\app\network\portqry\portqry -nr 192.168.0.2 -e 41703
Querying target system called:
192.168.0.2
Attempting to resolve IP address to a name...
Failed to resolve IP address to name
querying...
TCP port 41703 (unknown service): LISTENING
Click to expand...
Click to collapse
Of course, I already knew the port was 41703 by looking at the phone by longpressing on the new Android 12 "Developer options Wireless debugging tile" (which saves a bunch of steps digging into Android Settings and then Developer options).
But assuming I didn't know the port, but only knew the range, this would work (but it's horribly slow).
c:\app\network\portqry\portqry -n 192.168.0.2 -r 41700:41705
TCP port 41700 (unknown service): NOT LISTENING
TCP port 41701 (unknown service): NOT LISTENING
TCP port 41702 (unknown service): NOT LISTENING
TCP port 41703 (unknown service): LISTENING
TCP port 41704 (unknown service): NOT LISTENING
TCP port 41705 (unknown service): NOT LISTENING
Click to expand...
Click to collapse
Of course, once you know the IP address & port Android randomly set the new Android 12 Developer options Wireless debugging to, many basic network commands will tell you that port is being used by adb on that IP address, for example...
C:\> adb shell "ifconfig|grep -A 1 wlan0|tail -n 1|cut -f2 -d:|cut -f1 -d' '"
192.168.0.2
Click to expand...
Click to collapse
Where once you know the IP address, you can query the port.
C:\> netstat -ano -p tcp | findstr "192.168.0.2"
TCP 192.168.0.2:2392 192.168.0.2:41703 ESTABLISHED 1928
Click to expand...
Click to collapse
But... I knew the port ahead of time by looking on the phone to see what the random port the new Android 12 Developer options Wireless debugging had set the phone to.
What we need, of course, is a way to narrow down the range of ports that adb will use, which, to that end, I opened this thread.
BTW a search shows EVERYONE has the same adb wi-fi needs!
ADB Wifi, how to specify port and have it fix
[Q] Is it possible to adb connect via wifi without configuring port on android?
Connect Android phone over Wi-Fi using ADB
adb over wi-fi
[TUT] ADB over WI-FI
How to add WiFi network over ADB without root?
[GUIDE] How to connect adb over wifi
ADB Via WiFi
Adb over wifi
ADB-Over-WiFi
[APP] ADB WiFi
[APP] [4.1+] [OPEN SOURCE] WiFi ADB (Kotlin)
ADB over WiFi missing from developer option
ADB Via WiFi doesn't work.
adb over wifi without root?
[TUTORIAL] ADB over WiFi / TCP
[Q] adb over wifi?? without root
[APP] ADB WiFi
Adb over wifi
how can i enable adb over wifi
ADB over wifi
[Q] ADB only over wIFI no USB
Adb over wifi
[Q] ADB over wifi, no USB to accept RSA key
[Q] Is it possible to adb connect via wifi without configuring port on android?
[PYTHON SCRIPT][WINDOWS]Start scrcpy over Wi-Fi
[APP][8.0.0+][ROOT] Start ADB Over Wi-Fi [Root]
UPDATE:
It's IMPORTANT to be able to know what the random port is from the PC (without needing to touch the Android phone at all).
Making use of a 2012 thread today...
How to make adb listen to tcpip 5555 after reboot
@AlainCh2 came up with a third option:
1. The first option is to try to keep the random port static
2. The second option is to figure out what it is from the PC alone
However... In that ancient thread, a third option was described...
3. Try to SET the port over Wi-Fi (without USB!) from the PC
Which @AlainCh2 experimented with over here today in post #10.
This is the best I can do (but it's cheating)
a. Non-rooted Android 12 has Wi-Fi turned on
c. Android has the Wi-Fi connected to an access point
d. Android has Developer options Wireless debugging = on
e. Which reports a static IP & random port of 192.168.0.2:41269
Once I already know the random port assignment, these commands ALWAYS work (but I had to cheat!)...
1. Win+R > cmd
2. adb kill-server
3. adb connect 192.168.0.2:41269
4. scrcpy --tcpip=192.168.0.2:41269
5. up pops the mirror of Android in the scrcpy GUI
View attachment 5677027
While that works perfectly, the problem is that I have to KNOW the port before any of that works.
My setup for scrcpy, 1 device:
1. Connect phone and PC to the same network.
2. Connect the phone to the PC via cable, execute command "scrcpy -d --tcpip" then scrcpy will setup the rest
scrcpy will set the port automatically to 5555 and try to establish a connection. No need to look for ports somewhere.
You may then disconnect the cable from PC. Just make sure you have a static IP for convenience. You don't need to enable wireless debugging for the port or anything. You just need to execute the steps above once every reboot. You may connect multiple devices. When executing the steps above, just make sure only one device is connected via cable at a time. You may then execute "scrcpy -s (ip)" or "scrcpy --tcpip=(ip)" to connect to one of the devices. If only one is connected wirelessly, "scrcpy -e" will do.
wildcatacu said:
My setup for scrcpy, 1 device:
1. Connect phone and PC to the same network.
2. Connect the phone to the PC via cable, execute command "scrcpy -d --tcpip" then scrcpy will setup the rest
scrcpy will set the port automatically to 5555 and try to establish a connection. No need to look for ports somewhere.
You may then disconnect the cable from PC. Just make sure you have a static IP for convenience. You don't need to enable wireless debugging for the port or anything. You just need to execute the steps above once every reboot. You may connect multiple devices. When executing the steps above, just make sure only one device is connected via cable at a time. You may then execute "scrcpy -s (ip)" or "scrcpy --tcpip=(ip)" to connect to one of the devices. If only one is connected wirelessly, "scrcpy -e" will do.
Click to expand...
Click to collapse
Nice, I can say it works
But I have to run scrcpy -d --tcpip only if I reboot tablet (in my case) or also if I restart pc?
If only the PC is restarted, there's no need to reconnect the android device via USB. To reconnect, you just need to run this command replacing the IP address (preferably set to static for convenience): scrcpy --tcpip=(Local IP Address). If you set your device's static IP to 192.168.1.24 for example, run the command: scrcpy --tcpip=192.168.1.24
As long as the Android device doesn't shut down or restart, you may reconnect to it anytime. PC can be shut down or restarted. The initial wired setup is only required on the Android device's first boot.