PIC-WEB-BOX deployed as TCPIP <--> UART bridge

Started by ejphendriks@outlook.com, August 28, 2014, 12:22:11 PM

Previous topic - Next topic

ejphendriks@outlook.com

I managed to get the Demo projects up and running.

As a next step I want to create a "TCP <--> UART" bridge that does not use the HTTP / Web server.
I want to strip the project down to just a basic transparent "TCP <--> UART" bridge?

Is there someone that has already done something like that?

What I want to create as a starting point:
- PIC-WEB-BOX acts as a TCP Server and listens for incoming connection.
- It should accepts only one incoming TCP/IP connection.
- When a connection is established it should act as a transparent bridge between TCP and UART.

What would be the best starting point for such a project ?

ALFREDOSKY

Hi Erwin, that board came with microchip libraries? (well, i think the answer is a rotund YES, but i ask just in case), you must congigure TCPIPConfig.h file for achieve your app.  8)

ejphendriks@outlook.com

Thnx Alfredosky,

I just figured that out by myself ;)

I disabled every service using the TCPConfig utility and compiled the project again. Got 1 error:

Error - could not find definition of symbol 'You_cannot_call_the_SPIFlashInit_function_without_defining_SPIFLASH_CS_TRIS_in_HardwareProfile_h_first' in file 'Object\MPFS2.o'.
Errors    : 1

Will try again without the SPI...


ejphendriks@outlook.com

I have a few questions about the TCP Config utility

On the first tab it offers the option Serial to Ethernet bridge (not TCP but Ethernet ???)



And on the following tab is speaks about UART_2_TCP_BRIDGE



Are these actually the same service?

And how can I specify a port number for the UART_2_TCP_BRIDGE?

I assume this UART_2_TCP_BRIDGE is bi-directional once a socket is open... Correct?

What do I need to select in the TCP Config tool to create a TCP Server (with a listen port) <--> UART ?

Any guidance would be very much appreciated because I can't find much about this in the documenation...

Thanks in advance

ejphendriks@outlook.com

And finally I figured out that the TCP port number is 9761.

Now I can connect to the PIC-WEB-BOX from putty and that allows communication from the TCP side to UART side. So not in both directions...

Shouldn't that be possible ?