Wireless Sensor Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

9792 WSN Gateway and NAT

Solved!
Go to solution

I have a 9792 WSN Gateway deployed in the field.  It is connected to the Internet via a NAT router.  I configured my router as described in NI's tutorial: http://zone.ni.com/devzone/cda/tut/p/id/12402.  Labview programming, HTTP and FTP, and most other things work fine, but MAX does not work.  My experience is the following.

 

I open up MAX, right-click on "Remote Systems" in the tree, pick "Create New..." then pick "Remote Device (not on the local subnet)."  I enter the router's WAN IP when prompted, click "Finish," then wait.  After what seems like an eternity (but is really only 3-4 minutes), the IP entry dialog box closes and an entry for the 9792 appears under "Remote Systems" on the left.  The entry has the correct name but the red 'X' indicates that it is disconnected.  When I click on the remote device in the tree, the system settings tab appeaars, but the IP that it displays is the 9792's LAN IP, not its WAN IP. "System State" is "Disconnected," and when I choose "Devices and Interfaces" from the tree, nothing appears to be connected, even though I know at least 3 wireless nodes should be connected (and report so in the web interface).

 

Am I doing something wrong?

0 Kudos
Message 1 of 6
(8,341 Views)

Hi edsel456,

 

Let's differentiate a couple of things to understand the situation better

 

1) The 9792 WSN Gateway has an IP.  This IP will be used by other computers, either connected to the network or internet, to access the gateway.  So, you could use your development computer to deploy programs to the RT portion of this controller

To access this gateway from inside the network, you would use the LAN IP

To access this gateway from outside the network, you would use the WAN IP.  The router would have the port forwarded.  We access the gateway by addressing it by it's WAN IP and a specific port -- the router will be configured in a way where, when it sees we're trying to access that port, to forward it to the gateway's LAN IP

 

2) The Wireless Sensor Nodes (WSN) communicate via the Zigbee protocol.  So, the WSN isn't trying to find your gateway by IP, but rather we go through a process of connecting them together through discovery.  Below is a good tutorial for setting up your WSN

http://zone.ni.com/devzone/cda/tut/p/id/8890

 

With all that being said, though, the behavior that you're experiencing is a known issue.  It seems to be an issue where MAX tries to communicate with the cRIO's IP address rather than your modem's IP address.  There are two fixes for this, in terms of configuration

1) Perform all configuration through LabVIEW with available VIs

2) Set the router to allow direct communication with the cRIO. (in some routers, DMZ mode)

 

 

Please let me know how this goes,

 

 

Regards,

Che T.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(8,331 Views)


1) The 9792 WSN Gateway has an IP.  This IP will be used by other computers, either connected to the network or internet, to access the gateway.  So, you could use your development computer to deploy programs to the RT portion of this controller

To access this gateway from inside the network, you would use the LAN IP

To access this gateway from outside the network, you would use the WAN IP.  The router would have the port forwarded.  We access the gateway by addressing it by it's WAN IP and a specific port -- the router will be configured in a way where, when it sees we're trying to access that port, to forward it to the gateway's LAN IP



Yep, we're on the same page here.

 



2) The Wireless Sensor Nodes (WSN) communicate via the Zigbee protocol.  So, the WSN isn't trying to find your gateway by IP, but rather we go through a process of connecting them together through discovery.  Below is a good tutorial for setting up your WSN

http://zone.ni.com/devzone/cda/tut/p/id/8890

 


Yep, on the same page here, too.  The WSN nodes are communicating happily with the base station.

 


With all that being said, though, the behavior that you're experiencing is a known issue.  It seems to be an issue where MAX tries to communicate with the cRIO's IP address rather than your modem's IP address.  There are two fixes for this, in terms of configuration

1) Perform all configuration through LabVIEW with available VIs

2) Set the router to allow direct communication with the cRIO. (in some routers, DMZ mode)


Aha!  I did not know that you could use VIs to configure the settings that you'd otherwise have to configure using MAX.  Unfortunately, #2 won't work because, for some reason, this modem doesn't seem to have a DMZ feature. Go figure.

 

Can you direct me to where I might find these pre-fab VIs for configuring node parameters?

 

