Sending hex values to socket.
Posted: Sat Feb 08, 2014 6:32 pm
Hello everyone,
I'm trying to send hex values to a socket. I am working on an app that will control wireless RGB lightbulbs. They come with a wifi bridge that takes commands on a UDP socket.
There are more details of the API on the LimitlessLED Dev website, but I'm not allowed to post links.
All commands are three bytes. For example I need to send a TCP/IP UDP packet of: 0x42 0x00 0x55 to turn all the lights on.
I know i need to open a socket connection or do a write to socket, but how do I get Livecode to send a hex value like 0x42? Does it involve numtobyte? If someone can point me in the right direction for getting live code to send those commands, I would appreciate it.
I'm trying to send hex values to a socket. I am working on an app that will control wireless RGB lightbulbs. They come with a wifi bridge that takes commands on a UDP socket.
There are more details of the API on the LimitlessLED Dev website, but I'm not allowed to post links.
All commands are three bytes. For example I need to send a TCP/IP UDP packet of: 0x42 0x00 0x55 to turn all the lights on.
I know i need to open a socket connection or do a write to socket, but how do I get Livecode to send a hex value like 0x42? Does it involve numtobyte? If someone can point me in the right direction for getting live code to send those commands, I would appreciate it.