Keil Logo Arm Logo

Serial to Ethernet conveter

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Ashok alal
Posted
18-Oct-2013 09:40 GMT
Toolset
ARM
New! Serial to Ethernet conveter

Here my application is whatever data Received through serial(UART1) and Transmit via Ethernet

For this application we used LPC1768 micro controller and taken reference software code is EasyWeb.uvproj.

EasyWeb source code modified local port as TELNET, even though data transmit via Ethernet is very slow and every one second one data can able to transmit.

We need as soon as received data from serial, it should transmit very fast via Ethernet.

For this communication am using Hyper Terminal Windows

Please any one help me how to over come this problem.

Regards,
Ashok

Read-Only
Author
Andrew Neil
Posted
18-Oct-2013 18:31 GMT
Toolset
None
New! RE: taken reference software code is EasyWeb.uvproj.

Did you spend any time considering/investigating whether that was a suitable basis for your project? Did you consider any alternatives?

What investigation have you done to determine where the bottleneck/delay lies?

Read-Only
Author
ASHOK ALAL
Posted
30-Oct-2013 04:20 GMT
Toolset
ARM
New! RE: taken reference software code is EasyWeb.uvproj.

Thanks for replay. I hope its suitable for my project, but am not able to find where delay will generate for every transmission data through Ethernet.

Please suggest me referring code is whether suitable or not.

Read-Only
Author
Andrew Neil
Posted
30-Oct-2013 07:41 GMT
Toolset
None
New! RE: I hope its suitable for my project

But what have you done to ensure that it's suitable.

It's your project - so this is stuff that you need to do.

Read-Only
Author
Ashok alal
Posted
6-Nov-2013 05:49 GMT
Toolset
ARM
New! RE: Continous data transfer via ethernet

I am using easy Web example program on mcb1700 evaluation board. I want to modified it for continuous data transfer. this program transfer one frame and tcp socket is getting close.
can anybody suggest me how to transfer continuous data without closing tcp scoket.

Read-Only
Author
Andrew Neil
Posted
6-Nov-2013 18:53 GMT
Toolset
None
New! RE: I am using easy Web example program

So you keep saying.

But you still don't seem to have given any thought to whether that is good basis for your project.

Read-Only
Author
Ashok alal
Posted
7-Nov-2013 11:42 GMT
Toolset
ARM
New! RE: I am using easy Web example program

No, am not implement any different TCP/IP stack. I following same function DoNetworkStuff();

I made zero of RETRY_TIMEOUT, FIN_TIMEOUT & MAX_RETRYS in tcp.h file.

Socket library also same as DoNetworkStuff();

When i receive complete word like "hello" through serial, its able to transmit only one character 'h' only via ethernet. we want to achieve complete string transmit via ethernet

please guide me which statement need to change in my code as per my application.

int main(void)
{

//InitOsc();              // Keil: No oscillator initialization necessary at this time.
//InitPorts();                       // Keil: No port initialization necessary at this time.

  SysTick_Config(SystemCoreClock/100);               /* Generate interrupt every 10 ms */
  LPC_GPIO1->FIODIR   |= 1 << 28;                    /* P1.28 defined as Output (LED) */
  LPC_PINCON->PINSEL1 |=  (1<<18);                   /* P0.25 is AD0.2 */
  LPC_SC->PCONP       |=  (1<<12);                   /* Enable power to ADC block */
  LPC_ADC->ADCR        =  (1<< 2) |                  /* select AD0.2 pin */
                          (4<< 8) |                  /* ADC clock is 25MHz/5 */
                          (1<<21);                   /* enable ADC */
  SER_Init();
  TCPLowLevelInit();
  TELNETStatus = 0;
  TCPLocalPort = 23;//TCP_TELENET
  ui_uartcirbufend = 0;
  ui_uartcirbufstart = 0;
while (1)                                      // repeat forever
  {

    if (!( SocketStatus & SOCK_ACTIVE ))
            TCPPassiveOpen();
    if (( SocketStatus & SOCK_ACTIVE ))
          DoNetworkStuff();
    if((LPC_UART1->LSR & 0x01))
    {
      uc_uartrxbuffer[ 0 ] = LPC_UART1->RBR;
      uc_uartrxbuffer[ 1 ] = '\0';
      Telnet_data_tx();
    }
  }
}

void Telnet_data_tx( void )
{

 if (SocketStatus & SOCK_CONNECTED)             // check if somebody has connected to our TCP
 {
      if (SocketStatus & SOCK_DATA_AVAILABLE)      // check if remote TCP sent data
           TCPReleaseRxBuffer();                      // and throw it away
    if (SocketStatus & SOCK_TX_BUF_RELEASED)     // check if buffer is free for TX
    {
        TCPTxDataCount = 2;//MAX_TCP_TX_DATA_SIZE;   // bytes to xfer
        memcpy(TCP_TX_BUF, uc_uartrxbuffer, TCPTxDataCount);
        TCPTransmitTxBuffer();

     }
  }
}

Note: ALL API are same as in DoNetworkStuff();
Read-Only
Author
Per Westermark
Posted
7-Nov-2013 15:59 GMT
Toolset
ARM
New! RE: I am using easy Web example program

But you don't seem to care about buffering any untransmitted characters until the TCP part of the code is able to send out more data. And you also hardcode your transfer size. If there are 5 untransmitted characters - why would it then be a good idea to only send one character?

Read-Only
Author
ashok alal
Posted
8-Nov-2013 02:50 GMT
Toolset
ARM
New! RE: I am using easy Web example program

Any modification required in DoNetworkStuff() function for continuous transmitting data via Ethernet without any delay adding( for instant data appear )

Read-Only
Author
Ashok alal
Posted
13-Nov-2013 05:15 GMT
Toolset
ARM
New! RE: Take a look at this

Yes, similar application only, but i need help for implements on LPC1768.

Is it required to add RTOS.

Read-Only
Author
Andrew Neil
Posted
13-Nov-2013 18:40 GMT
Toolset
ARM
New! RE: i need help for implements on LPC1768

What help, exactly? None of it is specific to any particular processor.

"Is it required to add RTOS"

Did you study the App Note?

Did you spend any time with google?

Read-Only
Author
Ashok alal
Posted
31-Dec-2013 05:56 GMT
Toolset
ARM
New! RE: i need help for implements on LPC1768

How to read / know the MAC ID for individual chip of LPC1768

Read-Only
Author
Ashok alal
Posted
2-Jan-2014 07:02 GMT
Toolset
ARM
New! RE: i need help for implements on LPC1768

How to store variable in flash memory by using lpc1768.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings