开发者

Serial Port Data Structure

I need to send data to a hardware device over serial port. I'm using a program called serial port tool for 开发者_运维技巧os x.

After I connect to the device there is a form box where I can type data to send. I have no idea how to format the data.

Here is an excerpt from the manual for the device.

"The Net Manager Command structure consists of one start byte, one command byte, five bytes of data, and a one byte checksum. Each message packet is formatted as follows:"

an example command is: Byte0=30 Byte1=7 Byte2=5 Byte3=1 Byte4=2 Byte5=0 Byte6=245

How do I type that into the form box in serial port tool?

Thanks, Seth


Does the "serial port tool" you're using come with any documentation?

Assuming the "form box" is expecting printable characters, what you're looking for is a way to input an arbitrary byte value. For example, there might be a mechanism that lets you use an octal or hexadecimal escape sequence (such as \036 or \24).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