LAN2CAN is not working in CAN baud rate 100K

CAN to LAN gateway in DIN rail plastic casing
gh.yu
Posts: 16
Joined: Tue 4. Jul 2017, 15:09

LAN2CAN is not working in CAN baud rate 100K

Post by gh.yu » Thu 27. Jul 2017, 06:48

Hi,

I want to send udp can message to can network on baud rate 100K via PCAN-Ethernet Gateway.
But it's not working
It's working on baudrate 500K when I test.

Please let me know the how to send can message on baudrate 100K.

Regards,

S.Michaelsen
Hardware Development
Hardware Development
Posts: 87
Joined: Fri 10. Sep 2010, 13:11

Re: LAN2CAN is not working in CAN baud rate 100K

Post by S.Michaelsen » Thu 27. Jul 2017, 07:24

Hi,

the baude rate of the CAN bus has no influence on the routing mechanism. If it does not work with your new settings please double check that the CAN baude rate matches the real baude rate on the bus and all other settings are correct for your environment.

BR,
Stephan

gh.yu
Posts: 16
Joined: Tue 4. Jul 2017, 15:09

Re: LAN2CAN is not working in CAN baud rate 100K

Post by gh.yu » Thu 27. Jul 2017, 07:57

Hi,

Thanks for help.

When I test,
- CAN2LAN is working well on CAN baud rate 100K
- CAN2LAN is working well on CAN baud rate 500K
- LAN2CAN is working well on CAN baud rate 500K
But, only LAN2CAN with 100K baudrate is not working.
So, I don't think that CAN baude rate does not match the real baude rate on the bus as you comment.
Even, I couldn't check udp packet on expert route manager page of PCAN gateway.
Any ideas for resolving it?

Following is my Gateway configuration and can message for LAN2CAN.

1. my can message
/* length msgType tag timestampL timestampH channel dlc flgas canId canData */
{ 0x0024, 0x0080, {0, }, 0x55543, 0, 0, 8, 0, 0x80000026, {0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} },

2. LAN2CAN environment
2 Local IP - Port:45321 CAN Channel 1 UDP
Index: 2
Status: The PCAN-Gateway handshake is inactive. No status information are gathered for this route.
Direction: Receive: IP > CAN
Source: Local IP - Port:45321
Destination: CAN Channel 1
Protocol: UDP
PCAN-Gateway handshake: Inactive
TCP Delay: Active

3. CAN Channel 1
Activate / Deactivate : Checked
Bit Rate Selection : 100K
User Notes
First CAN interface

S.Michaelsen
Hardware Development
Hardware Development
Posts: 87
Joined: Fri 10. Sep 2010, 13:11

Re: LAN2CAN is not working in CAN baud rate 100K

Post by S.Michaelsen » Thu 27. Jul 2017, 08:07

Hi,

try to use another port. Port 45321 is reserved. See manual page 30 for more details.

BR,
Stephan

gh.yu
Posts: 16
Joined: Tue 4. Jul 2017, 15:09

Re: LAN2CAN is not working in CAN baud rate 100K

Post by gh.yu » Thu 27. Jul 2017, 08:22

Hi,

Is manual you comment below PCAN-Gateways_Developer-Documentation_eng.pdf ?
but it doesn't have 30 page.
Could you share your manual?

S.Michaelsen
Hardware Development
Hardware Development
Posts: 87
Joined: Fri 10. Sep 2010, 13:11

Re: LAN2CAN is not working in CAN baud rate 100K

Post by S.Michaelsen » Thu 27. Jul 2017, 08:29

Hi,

no, I was talking about the normal user manual. You can e.g. download it on the product web side:
http://www.peak-system.com/PCAN-Etherne ... 330.0.html

BR,
Stephan

gh.yu
Posts: 16
Joined: Tue 4. Jul 2017, 15:09

Re: LAN2CAN is not working in CAN baud rate 100K

Post by gh.yu » Thu 27. Jul 2017, 11:41

Hi,

According to your comment, I changed port number from 45321 to 45324 below,
But LAN2CAN is not working yet.
When I check packet status, after only 1 ip packet is arrived,
no ip packet is arrived and no can packet is transmitted (see below)

Can you guess what is the problem?


<Changed Configuration>
4 Local IP - Port:45324 CAN Channel 2 UDP
Index: 4
Status: The PCAN-Gateway handshake is inactive. No status information are gathered for this route.
Direction: Receive: IP > CAN
Source: Local IP - Port:45324
Destination: CAN Channel 1
Protocol: UDP
PCAN-Gateway handshake: Inactive
TCP Delay: Active

<Packet Status Captured from PCAN Gateway>
CAN packets: 0
Reset
CAN frames: 0
CAN errors: 0
CAN frames dropped: 0
CAN frames sent at retry: 0
Timeout between retries (CAN): 50
Number of retries (CAN): 6
IP packets: 1
IP errors: 0
Peers connected: 0
FPP stats: 0; 0; 0; 0; 0; 0; 0; 0;

gh.yu
Posts: 16
Joined: Tue 4. Jul 2017, 15:09

Re: LAN2CAN is not working in CAN baud rate 100K

Post by gh.yu » Thu 27. Jul 2017, 12:23

When I check the ini configuration file, fpp value for 100k is 'zero',
As far as I know, fpp is max CAN frames per IP packet according to document.
And fpp value for 500k is 8, not 'zero'.
Can you guess what it mean?

(can0 : 500K, can1 : 100K)
poi_config.ini
==============================================================
[rt_1]
rtinfo =
active = TRUE
type = LAN2CAN
interface1 = can0
protocol2 = UDP
destination2 = 0.0.0.0:45323
fpp = 8
tcpdelay = TRUE
dispidx = 0
sndudelay = 50
sndmax = 6
cdm = 500
noctrl = TRUE
unifyfilters = FALSE
joinfilters = FALSE


[rt_3]
rtinfo =
active = TRUE
type = LAN2CAN
interface1 = can1
protocol2 = UDP
destination2 = 0.0.0.0:45324
fpp = 0
tcpdelay = TRUE
dispidx = 0
sndudelay = 50
sndmax = 6
cdm = 500
noctrl = TRUE
unifyfilters = FALSE
joinfilters = FALSE

S.Michaelsen
Hardware Development
Hardware Development
Posts: 87
Joined: Fri 10. Sep 2010, 13:11

Re: LAN2CAN is not working in CAN baud rate 100K

Post by S.Michaelsen » Thu 27. Jul 2017, 13:19

The FPP value is only used on CAN to LAN routes so doesn't matter in your case. If the IP packet is counted but no CAN frame is sent the packed was probably not in the correct format. Did you send the same packet as you sent to the other route on the other CAN channel? Have you tested to switch only the CAN channels of both routes to check if your sockets are really in correct state?

gh.yu
Posts: 16
Joined: Tue 4. Jul 2017, 15:09

Re: LAN2CAN is not working in CAN baud rate 100K

Post by gh.yu » Thu 27. Jul 2017, 14:00

Hi,

My can message is below and I checked it was sent to gateway to can 500k network well.
Id is 0x00000026 and extended format so 0x80000026.

1. my can message
/* length msgType tag timestampL timestampH channel dlc flgas canId canData */
{ 0x0024, 0x0080, {0, }, 0x55543, 0, 0, 8, 0, 0x80000026, {0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} },

Regards

Locked