Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
if you are managing IP addresses yourself, e.g. a small local network in a factory, you can assign static IP addresses to each board, e.g.ya. i'm asking about the board with simple sensors interfaced to microcontroller.
can we set IP for that board. for remote access through pc.
// set up TCP/IP stack and open sockets to send and receive UDP datagrams
int openUDPsockets(void)
{
StringToIPAddress(eeprom.IPaddress,&AppConfig.MyIPAddr);
DisplayIPValueROM("My IP address ", AppConfig.MyIPAddr);
// for some reason we have to cast these parameters to (int)
GLCDprintf(3, "My IP: %d.%u.%u.%u", (int) AppConfig.MyIPAddr.v[0], (int) AppConfig.MyIPAddr.v[1], (int) AppConfig.MyIPAddr.v[2], (int) AppConfig.MyIPAddr.v[3]);
AppConfig.DefaultIPAddr.Val = AppConfig.MyIPAddr.Val;
ROMStringToIPAddress((ROM BYTE*) DEFAULT_IP_MASK, &AppConfig.MyMask);
Is your simple board support LAN?hello friends,
can we define IP address for simple microcontroller board.
ya i have an idea to use ethernet port through ENC28j60 ic.
#define MY_DEFAULT_IP_ADDR_BYTE1 (192ul)
#define MY_DEFAULT_IP_ADDR_BYTE2 (168ul)
#define MY_DEFAULT_IP_ADDR_BYTE3 (1ul)
#define MY_DEFAULT_IP_ADDR_BYTE4 (5ul)
// Initialize Stack and application related NV variables into AppConfig.
InitAppConfig();
// set our MAC address from the MCP79410 device
MCP79410readMACaddress((unsigned char *)&AppConfig.MyMACAddr);
DisplayMACaddress("My MAC address ",AppConfig.MyMACAddr);
// Initialize core stack layers (MAC, ARP, TCP, UDP) and application modules (HTTP, SNMP, etc.)
StackInit();
printf("Ethernet TCP/IP stack initialised\r\n");
// main program loop
mSecElapsed(1,1,0);
while(1)
{
static int connectToHost = 0;
StackTask(); // do TCPIP stack task
StackApplications(); // do core stack application tasks
// has local IP address changed (ex: due to DHCP lease change)
if(dwLastIP != AppConfig.MyIPAddr.Val) // new IP address assigned
{
dwLastIP = AppConfig.MyIPAddr.Val;
DisplayIPValue("\r\nNew IP Address: ", AppConfig.MyIPAddr);
DisplayIPValue("New gateway Address: ", AppConfig.MyGateway);
DisplayIPValue("New DNS Address: ", AppConfig.PrimaryDNSServer);
DisplayIPValue("Default IP mask ", AppConfig.MyMask);
}