leonardo.daga
Posts: 13
Joined: Fri Jul 15, 2016 10:24 am

Problem in Remote access to a TCP server via Access Point

Fri Jul 15, 2016 4:25 pm

Hi all, I have a small problem with my RPi3B2 and Windows IoT.

First of all, I configured both the Ethernet connection and the RPi3 as Access Point, so I have two networks:
Wireless LAN adapter Wi-Fi:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Wireless LAN adapter Local Area Connection* 2:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Wireless LAN adapter Local Area Connection* 3:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::d89c:10b3:142f:b4a8%3
IPv4 Address. . . . . . . . . . . : 192.168.137.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::5d7:7d22:dfe0:a366%6
IPv4 Address. . . . . . . . . . . : 192.168.1.128
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.192
Then I've created an application that contains a TCP server (port 21120) that runs on the RPi3. I can connect to this TCP server (using for example Putty) using a remote PC in the Ethernet network, I can't connect using the Wireless Network in another PC connected wireless to the RPi3. I can still connect to the webserver (port 8080) or the PowerShell (port 5985) of the RPI3 using the wireless network.

I don't know if it's something related to the application manifest, I have activated the following capabilities:
<Capability Name="internetClient" />
<Capability Name="privateNetworkClientServer" />
<Capability Name="internetClientServer" />

I've tryed also with "wiFiControl" capability, without success. I wonder if the Listener is associated only to the Ethernet adapter and not to the wifiAdapter, but I don't think this is the problem.

I'm using the Win IoT operating system ver. 10.014366.0, I will try next week with 14376

I'll appreciate any help
Attachments
SchemaRaspberry.PNG
SchemaRaspberry.PNG (19.21 KiB) Viewed 1147 times
Last edited by leonardo.daga on Mon Aug 29, 2016 10:24 am, edited 1 time in total.

leonardo.daga
Posts: 13
Joined: Fri Jul 15, 2016 10:24 am

Re: Problem in Remote access to a TCP server via Access Poin

Mon Jul 18, 2016 3:52 pm

Unluckly, no improvements with new release 14376 (that anyway is quite bugged).

leonardo.daga
Posts: 13
Joined: Fri Jul 15, 2016 10:24 am

Re: Problem in Remote access to a TCP server via Access Poin

Fri Jul 29, 2016 1:32 pm

I found a release note that states:
(https://developer.microsoft.com/en-us/w ... leasenotes)

WiFi Direct limitations on IoTCore
- The IoTCore device has to be the connecting device – it will not work as the advertising device with another device initiating the connection.

I can't understand why the hell microsoft adds so many limitations, without providing a way to disable it, at least for some given applications.

Seriga
Posts: 5
Joined: Thu Aug 25, 2016 12:10 am

Re: Problem in Remote access to a TCP server via Access Poin

Thu Aug 25, 2016 12:32 am

It is very difficult to parse the English. As I understand it in RPi3B2 you can't use “access point mode WiFi? And how you managed to configure RPi3B2 as a wifi access point? Show how it is implemented in the code.

Seriga
Posts: 5
Joined: Thu Aug 25, 2016 12:10 am

Re: Problem in Remote access to a TCP server via Access Poin

Thu Aug 25, 2016 12:33 am

It is very difficult to parse the English. As I understand it in RPi3B2 you can't use “access point mode WiFi? And how you managed to configure RPi3B2 as a wifi access point? Show how it is implemented in the code.

haroldpulcher
Posts: 58
Joined: Tue Jun 09, 2015 8:08 pm
Contact: Website

Re: Problem in Remote access to a TCP server via Access Poin

Thu Aug 25, 2016 10:03 pm

The most likely answer to your question as to why the wifi has to be the connecting not the advertising part of a connection is simply security.

The current standard way to operate these device is as a node, not a gateway.

If the device is responsible for setting up and sending out requests, then that removes a whole ton of potential security problems. There are plenty of protocols that allow these devices to receive data(MQTT, AMQP, etc...) where the device initiates the connection. This allows the device block all network traffic except what has been asked for.

leonardo.daga
Posts: 13
Joined: Fri Jul 15, 2016 10:24 am

Re: Problem in Remote access to a TCP server via Access Poin

Mon Aug 29, 2016 9:58 am

The point is that I don't understand why WinIOT has this limitation when the RaspberryPi is in a wifi network generated by itself (when configured as access point), while the same limitation doesn't apply when the same device is in a private Ethernet network or in a network generated by an external WLAN router.
In both case I've configured the same TCP server in RPi, same port, same mask: Using a TCP client in my computer I can't connect in the first case (wifi network generated by RPi configured as Access Point), but I can connect in the second case (home network generated by an external wifi router).
Moreover, I see that other applications (for example, PowerShell) can remotely access RPi when this is configured as Access Point while custom applications simply can't. I think that Powershell exposes potentially much bigger security issues than any other user application because it allows the complete control of the device.

Return to “Windows 10 for IoT”