Quantcast
Channel:
Viewing all articles
Browse latest Browse all 59170

Forum Post: RE: dual ethernet ports

$
0
0
Faith This is closer but still not what I am doing. I am trying to read and write to/from both ports. my loops are similar to yours. each loop reads forever from ETH0 and ETH1. if I have any bytes I handle in the corresponding thread and send a message to the same port. problem: when I connect to 100 and send bytes - all good. connect to 101 send bytes on 100 then bytes are SEEN on 101 and sent back on 101!! this is the problem.    while (1)    { ... ...        status = g_sf_comms_telnet0.p_api- read(g_sf_comms_telnet0.p_ctrl, &serial_in, 1, TX_NO_WAIT);     /* read and echo byte from telnet (ethernet) */        if(status == SSP_SUCCESS)        {            serial_in = serial_in & 0xFF; //                sprintf (str,"%d %d %d\r\n%s Cmd ",index,serial_in,sohSeen); //                writeToCom(str);                sprintf (str,"\r\nETH0\r\n");                writeToCom(str); ... ...        } ... ...     }

Viewing all articles
Browse latest Browse all 59170

Trending Articles