02-03-2014 01:35 PM
I'm using UDP to send a message to a computer and I'm having trouble with my packaging. The code will listen and recieve messages fine, but I need to send specific hex codes and that is where the problem arises. I prompt the user for a command and if the command is on the .csv command list, the program sends the HEX code to the computer. My problem is the hex code is being changed into hex code again.
Example:
CB00 0000 0000 0000 0000 0000 0000 0000 3A63 6F6C 6C69 7369 6F6E 2061 6374 696F....
4342 3030 2030 3030 3020 3030 3030 2030 3030 3020 3030 3030 2030 3030 3020 3030 3030 ....
I want it where it will read the .csv file, match the command, and the send the Hex code in the corresponding row. I attached the command list and the UDP. The section I need help in is located to the far left of the screen
Thanks for the help
02-04-2014 08:47 AM
Right now, you are writing a string to the UDP output so the string is automatically converted to its ascii values. To get around this, you should first convert the string to an array of integers then write those integers to the UDP output.