Ahmed Alfadhel
Published

Design and Implementation of Ethernet Network Sensor

The aim of this project is to explain how to build your own Ethernet network sensor.

BeginnerFull instructions provided2 days1,097
Design and Implementation of Ethernet Network Sensor

Things used in this project

Hardware components

PIC16F
Microchip PIC16F
×1
ENC28J60
×1
Transceiver, 74HCT245
Transceiver, 74HCT245
×1
Photo resistor
Photo resistor
×1

Software apps and online services

Protous ISIS 7
mikroC PRO for PIC
MikroE mikroC PRO for PIC
Wireshark Network Analyzer
Visual Studio 2015
Microsoft Visual Studio 2015

Hand tools and fabrication machines

Breadboard, Plastic
Breadboard, Plastic

Story

Read more

Code

Interface Application by C#

C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Net;
using System.Net.Sockets;
using System.Diagnostics;

namespace UDP_server
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Thread Mainthread = new Thread(new ThreadStart(serverThread));
Mainthread.Start();
}
public void serverThread()
{
UdpClient udp_client = new UdpClient(8080);
while(true)
{
IPEndPoint remoteIPep = new IPEndPoint(IPAddress.Any, 0);
byte[] receive_Bytes = udp_client.Receive(ref remoteIPep);
string return_data = Encoding.ASCII.GetString(receive_Bytes);
43
lb_connections.Items.Add(remoteIPep.Address.ToString() + " : " +
return_data.ToString());
}
}
private void button1_Click(object sender, EventArgs e)
{
Process.GetCurrentProcess().Kill();
}
}
}

Credits

Ahmed Alfadhel

Ahmed Alfadhel

2 projects • 12 followers
Interested in Embedded Systems, Controllers, FPGA
Thanks to Laith Hasan, Hind Adnan, and Islam Falah.

Comments