Thanks,

-Mat

0 Kudos
Message 3 of 6
(8,326 Views)
Solution
Accepted by topic author edsel456

Hi Mat,

 

An example for configuring your target via software can be found here

https://decibel.ni.com/content/docs/DOC-12849

 

You'll be using the System Configuration APIs.  It can be accessed in the Functions Palette >> Measurement I/O >> Sysem Configuration >> RT Software

 

 

Regards,

 

Che T.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(8,312 Views)

Dear Che.T,

 

Apologies for opening up a closed forum post.

 

My name is Dom.C and I am an ex-AE. I understand this is not the correct procedure but as I am currently working on a problem that is similar to the one flagged up initially in this thread,I thought I should post my problem on here. 

 

I have a Wireless Sensor Network (WSN) system made up of a NI 9792 RT Gateway connected to a Sierra Wireless Raven XE HSPA World Edition (H2295E-W). The system architecture is shown in the attached word document.

 

We have a Web UI developed and this runs on the Application Server port 8080. It can be viewed and parameters changed when the Gateway is connected directly to a desktop PC via Eth0 (ethernet port 1). 

 

We would like to be able to access the Web UI application remotely, so that we can make changes to devices in the field from the office. 

 

I know that this process must be done through port forwarding, according to the NI KB: http://digital.ni.com/public.nsf/allkb/FE64994F19D12273862579AB008001D1

 

I also know that port forwarding is possible with the Sierra Wireless Raven XE modem that we have in the system. 

 

We currently have a Three UK 3G Fixed Public IP SIM card installed in the modem so that the IP address can be found via the internet and requests made. 

 

The Sierra Wireless allows Port Forwarding rules to be set up so that requests for particular public ports made to the modem can be passed on. However, I know believe that simple port forwarding in the modem will not allow the requests to be passed towards the Application Server on the Gateway (refer back to system architecture). 

 

I believe that Double Port Forwarding is required where we have the following situation:

 

- Remote PC makes request over internet by typing in the IP address of the 3G Fixed Public IP SIM [This can be considered the external IP of the MODEM]

- This then passes the request directly to modem's device IP - 192.168.13.31 [This can be considered the internal IP of the MODEM]

 

Port Forwarding Rules are then enforced and any requests made on public ports should be routed to the appropriate Host IPs & their associated private ports. These then arrive via direct ethernet connection to Eth1 (Port 2) on the Gateway, which has IP address of 192.168.13.100.

 

Now. The issue is this. The Web UI application, which is hosted on the Application Server, accessible on port 8080, has the IP address of 192.168.0.101 and is in Eth0 (Port 1) on the Gateway. This presents two problems:

1. We have a different subnet for each ethernet port on the gateway

2. How do we pass on the request from Eth1 (which is directly connected to the modem) to Eth0 which isn't and has a different subnet/IP address?

 

This is why I believe double port forwarding (see URL below) is required but I am unsure how the two ethernet ports communicate on the gateway. I am aware that I may be required to make the connected port (Eth1) as a DMZ IP, so that any unsolicited requests made to 192.168.13.100 are passed on, but this still does not get around how to communicate between the two ethernet ports. 

 

http://portforward.com/help/doublerouterportforwarding.htm

 

The other option is to somehow make the Gateway a WAP or ethernet switch so that the request can be passed through directly. Is it correct to assume that the Gateway is acting as a second router to the modem and therefore we have two routers connected, causing a block to any port forwarding process. 

 

Any clarification on how the two ethernet ports on the NI 9792 are linked and how they communicate would be greatly appreciated.

 

Should you required any further information, please contact me.

 

Many thanks,

 

Dom.C

 

 

 

 

 

0 Kudos
Message 5 of 6
(6,631 Views)

Hey Dom.C,

 

You are probably aware that our system archives Forum Posts after a certain period of time.  Because this post was from 2011, I would recommend that you create a new Forum Post with your question, which will increase visibility of your questions to the community as well as allow us to document an active request. Feel free to reference this archived thread in the new post. Sorry for any inconvenience!

 

Regards,

Nadine H.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(6,611 Views)