multiple AURIX-CAN access at a time from Tegra

Hello,

What I want to do is using 4 x AURIX-CAN at Tegra A or B at the same time.
If including Tegra socket CAN, 5 x CAN would be used simultaneously.

However, when I access two AURIX-CAN from Tegra A, the second access cannot make a session at all.

Session 1: CAN-1 and bus=a parameter

$ ./sample_canbus_logger --driver=can.aurix --params=ip=10.42.0.146,bus=a

Session 2: CAN-2 and bus=b parameter

$ ./sample_canbus_logger --driver=can.aurix --params=ip=10.42.0.146,bus=b

Any Idea about this?
IMO, as loggers may use same local port, EB discard second access.

In “src/sensors/canbus/logger/README.md”, following description says that UDP port could be defined!
Could you let me know how to test it?

The connection to AurixCAN happens using UDP sockets. Additional arguments for the remote (`aport`) and
local (`bport`) UDP port can be specified if AurixCAN is working in a non-default configuration. By
default, on DRIVE PX2, AurixCAN is reachable over `aport=50000` and communicates with the Tegra over
`bport=60395`. On ACR however, AurixCAN is reachable over `aport=50000` and communicates with
the Tegra over `bport=50103`.

Thanks

hello nvdpx2,

it’s because the sample_canbus_logger binary is being occupied by 1st process.
we will look into this, please have an alternative way to access two AURIX-CAN from TegraA and TegraB instead.
thanks

Thanks JerryChang,

Could you let me know other ways to use all AURIX CANs?
non-buffering way would be better.
DsCom may occur buffering each 50ms.

Thanks,

hello nvdpx2,

please specify bport numbers with different bus to access two AURIX-CAN from Tegra.
thanks

for example,
Session-1

$ ./sample_canbus_logger --driver=can.aurix --params=ip=10.42.0.106,bport=50000,bus=a

Session-2

$ ./sample_canbus_logger --driver=can.aurix --params=ip=10.42.0.106,bport=60395,bus=b

Thanks JerryChang,

I thought bport parameter is for ACR only!
I’ll test it shortly.

Thanks,

JerrytChang,

I update what I tested about your advice.

  1. multiple sessions on the Tegra-A
$ ./sample_canbus_logger --driver=can.aurix --params=ip=10.42.0.106,bport=50000,bus=a
$ ./sample_canbus_logger --driver=can.aurix --params=ip=10.42.0.106,bport=60395,bus=b

2nd session does not work.

  1. each session on the both Tegra sides,
$ ./sample_canbus_logger --driver=can.aurix --params=ip=10.42.0.106,bport=50000,bus=a
$ ./sample_canbus_logger --driver=can.aurix --params=ip=10.42.0.106,bport=60395,bus=b

Both sessions work well, with dedicated bport.

Then, I have other questions here.

  1. Two bport parameters are used here, any other bport values for other aurix CAN channels ?
  2. Can I use multiple aurix CAN session on the Tegra-A all together?

Thanks

hello nvdpx2,

could you please try to access multiple Aurix CAN sessions with single Tegra following below.
thanks

<Session-1>
$ sudo ./sample_canbus_logger --driver=can.aurix --params=ip=10.42.0.106,bport=60395,bus=a

<Session-2>
$ sudo ./sample_canbus_logger --driver=can.aurix --params=ip=10.42.0.106,bport=60396,bus=b

JerryChang,

I’ve tested what you said.

And the result is,

The first session having bport 60395 is only capable of communication, regardless of bus ID.
60396 as a bport is reasonable port number?

I found bport should be only 60395 for bus A or B.
That is, the second command above you suggested does not work, terminated with some error messages.

On the contrary to this, following command works well.

$ ./sample_canbus_logger --driver=can.aurix --params=ip=10.42.0.146,aport=60397,bus=a

Aport as a parameter has not meaning here, 60396, 60397, 60398, etc.

In any cases, IMO, only 1 session can work on a Tegra at a time .

Thanks,

Dear nvdpx,

Regarding ‘I found bport should be only 60395 for bus A or B.
That is, the second command above you suggested does not work, terminated with some error messages.’, could you please upload the error messages on this topic? Thanks.

Dear SteveNV,

So, how can I use multi aurix can channel at a time? Whenever I turn on more than one channel, only the one turned on last works.

I have one channel set as
params.protocol = “can.aurix”;
params.parameters = “ip=10.42.0.146,bport=60395,bus=a,config-file=/usr/local/driveworks/data/samples/sensors/can/EasyCanConfigFile.conf”;

the other channel I set in this way:
params.protocol = “can.aurix”;
params.parameters = “ip=10.42.0.146,bport=60395,bus=b,config-file=/usr/local/driveworks/data/samples/sensors/can/EasyCanConfigFile.conf”;