spieglt / FlyingCarpet

Cross-platform AirDrop. File transfer between Android, iOS, Linux, macOS, and Windows over ad hoc WiFi. No network infrastructure required, just two devices with WiFi chips in close range.
GNU General Public License v3.0
3.6k stars 145 forks source link

Its not working for me #5

Closed Zero3K closed 6 years ago

Zero3K commented 6 years ago

I am getting an error when trying to send a file to a "laptop" (its called a GPD WIN) when running it under Windows 10 Home. Here's the log:

Entered password: FSPy Error getting current SSID: exit status 1 Profile flyingCarpet_098b49 is added on interface Realtek RTL8192CU Wireless LAN 802.11n USB 2.0 Network Adapter. Looking for ad-hoc network flyingCarpet_098b49 for 60 seconds... Error getting current SSID: exit status 1

Zero3K commented 6 years ago

Now its stuck on "Looking for peer IP".

spieglt commented 6 years ago

Interesting, thanks for the logs. That error should not prevent the transfer from happening. The "Looking for peer IP" is normal behavior. What OS is the other end? The GPD WIN is set to "receive" and the other end is set to "send," correct? What is the output from the other end?

Zero3K commented 6 years ago
  1. Windows 10 Home
  2. Correct.
spieglt commented 6 years ago

So both devices are running Windows 10 Home? In that case, if the GPD WIN is set to receive, it should be hosting the ad-hoc network, not trying to join it. Is the original output you posted from the GPD WIN or the sending end?

Zero3K commented 6 years ago

The sending end (in other words the desktop PC with the wireless adapter that is mentioned in the log).

spieglt commented 6 years ago

Will you please post the complete logs from both ends? Thanks. Need to see whether the receiving end was able to put out the network/advertise it.

Zero3K commented 6 years ago

I'll do that when I get home from the gym.

Zero3K commented 6 years ago

The Log On the Desktop PC (which is set to Send):

Welcome to Flying Carpet!

Please select whether you're sending or receiving, the OS of the other computer, your file(s) or folder, and press Start.

Entered password: YmbL Error getting current SSID: exit status 1 Profile flyingCarpet_b22083 is added on interface Realtek RTL8192CU Wireless LAN 802.11n USB 2.0 Network Adapter. Looking for ad-hoc network flyingCarpet_b22083 for 60 seconds... Looking for peer IP...

The Log on the GPD WIN (which is set to Receive):

Welcome to Flying Carpet!

Please select whether you're sending or receiving, the OS of the other computer, your file(s) or folder, and press Start.

============================= Transfer password: YmbL Please use this password on sending end when prompted to start transfer.

SSID: flyingCarpet_b22083 Could not start hosted network, trying Wi-Fi Direct. Initialized Windows Runtime. Listening on :3290

spieglt commented 6 years ago

Hmm interesting. It looks like Wi-Fi Direct is starting correctly but it may not be. I'd be interested in three things if you can check them (on the GPD WIN): 1) the output of ipconfig /all in a Command Prompt (to check for the presence of a Microsoft Wi-Fi Direct Virtual Adapter) 2) the output of netsh wlan show driver in a Command Prompt (to confirm that Hosted Network supported is No, and 3) whether, when the receiving end is waiting at Listening on :3290, you can see the flyingCarpet_b22083 (or whatever) network from your phone or other wireless device.

My suspicion is that the wireless card in the GPD WIN doesn't support hosted networking or Wi-Fi Direct, in which case it can't receive with Flying Carpet (or send to Linux and Mac). But it should be able to send to a Windows machine, so I'd be curious to know if you can send files from the GPD WIN to the desktop. Let me know if you get the chance to check any of this. Thanks!

spieglt commented 6 years ago

Also, does it list the model of wireless card in the Windows Device Manager (under Network Adapters)?

Zero3K commented 6 years ago
  1. Here's the output of ipconfig /all:

Windows IP Configuration

Host Name . . . . . . . . . . . . : GPDWin Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No

