Quickly Go Through the Content Here:

Ⅰ. CANbus Reader

Ⅱ. Create the Virtual Controller

Ⅲ. Data from CANbus Reader Be Written into Virtual Controller via Southbound Message Bus.

Ⅳ. Connecting to AWS via Device Supervisor

Ⅴ. Publish to The AWS

 

CAN Data to AWS Diagram
CAN Data to AWS Diagram
"The data flow is as follows: The Python app receives the CAN (Controller Area Network) data and publishes it to the internal MQTT broker, which then writes the data to the virtual controller. Next, login to the Web management of EC312, configure the virtual controller and the cloud under Device Supervisor(DSA) , to publish the data to AWS. “

Ⅰ. CANbus Reader

Step One

Using SSH ( Secure Shell ) to accessing the device Connect PC to EC312 Ethernet port 2(ETH2) and accessing devices through SSH using terminal tools.
ssh edge@192.168.4.100

password: security@edge

CANbus Reader-Step One

Step Two

Switch to root user

sudo -s
password: security@edge

CANbus Reader-Step Two

Step Three

Confirm that the device can effectively access the external network ping 8.8.8.8 -c 4

CANbus Reader-Step Three

Step Four

Update APT (Advanced Package Tool) source

apt-get update

CANbus Reader-Step Four

Step Five

Install pip tools

apt-get install -y python3-pip

CANbus Reader-Step Five

Step Six

Install python-can
pip3 install python-can
apt install python3-can

CANbus Reader-Step Six

Step Seven

 Writing test scripts

Step Seven-1
Step Seven-2
CANbus Reader-Step Seven

Step Eight

CAN2 Connect to the device for testing


Step Nine

Running Python script

python3 ./can-ec312.py

Ⅱ. Create the Virtual Controller

Step One

Login to the Web management of EC312 and create a virtual controller under the Device
Supervisor plugin, you can hit the link below tot know more details about it.
https://help.inhand.com/portal/en/kb/articles/dsa

Create the Virtual Controller-Step One

Add a 'pressure' for an example.x

Create the Virtual Controller-Step One-Example
Create the Virtual Controller-Step One Example-1

Step Two

Check its service ID to determine where we will write the data.

Create the Virtual Controller-StepTwo

Ⅲ. Data from CANbus Reader be written into Virtual Controller via Southbound message bus.

Step One

Modify the python scripts. Connecting to the internal MQTT ( Message Queuing Telemetry Transport ) broker and writing data into the virtual controller.
hit the link below to know more about the internal mqtt message bus of Device supervisor.
https://help.inhand.com/portal/en/kb/articles/dsa#21_Connect_to_the_internal_MQTT_Broker

Data from CANbus Reader be written into Virtual Controller via Southbound message bus-1

Data from CANbus Reader be written into Virtual Controller via Southbound message bus-3

Step Two

check if the virtual controller updates the value from internal mqtt message bus.

Data from CANbus Reader be written into Virtual Controller via Southbound message bus-4

Ⅳ. Connecting to AWS via Device Supervisor

1. AWS IoT configuration reference:
https://help.inhand.com/portal/en/kb/articles/dsa#AWS_IoT_Instructions

Connecting to AWS via Device Supervisor-1

endpoint:

Connecting to AWS via Device Supervisor-2

Ⅴ. Publish to the AWS

1. Publish the Topic on EC312:

Publish to the AWS-1

2. Subscribe to the Topic on AWS:

Publish to the AWS-2

 

Publish to the AWS-3

Contact Methods

Phone: +1 (703) 348-2988 (US) 010-84170010 (CN)

Email: support@inhandgo.com

Website: https://inhandgo.com/

Leave a comment