Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC18f97j60 - Ethernet MCU TCPClient

Status
Not open for further replies.

PIC_C

New Member
Hi,

I've already spent over 5 hours trying to modify the sample that comes along with Microchip's free TCP/IP Stack. The sample itself works perfectly fine. What i am trying to do is to modify the GenericTCPClient.c file which by default uses a hard coded url and remote server to connect. I would like to pass the parameters as argument to the function which would contain the url and the host name and the port. When i do that, the port number is correct which is of type WORD but the rest are BYTE[] as the sample had hardcoded static BYTE[] containing the server name and url. The code compile fines but when i run it, the arrays contain garbage data and nothing useful. Bare in mind i'm not using pointers. All i am doing is passing the string from the main function and the TCPClient function has the argument of type BYTE[].

I've also tried passing the const rom char* but then i can't assign the string to the BYTE[]. Please tell me how to work around this problem as it is proving to be a right pain for me.

Thanks in anticipation.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top