Search code examples
c#network-programmingserial-portwifirouter

How to receive data over wifi router in C#


Hi I'm doing a research on wireless networks. I'm not good at C#. Normally, I use serial I/O to send data from Jennic JN5139's UART to PC via USB. I want to connect JN5139's UART output to a wireless router via a USB to Ethernet adaptor.

How can I read data which is sent to the router, and then send the data from the router to a computer over Wi-Fi? I don't even know where to start looking for a solution to this problem. Could anyone offer me a way to do this?


Solution

  • Assuming you have no control over the router, you can intercept the traffic outbound from the computer to the router via your Ethernet device. You can then capture the wireless traffic inbound to the computer from the wireless router using WireShark and a supported wireless NIC. Take a look here in the Wireshark Wiki for more detailed information on capture WLAN traffic and the caveats involved.

    If you want to capture traffic programmatically with C# there are a number of frameworks available to you to use. Consider SharpPCap.