SENA HD1300 User Manual

Page 33

Advertising
background image

Starter Kit and User Manual for the HelloDevice 1300

33

6.1.2 RS485 communication

Only 2 pins of RS485+ and RS485- are used in RS485 communication of the HelloDevice. You have to make

RS485 communication cable by using the connection shown in Figure 6.4.

RS485+

RS485-



RTS

CTS

RS485+

RS485-

HelloDevice

User device

1=RS485+

4=RS485

HelloDevice serial port

Figure 6.4 RS485 communication cable connection diagram

6.2 Sample programs

The Internet socket interface should be implemented either by socket application or by Java applet. The stream’s

target TCP port of the HelloDevice is 6001. Then, the HelloDevice will just pass the data to user device by serial

protocol.

6.2.1 Implementing Socket program

The following C program source code shows how to implement Internet socket interface program for the

HelloDevice communication. This sample code is implemented to send ASCII string data to the HelloDevice, by

using Berkeley socket C API functions. This source is a part of the entire source code “the HelloDevice

installation folder\Src\SerialDemo\C\serialdemo.c”.

Advertising