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.
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.