Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

How do I connect Netduino+ to a pc wireless?


  • Please log in to reply
29 replies to this topic

#21 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 28 April 2014 - 11:58 PM

I don't think the Netduino Plus 2 USB port provides any power. If you have a 2 port battery (1A, 2.1A), why not just power both from the battery.



#22 cce1911

cce1911

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts
  • LocationGeorgia, USA

Posted 29 April 2014 - 02:03 AM

Baxter,

If I could use the USB port, it would make things easier. So I will now go down the path you suggest.

-Capel



#23 cce1911

cce1911

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts
  • LocationGeorgia, USA

Posted 03 May 2014 - 06:37 PM

I got the Edimax 6258n and installed but I'm having some issues.

 

Here is my configuration:

  • Belkin N300 Wireless Router
  • No WAN connectivity
  • DHCP turned off
  • Static IP of 192.168.1.1
  • Netduino +2
  • Setup with static IP of 192.168.1.100
  • Laptop PC
  • connected to Belkin N300 wifi
  • Static IP of 192.168.1.29

 

My PC application uses a socket connection to talk to the Netduino on port 9999 and 9998. This works fine in a hard wired environment.  In this environment, I can ping the IP addresses of all the devices, but when I go to establish a socket connection I get an error saying "No connection can be made because the target machine actively refused it."

 

I tried configuring the Port Forwarding feature of the Edimax, but that did not seem to work either.

 

Does anyone have an idea on how to get the Edimax to allow tcp/ip traffic on designated ports?



#24 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 04 May 2014 - 07:06 PM

Do you actually have a wireless network in place? Talking over ethernet is not the same as talking over wireless. Setup the wireless network on the router (e.g. SSID, WPA2(AES) key). Next, on your laptop and the Edimax join this network. The Edimax and laptop must have the SSID and WPA2(AES) key of your wireless network. Read my post #5 in this thread for the Edimax. The Edimax is simply translating your Netduino IP address to its address on the network and passing the traffic through. You should not do any port forwarding on the Edimax. Port forwarding is the task of the router
 



#25 cce1911

cce1911

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts
  • LocationGeorgia, USA

Posted 05 May 2014 - 01:23 AM

I got everything working. I just needed to boot the Edimax and wait 60 seconds before powering up the N+2. When powering them up at the same time, the N+2 did not see the Edimax, but if I waited a minute, everything worked as advertised.

 

Baxter, yes I have it setup the way you described and port forwarding was not my issue. 



#26 rickggaribay

rickggaribay

    New Member

  • Members
  • Pip
  • 4 posts

Posted 28 June 2014 - 10:55 PM

You configure the adapter according to the pdf instructions. I use a fixed IP address for the adapter outside of the router DHCP address range and also give my Netduino a fixed IP address. For example,

 

Router LAN address: 192.168.0.1 Router DHCP range: 192.168.0.100-254 Ethernet adapter address: 192.168.0.3 <-- fixed IP address Netduino address: 192.168.0.50 <-- Fixed IP address

 

(1) Setup the adapter (IP address, SSID, Wpa key) (2) let the adapter connect to the network (check by pinging it) (3) Once the adapter has established itself on the LAN, plug in the Netduino to the adapter and wait a bit. (4) Ping the Netduino IP address and it should respond if all went well.

 

If steps 1-4 completed successfully, execute arp -a and in the arp table you should see the Netduino IP address and the adapter address, but the Netduino will now be associated with the adapter MAC address. You will need to take this into consideration if you are using if you are using the actual Netduino MAC for some reason, but otherwise it is the same as if you had just connected the Netduino to the router through an ethernet connection.

Baxter, thanks for the post.

 

