Can Receive CAN data but cannot send
Posted: Mon 26. Jun 2023, 22:17
I'm correctly receiving data from the CAN interface of externally labeled "CAN2" which looks to be can_1 in the ini.
I cannot get this interface to send data on the CAN bus. I've tried both TCP and UDP. The Data I'm sending looks like this:
0x0024 0080 0000 0000 0000 0000 4C78 80F2 0000 0017 0008 0000 0000 0047 0807 0605 0403 0201
This is the same format of the received message, I just change the ID to 47 so there is not a collision.
[can_1]
if_name = Second CAN interface
active = 1
listen_only = 0
auto_resume = 1
loop_back = 0
one_shot = 0
triple_sampling = 0
br_def = 0
core_clock = 24000000
bit_rate = 500000
sample_point = 800
enable_error_counter = 0
measure_bus_load = 0
[rt_0]
rt_info = Try this
active = TRUE
type = LAN2CAN
interface_1 = can1
protocol_2 = UDP
destination_2 = 0.0.0.0:7777
fpp = 15
tcp_delay = TRUE
disp_idx = 0
snd_delay_us = 300
snd_max = 30
connect_delay_ms = 500
invert_socket_mode = FALSE
use_crc_frm = FALSE
crc_start_value = 0x00000000
crc_polynom = 0x04C11DB7
no_ctrl = FALSE
no_keep_alive = FALSE
unify_filters = FALSE
join_filters = FALSE
[rt_2]
rt_info =
active = TRUE
type = CAN2LAN
interface_1 = can1
protocol_2 = UDP
destination_2 = 192.168.1.138:9851
fpp = 1
tcp_delay = TRUE
disp_idx = 0
snd_delay_us = 300
snd_max = 30
connect_delay_ms = 500
invert_socket_mode = FALSE
use_crc_frm = FALSE
crc_start_value = 0x00000000
crc_polynom = 0x04C11DB7
no_ctrl = FALSE
no_keep_alive = FALSE
unify_filters = FALSE
join_filters = FALSE
I cannot get this interface to send data on the CAN bus. I've tried both TCP and UDP. The Data I'm sending looks like this:
0x0024 0080 0000 0000 0000 0000 4C78 80F2 0000 0017 0008 0000 0000 0047 0807 0605 0403 0201
This is the same format of the received message, I just change the ID to 47 so there is not a collision.
[can_1]
if_name = Second CAN interface
active = 1
listen_only = 0
auto_resume = 1
loop_back = 0
one_shot = 0
triple_sampling = 0
br_def = 0
core_clock = 24000000
bit_rate = 500000
sample_point = 800
enable_error_counter = 0
measure_bus_load = 0
[rt_0]
rt_info = Try this
active = TRUE
type = LAN2CAN
interface_1 = can1
protocol_2 = UDP
destination_2 = 0.0.0.0:7777
fpp = 15
tcp_delay = TRUE
disp_idx = 0
snd_delay_us = 300
snd_max = 30
connect_delay_ms = 500
invert_socket_mode = FALSE
use_crc_frm = FALSE
crc_start_value = 0x00000000
crc_polynom = 0x04C11DB7
no_ctrl = FALSE
no_keep_alive = FALSE
unify_filters = FALSE
join_filters = FALSE
[rt_2]
rt_info =
active = TRUE
type = CAN2LAN
interface_1 = can1
protocol_2 = UDP
destination_2 = 192.168.1.138:9851
fpp = 1
tcp_delay = TRUE
disp_idx = 0
snd_delay_us = 300
snd_max = 30
connect_delay_ms = 500
invert_socket_mode = FALSE
use_crc_frm = FALSE
crc_start_value = 0x00000000
crc_polynom = 0x04C11DB7
no_ctrl = FALSE
no_keep_alive = FALSE
unify_filters = FALSE
join_filters = FALSE