Author Topic: TCP to serial port  (Read 7865 times)

Offline beethoven62

  • Newbie
  • *
  • Posts: 11
    • View Profile
TCP to serial port
« on: December 02, 2008, 11:27:10 PM »
Hi Mark,

I'm trying to set up a tcp socket to serial port link in my application. I'm using the AT91SAM7X-EK board connected to my PC via ethernet. Basically, I'm setting up a telnet connection to port 1000 in my case and connecting it to USART 0 on the board. I would like a two-way connection. I'm at the point where I can send from the tcp port to the serial connection with no problem. When I try the reverse, I run into trouble. I can send a few characters back, but it seems to cut me off after only a few characters. It's as though I've filled a buffer and not emptying it. Excuse my ignorance of TCP/IP protocol.

I was also wondering if you have a comprehensive function index as a document somewhere. I see you have a link for a function index on your site, but it is mostly empty. The documentation you have is great for background information and getting started, but there doesn't seem to be any reference documentation.

Thanks,

Johnas

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: TCP to serial port
« Reply #1 on: December 03, 2008, 01:46:20 AM »
Hi Johnas

I don't know why you are having problems sending from UART->TCP. There should (generally) be no buffers involved and probably none that could block. How are you configuring the socket and how are you sending from the UART input to the TCP connection?

Concerning the function index, the main reference is the one on the web which still has not a great deal of content (if it is found there is should however be quite complete).
The header files give an overview of prototypes and you can probably find an example use of most in the demo project. Then try a search on the forum because some have been discussed in the past here.

If this still doesn't help, please ask about the one which is interesting you at the time and I will add this explanation as soon as possible, with a note when it is ready in the answer.

Regards

Mark