Cannot connect to 127.0.0.1:58526 (Port shown under the Developer Mode of WSA) - windows-11

As shown in the title, I can't connect to 127.0.0.1:58526 via adb.
ADB showed
cannot connect to 127.0.0.1:58526: No connection could be made because the target machine actively refused it. (10061)
I checked the netstat
netstat -anep tcp | findstr "58526"
and the result showed that Port 58526 is not listening(actually, I didn't get any result) .
And of course my Developer Mode is on but I can't toggle Wireless Debugging.
BTW, I can connect to WSA by the given IP in the WSA Setting panel(i.e.:172.22.*.*:5555).
Any suggestions on solving this? Thanks!

so I've been able to find a solution to the issue.
First, open a PowerShell window and run
ipconfig
You'll get a list containing lots of IP Addresses divided into categories. Look for a header with a Default tag.
ipconfig output that you're looking for
Now copy the IPv4 Address that's written there.
Connect to the WSA using the following code:
adb connect <Your IPv4 Address>:58526
You'll get a prompt from WSA requesting you to allow debugging. Press Accept and you're done!
Source:
https://learn.microsoft.com/en-us/windows/android/wsa/

Answer first: disable all you network devices, and restart WSA again.
I have the same issue long long a ago, same as
netstat -anep tcp | findstr "58526"
and the result showed that Port 58526 is not listening(actually, I didn't get any result) .
And I can't fix it by reboot my computer, So it is a funny puzzle 'What could cause this problems, and Why?'
Yesterday, when I debug a app that need to get the right network device and listen on the ip address.
when there more the one network device, such as WIFI\cell(4G\5G)\wired\Bluetooth PAN. The code is really hard to figure the right ip address.
So, I guess the WSA has the same problem with me, when you have more the one network device, It will get the wrong ip address to bind.

I had the same issue and was able to fix it with kris' solution, but with the new Advanced Networking feature enabled there was an added wrinkle:
(temporarily) turn off the Advanced Networking feature under WSA System Settings
Restart WSA
Then use kris' solution to:
adb connect <Your IPv4 Address>:58526

Related

Virtual Serial Port on Linux with Elfin EE-10

I want to connect the UART-Port of our central heater to my ProxMox-Server (LXC - Debian) over Web with Virtual Serial Port.
I bought this: https://www.aliexpress.com/item/4000945033185.html and connected it to the central heater and is reachable in the local network.
Since I have never done something in this direction I'm not exactly sure how to set up the connection and I hope someone can help me.
In the Web-Interface of the device, I can set up different protocols (see screenshot).
Thank you for your help.
You need to know more about what the heater is writing and expecting on the serial port. Did you select the right serial baud rate for it?
Have you read the EE-10 IOT_Device_Series_Software_Funtion_20200623 guide (in Downloads tab)? One possibility for further debug is to select the telnetd mode and connect from Linux with telnet to the IP address of the device, default port 23. (Ensure your Linux firewall allows this).
It seems it should ask for login and password, as in the web page. Then you might get an EPORT> prompt which is the EE-10 cli. Enter Exit to enter transparent mode when what you type is sent directly to the heater, and what you see comes from the heater.

why i can't able to access my local server after getting a tunnel using ngrok?

guys please anyone can help me to solve this problem, after generating link by ngrok and when I have try to access this link browser replay : server IP address could not be found
There are many reasons for this error, you can try the following steps to solve this error:
Reset IPv4 settings.
Using cmd, we can issue netsh commands to reset IPv4 settings. launch CMD prompt as administrator, and type netsh winsock reset and hit Enter. Now restart your PC. Open CMD again and type netsh int ipv4 reset reset.log and keypress Enter. Again restart your PC and check if you can connect to the internet. This will completely reset all the IP configurations and changes that we made in our system to default one for automatic resolution.
Flush DNS Cache.
You can also flush the Domain Name Server (DNS) information that is cached on your system. Open cmd as admin and type ipconfig /flushdns, If everything is running right, you should get this as output — Successfully flushed the DNS Resolver Cache.
Change IP and DNS settings.
In most cases, the options are set to default. However, if you’ve made any changes or any antivirus software has deliberately misconfigured it, then you can just revert back the changes.

Bridge Wifi to Raspberry Pi using Ethernet Cable

I am not finding this question in SF history, which was a surprise, so I'll go ahead and ask it.
I am working on an IoT Raspberry Pi project with Windows 10 and need to connect it to the internet via an Ethernet/USB adapter. The adapter itself is made by Belkin. Using this, I can see an ip of 169.stuff get generated for my Pi, which is a private ip. I can deploy code to that from my connected box, however other devices are not able to reach it, and it is not able to make connections out to any servers.
I'm wondering if anybody knows how to bridge the connection.
I am attempting to use the new Azure IoT Hub and the SDK with this in case that makes any differences as that is not a simple rest interface and I believe is some form of socket connection.
Additional Notes:
I have installed a DCHP Server and the Pi gets the ip address: 192.168.0.3 assigned to it. Unfortunately the Pi still can not ping external sites, such as google.com
Latest Discoveries:
I am on a corporate box, which has internet sharing disabled by the system admin. Following these instructions: http://zizhujy.com/blog/post/2013/07/07/Solved-Internet-Connection-Sharing-has-been-disabled-by-the-Network-Administrator.aspx Fails. It shuts down all connectivity to my box and I cannot ping anything or reach the internet or anything.
Thanks,
~David
The 169 address means it isn’t getting a DHCP address assigned.
Since you don't have a router for the Ethernet, you can use Internet Connection Sharing, however we will need to run the following commands against the Pi to set a static IP, gateway, and dns server, since internet connection sharing botches this up a bit at times:
Set-Item WSMan:\localhost\Client\TrustedHosts -Value 192.168.137.2
Enter-PSSession -ComputerName 192.168.137.2 -Credential 192.168.137.2\Administrator
set-executionpolicy unrestricted
netsh int ip set address "Ethernet" static 192.168.137.2 255.255.255.0 192.168.137.1
netsh int ip set dns "Ethernet" static 8.8.8.8
netsh interface ipv4 show config
set-executionpolicy remotesigned
You may need to reboot the Pi at this point then test pinging 8.8.8.8 and google.com to make sure resolution is working. You should be all set!
One other thing, if you have a group policy on the machine that is restricting Internet Connection Sharing then take a look at this article to fix the issue. Note if your organization is constantly sending down the policy then you may have to re-enable Internet Connection Sharing often which is aggravating but at least it will work.
http://zizhujy.com/blog/post/2013/07/07/Solved-Internet-Connection-Sharing-has-been-disabled-by-the-Network-Administrator.aspx
I do this by creating a DHCP server on my laptop and connecting the Pi directly to it. I followed these instructions to get it working:
Download DHCP Server for Windows. It is a 100kB download.
Go to the IPv4 properties page of the Ethernet adapter and set a fixed IP address, say 192.168.2.1
Run the DHCP Server Wizard (downloaded above)
Select the Ethernet adapter from the list shown
Save the configuration file and start up the DHCP Server
Click the 'Continue as tray app' button in the server control panel.
Boot up the Raspberry Pi
A popup notification shows the IP address assigned by the DHCP server to the Raspberry Pi.
Use a SSH client, like PuTTy, to connect to the IP address shown
Hope this works!

SSH Works For Some Hosts, Not For Others

I've been having problems SSHing into my work computer from home. I have been able to succesfully ssh into one of our web servers so I know the ssh daemon is working and my connection is at least allowing some ssh. But when I try to ssh to my work computer it times out.
I went to my University yesterday and I was able to succesfully ssh into both the web server and my work computer. I've looked into our firewall at work to see if there are any blocks on my IP but it isn't blocked.
My ISP is comcast if that helps at all. I've done a few google searches and some comcast customers say that comcast sometimes blocks file sharing ports such as the ssh port (22).
Any help would be appreciated. Thanks.
First check the /etc/hosts.deny file of your work computer. That may contain lines which might suggests that certain IP may be blocked. Then check /etc/hosts.allow file. You can add your home-computers outgoing IP to your work computers /etc/hosts.allow.
NOTE: This question should belong to superusers or serverfault. stackoverflow is for questions that involves coding...
There is not one single "ssh daemon"... there is one running on each host to which you connect successfully. If you cannot connect to a host there are two primary reasons:
There is no SSH daemon running on the host. In that case you will likely get "connection refused"
There is a firewall between you and the host, and it is not allowing port 22 to pass through. In that case you will likely get timeouts.
If you are trying to connect to a host behind a firewall from "outside", as you suggest, it is extremely likely that host is not reachable from the Internet. If the IP address of the "work computer" looks like 192.168.x.x or 172.[16-31].x.x or 10.x.x.x then it is an unroutable private address and you will not be able to reach it from the outside no matter what you do unless a specific port-forwarding rule is set up on the firewall; in that case you would be connecting to the firewall's IP address, not your target host.

xampp server (How to get up and running)

I've been developing locally on a little ubuntu netbook with xampp for about 7 months. Two weeks ago I got a computer I'd like to use as a server. I've installed the latest Ubuntu distribution and xampp, moved all my files over, and forwarded port 80. I've also got a domain name from dyndns.com which is being updated by a client which runs in my router (a Netgear WGR6154 v8).
Now, when I try to access my server by typing in the address I got from dyndns.com the browser loads until it timesout. I can access everything locally using localhost as the address so I believe xampp is running, just unable to connect with the internet.
In order to be able to view my files over the internet what should I do next?
Thanks to all in advance...
[I'm starting a bounty for the first person to help me get my files successfully online]
You have a combination of issues here, and that is something of a problem. Each issue is complex in an of itself. Here is what I would recommend to get you going for certain.
First verify that you can surf the web from your server. This will confirm that you have a working ethernet interface.
Step 1 make sure that XAMPP, and your files are viewable from your home network. I assume you are using something like 192.168.1.X for your network and perhaps your server is 192.168.1.10
Go to another computer in your house and type http://192.168.1.10/ and see if you can see your files. If you can then you know that the server is properly configured and XAMPP is working.
Then add an entry to your hosts file to resolve yourdnsrecord.com (or whatever your dyndns record is) to your private ip address. Then when you type yourdnsrecord.com into a browser from that computer you should still get your files. This will rule out your server being improperly configured to listen for that domain name.
Next you need to test to see if there is a firewall problem. To simplify this, first remove your home router from the equation. Instead, place your new server directly onto your internet connection. (assuming you can). This way, you do not need to have NAT or firewalls properly configured. Your dyndns name should map to a public IP and your server should then have that IP and be connected directly to the Internet. If you have your server directly connected, and the command ifconfig from the root prompt returns the same public IP address that your dynamic dns record is point to, then it should work.
It will make your life easier if you have an iphone or some other way to test how your network is seen from the Internet.
If your public IP as shown by ifconfig is different than the IP record in your dyndns account, then your dynamic dns update script is broken. manually set the IP, and see if things work.
It is very possible that this will not work. Some ISPs firewall port 80 preventing their subscribers from hosting servers. Once you have your server directly connected to the internet you can test this (even if your dns is not working) by using the public IP address. As root, type ifconfig from the command prompt to get your public ip address. Then type the command tcpdump -i eth? port 80 from the root prompt. eth? needs to be the same interface that you saw had a public IP address from the ifconfig command. usually this is eth0 but it might be wire0 or something like that.
This command will show you all traffic coming on port 80 to your server.
From an iphone (or whatever second Internet connection you have) browse to the IP address that you got from your ifconfig command. If you see something on your server (and it is directly connected to your ISP) then your ISP is not firewalling you.
If you can get to your server, when it is directly connected to the Internet, either by IP address or by DynDNS address, then your ISP is OK and it is time to debug your firewall.
Two things need to work for your firewall to be configured NAT, where the public address that your router gets from your ISP is converted into your private network and a firewall rule which permits that traffic. If you get this far, then you know your firewall is the problem and then it is just a matter of getting its configuration correct. There are far to many home routers to document here, but you usually can find how-to instructions for your router for this task from the manufacturers website (usually it is part of the manual)
If you follow these instructions exactly you will get your system working. Make comments on the process and I will be happy to modify this to make it clearer.
HTH,
-FT
You should make sure your xampp is not listening to only the localhost.
to do so edit your apache configuration file and check and search for Listen directive
you should be able to know also by analysing the output of netstat -a.
After that make sure your router is forwarding properly, using tcpdump would help.
drop me a comment if you need more help.
Cheers

Resources