I am using the Vonets WIFI Bridge which is similar to the device you specified (http://www.amazon.co...t/dp/B005OIB6XI) but am having issues with the Netduino networking.

 

I followed your instructions giving the netduino and the adapter their own address but when I ping the netduino I get destination host unreachable (pinging the adapter works fine). Any insights or something I could be missing?

 

Also, I may be misunderstanding the way the bridge works, but before finding your post I initially assumed that the Netduino IP and the adapter IP (fixed or otherwise) would be the same. Why does this not work?

 

Also, any insights as to why DHCP wouldn't work in this scenario either would be appreciated- I had assumed that once the adapter had an IP and verified it was working, plugging it in would be just like a regular ethernet cable or wifi connection and my router would happily assign an IP but alas this does not seem to be the case.

 

Thanks in advance for any input or guidance you can provide. 



#27 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 30 June 2014 - 05:44 AM

rickggaribay, sorry for the problems. Networking can be frustrating at times. I googled for the Vonets and it seems that there are problems in setting it up. The fact that it needs software for setup and is using WinPCap means that this is totally different from the Edimax approach which requires no installation software.

 

I just hooked up an Edimax that is established on my network with an IP address of 192.168.0.4 to a Netduino Plus 2 that is not running any network related code. I then went to MFdeploy and set the Plus 2 network parameters:
Static IP address: 192.168.0.50
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.0.1
MAC Address: 5c-86-4a-00-50-0f
DNS Primary Address: 8.8.8.8
DNS Primary Address: 8.8.4.4
DHCP: unchecked

The router has a DHCP range of 100-200. I then opened a command prompt and pinged 192.168.0.50 followed by arp -a with the result:

Pinging 192.168.0.50 with 32 bytes of data:
Reply from 192.168.0.50: bytes=32 time=45ms TTL=255
Reply from 192.168.0.50: bytes=32 time=2ms TTL=255
Reply from 192.168.0.50: bytes=32 time=2ms TTL=255
Reply from 192.168.0.50: bytes=32 time=2ms TTL=255

Ping statistics for 192.168.0.50:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Approximate round trip times in milli-seconds:
    Minimum = 2ms, Maximum = 45ms, Average = 12ms

C:\Users\beb\Desktop>arp -a

Interface: 192.168.0.175 --- 0xb <--- desktop PC hardwired ethernet
  Internet Address      Physical Address      Type
  192.168.0.1           98-fc-11-6e-6a-40     dynamic
  192.168.0.4           80-1f-02-19-25-98     dynamic <--- Edimax
  192.168.0.50          80-1f-02-19-25-98     dynamic <--- Netduino Plus 2
  192.168.0.104         98-4b-e1-55-78-d6     dynamic
  192.168.0.113         80-1f-02-9d-b4-ec     dynamic
  192.168.0.117         f4-ce-46-4d-22-bc     dynamic

Notice the physical (MAC) address of the Netduino; it has now taken the MAC of the Edimax. I have no idea how this happens. But I think that the effect is that when you address the Netduino by its IP, it is actually being resolved to the Edimax which passes the traffic through to the Netduino. Although not certain, I believe that all of these ethernet to wireless adapters work the same way. I would suggest that you re-setup your Netduino network parameters with MFdeploy and make certain you are on the same subnet of your network. When I was searching for Vonets, I did notice that the latest software was important to get the adapter working.



#28 rickggaribay

rickggaribay

    New Member

  • Members
  • Pip
  • 4 posts

Posted 17 July 2014 - 01:17 AM

rickggaribay, sorry for the problems. Networking can be frustrating at times. I googled for the Vonets and it seems that there are problems in setting it up. The fact that it needs software for setup and is using WinPCap means that this is totally different from the Edimax approach which requires no installation software.

 

I just hooked up an Edimax that is established on my network with an IP address of 192.168.0.4 to a Netduino Plus 2 that is not running any network related code. I then went to MFdeploy and set the Plus 2 network parameters:
Static IP address: 192.168.0.50
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.0.1
MAC Address: 5c-86-4a-00-50-0f
DNS Primary Address: 8.8.8.8
DNS Primary Address: 8.8.4.4
DHCP: unchecked

The router has a DHCP range of 100-200. I then opened a command prompt and pinged 192.168.0.50 followed by arp -a with the result:

Pinging 192.168.0.50 with 32 bytes of data:
Reply from 192.168.0.50: bytes=32 time=45ms TTL=255
Reply from 192.168.0.50: bytes=32 time=2ms TTL=255
Reply from 192.168.0.50: bytes=32 time=2ms TTL=255
Reply from 192.168.0.50: bytes=32 time=2ms TTL=255

Ping statistics for 192.168.0.50:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Approximate round trip times in milli-seconds:
    Minimum = 2ms, Maximum = 45ms, Average = 12ms

C:\Users\beb\Desktop>arp -a

Interface: 192.168.0.175 --- 0xb <--- desktop PC hardwired ethernet
  Internet Address      Physical Address      Type
  192.168.0.1           98-fc-11-6e-6a-40     dynamic
  192.168.0.4           80-1f-02-19-25-98     dynamic <--- Edimax
  192.168.0.50          80-1f-02-19-25-98     dynamic <--- Netduino Plus 2
  192.168.0.104         98-4b-e1-55-78-d6     dynamic
  192.168.0.113         80-1f-02-9d-b4-ec     dynamic
  192.168.0.117         f4-ce-46-4d-22-bc     dynamic

Notice the physical (MAC) address of the Netduino; it has now taken the MAC of the Edimax. I have no idea how this happens. But I think that the effect is that when you address the Netduino by its IP, it is actually being resolved to the Edimax which passes the traffic through to the Netduino. Although not certain, I believe that all of these ethernet to wireless adapters work the same way. I would suggest that you re-setup your Netduino network parameters with MFdeploy and make certain you are on the same subnet of your network. When I was searching for Vonets, I did notice that the latest software was important to get the adapter working.

 

Thanks Baxter. A friend tried reproing this with a Netduino Plus 2 and the same Vonets router to the same result. He was, however able to get this to work with the original Netduino so wondering if this is a bug in the Plus 2.

 

At any rate, ehe Edimax unit I ordered based on your input just arrived and I plan to work on this tonight. Will report back with my findings- thank you!



#29 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 17 July 2014 - 05:34 PM

I really think the key to getting these pocket routers to work is to assign fixed, but different IP addresses (outside of the main router DHCP range) and disable DHCP on both. The other important ingredient is to let the Edimax establish itself on the network before connecting the Netduino. Ping it and make certain it is in the ARP table. I also find that it works equally well with a network configured Plus 1 or Plus 2.



#30 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 20 July 2014 - 03:23 PM

Also: make sure that your Netduino Plus 2 has an IP address (if you're using DHCP) before sending/receiving data. The gen2 boards are faster than gen1 boards and code which used to work consistently might execute too "early" now. In any case...it's always best practice to make sure you have a network connection before communicating.

Chris




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.