Wireless LAN adapter Local Area Connection* 1:

Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter Physical Address. . . . . . . . . : B2-F1-EC-B8-1E-14 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Local Area Connection* 12:

Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #2 Physical Address. . . . . . . . . : B2-F1-EC-B8-16-14 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Wi-Fi:

Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Broadcom 802.11ac Wireless PCIE Full Dongle Adapter Physical Address. . . . . . . . . : B0-F1-EC-B8-1E-14 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IPv4 Address. . . . . . . . . . . : 10.0.1.22(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Lease Obtained. . . . . . . . . . : Wednesday, February 28, 2018 7:35:42 PM Lease Expires . . . . . . . . . . : Saturday, February 22, 2042 8:33:58 PM Default Gateway . . . . . . . . . : 10.0.1.1 DHCP Server . . . . . . . . . . . : 10.0.1.1 DNS Servers . . . . . . . . . . . : 10.0.1.85 NetBIOS over Tcpip. . . . . . . . : Enabled

  1. Here's the output of netsh wlan show driver:

Interface name: Wi-Fi

Driver                    : Broadcom 802.11ac Wireless PCIE Full Dongle Adapter
Vendor                    : Broadcom
Provider                  : Broadcom
Date                      : 10/22/2017
Version                   : 1.558.53.1
INF file                  : oem13.inf
Type                      : Native Wi-Fi Driver
Radio types supported     : 802.11ac 802.11a 802.11n 802.11g 802.11b
FIPS 140-2 mode supported : Yes
802.11w Management Frame Protection supported : Yes
Hosted network supported  : No
Authentication and cipher supported in infrastructure mode:
                            Open            None
                            Open            WEP
                            WPA-Enterprise  TKIP
                            WPA-Enterprise  CCMP
                            WPA-Personal    TKIP
                            WPA-Personal    CCMP
                            WPA2-Enterprise TKIP
                            WPA2-Enterprise CCMP
                            WPA2-Personal   TKIP
                            WPA2-Personal   CCMP
                            Vendor defined  Vendor defined
                            Vendor defined  Vendor defined
IHV service present       : Yes
IHV adapter OUI           : [00 10 18], type: [00]
IHV extensibility DLL path: C:\WINDOWS\System32\bcmihvsrv64.dll
IHV UI extensibility ClSID: {aaa6dee9-31b9-4f18-ab39-82ef9b06eb73}
IHV diagnostics CLSID     : {00000000-0000-0000-0000-000000000000}
Wireless Display Supported: Yes (Graphics Driver: Yes, Wi-Fi Driver: Yes)
  1. Yes, I can see the network made by Flying Carpet when looking at the list of wireless networks my tablet picks up.
spieglt commented 6 years ago

Oh, awesome, it is putting out the network then so not a WiFi Direct issue. Don't need to know the wireless card model. Must be an issue with the code that tries to find the IP of the receiving end. Can you set up the transfer that way again, to where it's stuck at Looking for peer IP, and then send the output of arp -a?

Zero3K commented 6 years ago

Here's the same information for my Desktop PC:

  1. Windows IP Configuration

    Host Name . . . . . . . . . . . . : Bryan-PC Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Mixed IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Realtek PCIe GBE Family Controller:

Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller Physical Address. . . . . . . . . : DC-FE-07-11-3F-DE DHCP Enabled. . . . . . . . . . . : No Autoconfiguration Enabled . . . . : Yes IPv4 Address. . . . . . . . . . . : 10.0.1.3(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 10.0.1.1 DNS Servers . . . . . . . . . . . : 127.0.0.1 NetBIOS over Tcpip. . . . . . . . : Enabled

Wireless LAN adapter Local Area Connection* 4:

Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter Physical Address. . . . . . . . . : EC-08-6B-0E-6E-63 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Microsoft Wi-Fi Direct Virtual Adapter:

Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #2 Physical Address. . . . . . . . . : EC-08-6B-0E-6E-63 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Local Area Connection* 1:

Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Microsoft Hosted Network Virtual Adapter Physical Address. . . . . . . . . : EC-08-6B-0E-6E-63 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IPv4 Address. . . . . . . . . . . : 192.168.137.1(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : NetBIOS over Tcpip. . . . . . . . : Enabled

Wireless LAN adapter Realtek RTL8192CU Wireless LAN 802.11n USB 2.0 Network Adapter:

Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Realtek RTL8192CU Wireless LAN 802.11n USB 2.0 Network Adapter Physical Address. . . . . . . . . : EC-08-6B-0E-6E-63 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes

  1. Interface name: Realtek RTL8192CU Wireless LAN 802.11n USB 2.0 Network Adapter

    Driver : Realtek RTL8192CU Wireless LAN 802.11n USB 2.0 Network Adapter Vendor : Realtek Semiconductor Corp. Provider : Microsoft Date : 3/4/2016 Version : 1027.4.630.2015 INF file : rtwlanu_oldIC.inf Type : Native Wi-Fi Driver Radio types supported : 802.11n 802.11b 802.11g FIPS 140-2 mode supported : Yes 802.11w Management Frame Protection supported : Yes Hosted network supported : Yes Authentication and cipher supported in infrastructure mode: Open None WPA2-Personal CCMP Open WEP-40bit Open WEP-104bit Open WEP WPA-Enterprise TKIP WPA-Personal TKIP WPA2-Enterprise TKIP WPA2-Personal TKIP WPA-Enterprise CCMP WPA-Personal CCMP WPA2-Enterprise CCMP Vendor defined TKIP Vendor defined CCMP Vendor defined Vendor defined Vendor defined Vendor defined WPA2-Enterprise Vendor defined WPA2-Enterprise Vendor defined Vendor defined Vendor defined Vendor defined Vendor defined Authentication and cipher supported in ad-hoc mode: Open None Open WEP-40bit Open WEP-104bit Open WEP WPA2-Personal CCMP Wireless Display Supported: Yes (Graphics Driver: Yes, Wi-Fi Driver: Yes)

  2. I can see the network made by Flying Carpet when looking at the list of wireless networks my tablet picks up.

Zero3K commented 6 years ago

Running arp -a on the GPD WIN seemed to help fix it.

EDIT: Nope. Here's the output of it when the GPD WIN is stuck on finding peer IP:

Interface: 192.168.137.1 --- 0x6 Internet Address Physical Address Type 192.168.137.255 ff-ff-ff-ff-ff-ff static 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.251 01-00-5e-00-00-fb static 239.255.255.250 01-00-5e-7f-ff-fa static

Interface: 10.0.1.22 --- 0x8 Internet Address Physical Address Type 10.0.1.1 e4-8d-8c-75-e2-25 dynamic 10.0.1.85 b8-27-eb-fc-f0-23 dynamic 10.0.1.255 ff-ff-ff-ff-ff-ff static 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.251 01-00-5e-00-00-fb static 239.255.255.250 01-00-5e-7f-ff-fa static

And here's the output of it on the Desktop PC:

Interface: 10.0.1.3 --- 0xa Internet Address Physical Address Type 10.0.1.1 e4-8d-8c-75-e2-25 dynamic 10.0.1.16 70-b1-4e-e9-1c-27 dynamic 10.0.1.20 00-16-6b-eb-36-cb dynamic 10.0.1.71 00-90-47-30-1e-89 dynamic 10.0.1.72 00-90-47-30-12-ce dynamic 10.0.1.73 00-90-47-30-12-d4 dynamic 10.0.1.74 00-90-47-30-1e-86 dynamic 10.0.1.75 00-90-47-30-12-d1 dynamic 10.0.1.76 00-90-47-30-1e-8c dynamic 10.0.1.85 b8-27-eb-fc-f0-23 dynamic 10.0.1.255 ff-ff-ff-ff-ff-ff static 169.254.6.60 70-b1-4e-e9-1c-27 dynamic 169.254.10.147 44-32-c8-66-88-e6 dynamic 169.254.11.75 44-32-c8-66-9d-fa dynamic 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.251 01-00-5e-00-00-fb static 239.255.255.250 01-00-5e-7f-ff-fa static

Interface: 192.168.137.1 --- 0xd Internet Address Physical Address Type 192.168.137.255 ff-ff-ff-ff-ff-ff static 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.251 01-00-5e-00-00-fb static 239.255.255.250 01-00-5e-7f-ff-fa static 255.255.255.255 ff-ff-ff-ff-ff-ff static

Its getting stuck when the GPD WIN is in Send Mode and the PC is in Receive Mode. And also when the GPD WIN is in Receive Mode and the PC is in Send Mode.

spieglt commented 6 years ago

That's very weird. Are those arp outputs from the same transfer, or when each was in receive mode during different transfers?

Zero3K commented 6 years ago

Those outputs were during other transfers.

spieglt commented 6 years ago

Ok that makes sense. They must have each been the receiver. Will you please run arp -a on the sending end in that situation? (Once it says "Looking for peer IP".)

Zero3K commented 6 years ago

Here's the ARP -a of the GPD WIN in Send Mode:

Interface: 192.168.137.1 --- 0x6 Internet Address Physical Address Type 192.168.137.255 ff-ff-ff-ff-ff-ff static 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.251 01-00-5e-00-00-fb static 239.255.255.250 01-00-5e-7f-ff-fa static

Interface: 10.0.1.22 --- 0x8 Internet Address Physical Address Type 10.0.1.1 e4-8d-8c-75-e2-25 dynamic 10.0.1.20 00-16-6b-eb-36-cb dynamic 10.0.1.71 00-90-47-30-1e-89 dynamic 10.0.1.72 00-90-47-30-12-ce dynamic 10.0.1.73 00-90-47-30-12-d4 dynamic 10.0.1.74 00-90-47-30-1e-86 dynamic 10.0.1.75 00-90-47-30-12-d1 dynamic 10.0.1.76 00-90-47-30-1e-8c dynamic 10.0.1.85 b8-27-eb-fc-f0-23 dynamic 10.0.1.255 ff-ff-ff-ff-ff-ff static 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.251 01-00-5e-00-00-fb static 239.255.255.250 01-00-5e-7f-ff-fa static

Here's the ARP -a of the Desktop PC in Receive Mode:

Interface: 192.168.137.1 --- 0x6 Internet Address Physical Address Type 192.168.137.255 ff-ff-ff-ff-ff-ff static 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.251 01-00-5e-00-00-fb static 239.255.255.250 01-00-5e-7f-ff-fa static

Interface: 10.0.1.22 --- 0x8 Internet Address Physical Address Type 10.0.1.1 e4-8d-8c-75-e2-25 dynamic 10.0.1.20 00-16-6b-eb-36-cb dynamic 10.0.1.71 00-90-47-30-1e-89 dynamic 10.0.1.72 00-90-47-30-12-ce dynamic 10.0.1.73 00-90-47-30-12-d4 dynamic 10.0.1.74 00-90-47-30-1e-86 dynamic 10.0.1.75 00-90-47-30-12-d1 dynamic 10.0.1.76 00-90-47-30-1e-8c dynamic 10.0.1.85 b8-27-eb-fc-f0-23 dynamic 10.0.1.255 ff-ff-ff-ff-ff-ff static 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.251 01-00-5e-00-00-fb static 239.255.255.250 01-00-5e-7f-ff-fa static

spieglt commented 6 years ago

Hmm so it's 192.168.137.1 even in send mode. It should only have that address when receiving. Are there any other Flying Carpet.exe processes in the Details tab of Task Manager? I'm not sure why it would have that address unless it was still broadcasting its network from when it was receiving....

Zero3K commented 6 years ago

Nope, there is only one Flying Carpet.exe process that is running.

spieglt commented 6 years ago

Gotcha. Don't have a solution right now but will look into this more tomorrow. Thanks for all the info.

Zero3K commented 6 years ago

You're welcome. Oh, I am running Connectify on the Desktop PC. Maybe that's causing the issues that I am having.

spieglt commented 6 years ago

I see that it's a hot spot app so yes, could well be!

Zero3K commented 6 years ago

It was stopped when I was having the problem.

spieglt commented 6 years ago

Can you disable/close Connectify entirely and try? It running in the background is the only explanation I can think for why it would hold that address.

Zero3K commented 6 years ago

It does work with it closed. I just tested the PC being in Send Mode and the GPD WIN being in Receive Mode and the file on the PC was being sent to the GPD WIN until it encountered a cannot write chunk error. Maybe getting a new dongle will fix that.

Zero3K commented 6 years ago

How about having it use a different IP address?

spieglt commented 6 years ago

Great to hear. Unfortunate that it had a write error but you're right, that could be due to a faulty wireless adapter. A friend of mine had a similar error and eventually I got him to send me diagnostics and found that his wireless card had just told the kernel out of nowhere that it had lost the connection, and he said he had semi-frequent issues with it dropping generally, so I concluded that it was a hardware problem.

As for IP address, the 192.168.137.X range is what Windows uses by default when hosting WiFi Direct connections (192.168.173.X for hosted networks). It's common (though not necessary) for the DHCP server in a subnet be at the .1 address, and it will hand out random addresses in its DHCP pool for clients that join the network. I have to keep it to that default, both to avoid modifying your registry, and because Mac and Linux machines make it more difficult than Windows to find peers on a network. (Mac doesn't act as a DHCP server when it hosts an ad hoc network, and neither Mac nor Linux responds to broadcast pings by default, so it's hard to discover peers. It's easy for them to find the Windows machine if it hosts, so Windows hosts unless it's a Windows<->Windows transfer, in which case the receiving end hosts.)

Closing this for now as it sounds like we got to the bottom of the original problem, but if you try another dongle and it still doesn't work please let me know. Thanks for your follow-through on this, it's very helpful and much appreciated.

Zero3K commented 6 years ago

For some reason, its not working even after stopping Connectify completely.