Communication

From OpenMBD
< HANtune
Revision as of 11:56, 17 March 2017 by Michiel (talk | contribs) (XCP on UART(USB))
Jump to: navigation, search


HANtune supports various ways of communicating. With regards to hardware support there are three options: Ethernet, USB and CAN. Ethernet and USB/UART can only be used in combination with the XCP (universal Calibration Protocol). The CAN-bus can be used either with or without XCP functionalities. This chapter provides more information about the (combination of) these options, as well as the general communication settings in HANtune.

Communication Settings

Image 11: Communication Settings Dialog shows a screenshot of the communication settings in HANtune. It can be found under the menu item “Communication” > “Communication Settings” and in the connection dialog by clicking the button “Settings”.

In the tab “General” the general communication settings have to be set. A choice has to be made for a communication protocol.

The timeout prescaler is used to define the communication time-out. If HANtune doesn’t receive any messages anymore, by default it cancels the connection after 2*t_prescaler. Please note that this is a temporary solution. It is planned that in a future version of HANtune the behavior of the timeout prescaler will be depending on the expected delay time of incoming messages. The other tabs contain hardware-specific settings for CAN, Ethernet and USB, respectively.

XCP on CAN

To use the CAN functionality of HANtune, a CAN-dongle is needed. HANtune contains drivers for the PCAN-USB dongle. More info about the USB to CAN dongle can be found on this website: www.peak-system.com/PCAN-USB.199.0.html

The XCP on CAN protocol uses two CAN-ID’s, one for sending XCP messages and one for receiving them. By default HANtune uses 665 for transmission and 666 for reception. Additionally the baud-rate needs to be set in order to be able to establish a connection with the target.

If there is a DBC file available in HANtune, the XCP on CAN option also provides the option to include generic CAN messages (not part of the XCP traffic).

CAUTION: PLEASE VERIFY THAT THE DBC FILE DOES NOT INTERFERE WITH THE RECEPTION AND TRANSMISSION ID’S OF THE XCP TRAFFIC.

Please note that these default settings match the default settings of the HANcoder blockset.

For help, please refer to chapter Troubleshooting.

XCP on Ethernet

To use XCP on Ethernet, a connection should be established between the PC and the target. While the options are not limited to a direct UTP connection between PC and target, this manual only covers the direct wired link.

Additional information about other connection options can be requested by sending an email to: hantune@han.nl.

HANcoder-built targets have a default IP address similar to the one in HANtune: 169.254.19.63. Please make sure that any wireless networks are set inactive when plugging in the Ethernet cable. The communication driver should be set to “XCP on Ethernet” in the tab “General”. Also the IP address should be set to the right address. Then a connection can be established.

Please note that these default settings match the default settings of the HANcoder blockset.

For help, please refer to chapter Troubleshooting.

XCP on UART(USB)

While HANtune is capable of communicating via any COM-Port, this scope of this chapter is limited to the use of a HANcoder-built target.

When using targets built with the HANcoder blockset, HANtune depends on a virtual COM port to be able to communicate to the target. It is being provided with the HANcoder blockset, which can be downloaded from: www.openmbd.com. While most PC’s don’t support a physical UART connection anymore, UART to USB converters are freely available. The Olimex boards supported by HANcoder even have the hardware on board, eliminating the use of converters.

When the virtual com port device driver has been installed, Windows automatically assigns a com port to the plugged-in device. To find the assigned COM-port, go to the windows Start menu, type “Device Manager” (Dutch: “Apparaatbeheer”), and press enter. The device manager pops up. Under “Ports (COM & LPT)” a device should be visible with the name “STMicroelectronics Virtual COM Port (COMx)”. Remember the assigned COM-Port.

Go to the “Communication Settings” dialog, select the “XCP on USB/UART” options in the tab “General”. Now go to the tab “USB/UART” and set the right COM-Port. HANtune is now set to connect to the target.

Please note that these default settings match the default settings of the HANcoder blockset.

CAN-only