Prohelion Virtual CAN Bus Adapter
The Prohelion Virtual CAN Bus Adapter is added to a Profile as the Prohelion Virtual CAN to Ethernet Bridge component. It is in the Adapters group. It relays Controller Area Network (CAN) traffic between the other CAN adapters in the Profile and any client that connects to it. To those clients, it looks like a Tritium or Prohelion CAN to Ethernet bridge. Use it to run tools that were developed for the Tritium and Prohelion bridges, such as the bridge configuration and firmware tools, when no physical bridge is present.
In the Virtual Adapter topology, a client connects to the Virtual Adapter, which works together with a Peak USB adapter to reach the physical CAN network. Traffic is routed in both directions.
A different CAN adapter, such as a SocketCAN or Peak USB adapter, connects Profinity to the CAN network. The Virtual Adapter has no setting that selects its partner adapter. It forwards traffic between itself and every other active CAN adapter in the Profile. Add the Peak or SocketCAN adapter to the same Profile first.
The adapter publishes eight tags under its component path: Properties/IsDesiredConnected, Properties/Settings/Name, Properties/State/Controller/CurrentStateName, Properties/Status, Properties/StatusColourText, Properties/StatusMessage, Properties/TotalMessagesReceived and Properties/TotalMessagesSent.
Quick start
You need a Peak or SocketCAN adapter in the same profile, added first, so the bridge has a CAN network to relay.
- Select ADD COMPONENT, then select Prohelion Virtual CAN to Ethernet Bridge in the Adapters group.
- Check that Network adapter shows the interface that your clients can reach. Profinity selects the first available multicast interface by default.
- Check that Bus number is not used by another bridge in the profile. The default is 13.
- Select ADD COMPONENT at the bottom of the dialog. Auto connect is on by default, so the adapter starts when the profile loads.
- Check that the adapter's status reads Connected while CAN traffic flows, or No CAN traffic if no CAN packet has arrived for 5 seconds.
Virtual adapter settings
To relay traffic, add a Virtual Adapter to the Profile after the adapter for the physical CAN network, and set the parameters in the following table.
| Parameter | Type | Description | Default |
|---|---|---|---|
| Network protocol | Choice | TCP or UDP. UDP is always available, even when TCP is running. |
TCP |
| Bridge protocol version | Choice | V1 or V2 matches the bridge firmware release, as described in Virtual CAN adapter protocol and client support. All speaks both protocols. |
All |
| Network adapter | Choice | The network interface on which the Virtual Bridge runs. | The first available multicast interface |
| Bus number | Whole number | The bus number of the bridge. Profinity limits it to 0 to 13 for V1 or All, because the version 1 protocol allows only a 4-bit bus number. For V2 it accepts 0 to 32767. |
13 |
| UDP TTL | Whole number | The time to live of the UDP packets that Profinity transmits, from 1 to 1024. | 128 |
| Auto connect | On or off | Enables the adapter when the profile loads. Refer to Connections and reconnecting. | On |
The Virtual CAN Bridge runs inside Profinity, so the operating system of that machine sets its IP address. The bridge configuration tools and Profinity cannot change the address remotely. Profinity can only select the network interface.
Two bridges with the same bus number relay data between each other
Two bridges with the same bus number on one network relay data from one bridge to the other. This joins two separate CAN bus networks into one virtual bus over Ethernet. Two bridges on the same CAN bus that are also on the same Ethernet network form a cyclic network. Give each bridge a unique bus number unless you are joining two buses deliberately. Refer to Network Topologies and the bus number guidance for the physical bridge.
Example
This example is a Virtual CAN Bridge for a Profile that already has an adapter for the physical CAN network.
In the product, add it with ADD COMPONENT by choosing Prohelion Virtual CAN to Ethernet Bridge, as described in How to add a component to your profile. To add it in the file instead, follow the next step.
Add this list item under the existing components: key in the profile.yaml file of the Profile, in the folder named after the Profile inside the profiles folder of the artefacts directory, with the same indentation as the other items.
- component:
type: ProhelionVirtualAdapter
name: Prohelion Virtual CAN to Ethernet Bridge
protocol: TCP
tritiumProtocolVersion: All
networkInterface: YOUR_NETWORK_INTERFACE
busNo: 5
udpTTL: 128
autoConnect: true
Replace YOUR_NETWORK_INTERFACE with the name of the network interface that the clients can reach, as listed in the Network adapter setting.
The bus number 5 is an example, so choose a number that no other bridge on the network uses. When the adapter runs, its status reads Connected, or No CAN traffic if no CAN packet has arrived for 5 seconds.
If a client cannot connect, check these things:
| What you see | Cause | What to do |
|---|---|---|
| A client cannot connect to the Virtual Adapter | The Network adapter is not the interface that the client can reach. | Check that the Network adapter is the interface that the client can reach. |
| A client cannot connect to the Virtual Adapter | The client speaks a protocol version that the Bridge protocol version does not cover. | Check that the client's protocol version is covered by the Bridge protocol version. |
| The status reads No CAN traffic | The usual cause is that no CAN traffic is coming from the bridged adapter. | Check the adapter that is bridged onto this bus. |
For how the Virtual Bridge speaks both the V1 and V2 bridge protocols and serves several clients at once, refer to Virtual CAN adapter protocol and client support.
For the physical adapters that the Virtual Adapter relays to, refer to CAN bus adapters. For the bridge that the Virtual Adapter imitates, refer to the CAN to Ethernet bridge documentation.
