J1939 Mapping

I just noticed the ETH LED on the device is off, but communication over ethernet is definitely happening.
According to the manual it should be flashing green.

The LEDs by the Ethernet port is showing a green LED for Link/Activity and orange for Link Speed LED.

I started over from factory setting and added on piece by piece.
As soon as I enable Lua in target mode, the STAT LED on the NT420 flashes red/green. Is this normal, or does that indicate something wrong in my Lua script?

I’m not sure what is causing the STAT LED to flash red/green. That would normally indicate a problem with the configuration file. Can you share it?

What do you have set for the Keep alive time? Make sure it is not set to zero.

Hi Lars,

Here is some feedback from Andreas:

  1. Do you know why his data would stop after 20 mins?

    Unfortunately I could not reproduce any problem even longer than 45 minutes.
    Please set the Keep alive to 10 and let me know
    if you can reproduce the problem with the attached LUA script.
    (it receives ID 1 and 2, puglish the MQTT as JSON,
    Subscribe the MQTT as JSON, increment identifier and
    send to the CAN bus)

  2. In regards to the LED status:

    I would say that the LED Status is not correct,
    Please read the LOG file using “Target | Read and Erase LOG file”.
    Please start the Terminal and check the output.
    Please use “table” data type (instead of “array”) for data bytes,
    because the MQTT does not support “array” data type.

2021-05-05-Tx-Rx-MQTT_JSON-Tx-CAN-message.zip (978 Bytes)

here is the config file
and the Lua

When the data stops sending, I try “Read and Erase Log file” , I see the following in the status windows: Error: Status ‘254’ received., ‘0’ expected.!

I will ask Andreas about that error message.

Did you set the keepalive to 10?

Were you able to reproduce the problem with the script that Andreas sent (above)?

I did set keepalive to 10.
The provided luascript does solve the red/green flashing status light, but I’m not sure I understand why.
It still stops sending data after a while.

Hi Lars,

Sorry for the delay. I want Andreas to take a look at this and he’s been out of the office for the last couple days. I should get a chance to talk to him today at some point.

Kyle

Here is Andreas response:

  1. Maybe the problem is in the MQTT Broker?
    (because I can not reproduce the problem)
    Can you try with another MQTT Broker?

  2. Maybe the transmission stops because of physical problems on the CAN bus?
    Please ensure that the CAN bus runs successfully.
    (Please set the automatically CAN bus off recovery using the Action Rules)

  3. Please send me a screenshot of the Dashboard of the CAN-GW-Configurator
    created when the problem occcurs

  4. When he runs the script that you provided, it fixes the red/green flashing LED

    Maybe because of the using “table” instead of the “array” type for the data field.

  5. but still stops sending data after some time.

    The attached MQTT script receives CAN messages with extended ID 0x1 and
    publish it to MQTT and
    subscribe the MQTT and transmits extended ID 0x64.

    Could you please let me know which CAN interface board
    did you use transmitting the ID 0x1 using canAnalyser V3 mini?
    What happend in the canAnalyer V3 mini if the problem occurs?

Best regards
Andreas

2021-05-14-LUA-MQTT.ZIP (1.4 MB)

I had this device connected to a Bolt. If I connect directly to the network using the Ethernet port, I do not have this problem. Any suggestions on why the Bolt drops the connection?

How is the Bolt configured? As an access point or client? Layer 2 or Layer 3? Etc. What is it connected to?

As a client using only 2.4 GHz.
Using DHCP relay in wired interface and Layer 3 IP forward enabled.

Looking at the IXXAT 420 log file I see MQTT connection lost about every 20 min, but it reconnects at least.

We would have to get logs, either from the wireless access point (or wireless controller) that the Bolt is connected to, or from the Bolt itself by setting up a syslog server to retrieve them.

It’s probably going to be a lot easier to log into the wireless controller, go to logs, and filter by the MAC address of the Bolt.

I got it to work pretty good now, but I see a bunch of E: MQTT connection lost, rc=504, but it reconnects again. But after a while I see :
[00005:02:10] E: TRBL: ETX memory allocation failure. CntVal: 2
[00005:02:10] E: TRBL: Device state changed to

These are errors in the CAN@net NT?

Do the device going into an error state with the CAN or Status LEDs flashing red?

Yes it is on the NT.

CAN or Status LED’s do not flash red.

I think that those errors are due to the connection being lost by the Bolt. The “ETX memory allocation failure” sounds like data overrun because of the connection loss.

When you connect with Ethernet you do not get the error, correct?

What did you change the keepalive setting to?

In order to understand the problem, I think we would have to diagnose it from the wireless network.

Keepalive is currently 30.
I tried with just Ethernet yesterday afternoon, and that worked the whole afternoon.
When powering up this morning, it did not work right away, so I grabbed the NT log file as shown below:

  • Device: CAN@net NT 420
  • Serial number: HW893371
  • IP address: 10.10.1.168
  • HW version: V3.02.00
  • FPGA version: V1.01.00
  • FW version: V6.00.01
  • Device name: NT420
  • Configured as: Local Bridge
  • CPU load: 8 %
  • Heap size: 1936460 bytes
  • Hour meter: 0:01:19
  • ConfigTool: 6.0.0.1846

################################################################################
################################################################################
################################################################################

[00000:00:29] E: function on_can:
[00000:00:29] E: not enough memory

[00000:00:29] E: function on_can:
[00000:00:29] E: not enough memory

[00000:00:29] E: function on_can:
[00000:00:29] E: not enough memory

[00000:01:00] W: TRBL: One or more tasks changed to
[00000:01:00] W: TRBL: Device state changed to

=========================================================
I had to reset it again to get it to work.

if we need to start a teams meeting or something that helps us troubleshoot this let me know.
I need to deliver this to customer soon.