element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Help: Encountering CAN Bus Problem on SmartEdge IIoT Gateway
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 27 replies
  • Answers 17 answers
  • Subscribers 665 subscribers
  • Views 5311 views
  • Users 0 members are here
  • raspberry_pi
  • raspberrypi
  • smartedge iiot gateway
  • canbus
Related

Help: Encountering CAN Bus Problem on SmartEdge IIoT Gateway

khz_321
khz_321 over 5 years ago

Hi All,

 

I was wondering if anyone has had any experience using the CAN Controller on the SmartEdge IoT Gateway

The box has a Built-in MCP2515 CAN Controller on board, which is great & why I selected it for a project that requires CAN

 

For the most part, it works fine, but every so often I'm encountering "Garbage" data coming from the chipset (at a rate of about 1 message every 10 mins with a message cycle of 100ms)

This is shown below, when simply monitoring using candump and nothing else

 

image

the shown 67 EB in bytes 7 & 8 are the bits Garbage Data in question. It should be noted that when I do get the garbage, its always the same 2 Bytes and same values.

 

The sender device is broadcasting the same message repeatedly, so there should be no changes at all!

 

I was also able to confirm that it is not present on the physical bus by using a PCAN USB and datalogging with Pcan-View at the same time.

The data dump from Pcan-View shows no messages like the one highlighted!

 

Seems like this is happening on the Controller Hardware or Driver Implementation side on the IIoT Gateway

Anyone encountered this before? Either on this product or any other Raspberry Pi ?

 

I've tried adjusting the bit timing, sampling point, everything I could think of, but still encountering a random error every so often

 

Here is my CAN settings from /etc/network/interfaces

 

auto can0
iface can0 inet manual
   pre-up /sbin/ip link set can0 type can bitrate 250000 sample-point 0.875 triple-sampling on
   up /sbin/ifconfig can0 up
   down /sbin/ifconfig can0 down

 

And here is the output of ip -details -statistics link show can0

ip -details -statistics link show can0
4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
    link/can  promiscuity 0 
    can <TRIPLE-SAMPLING> state ERROR-ACTIVE restart-ms 0 
  bitrate 250000 sample-point 0.875 
  tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
  mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
  clock 8000000
  re-started bus-errors arbit-lost error-warn error-pass bus-off
  0          0          0          0          0          0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
    RX: bytes  packets  errors  dropped overrun mcast   
    17224264   2153033  0       1508    0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    16         2        0       0       0       0

 

Note: Kernel Version 4.14.79-v7+, & Software Image: avnet_iot_demo_20190719a_shrink

(Also tried with latest release avtse-iiotg-v-11-20200326.img, which apparently updated the MCP2515 driver, but problem still persists)

 

Any advice? 

  • Sign in to reply
  • Cancel
Parents
  • phoenixcomm
    0 phoenixcomm over 4 years ago

    image khz_321 in NexGen the RSS Radio subsystem  each radio is connected together via CAN using the stand alone modules. I am working on a Protocol Converter CANbus <-> CAN/ip. ALL the modules are running CANaerospace.

    Please Note that while CAN is a two wire system It should have a common ground. My Ground is from the RJ-45s on Pin #8 and connects to both interface module and the Arduino itself. I ground is not present for reference, you might be getting some crud that way.

    ~~Cris

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • phoenixcomm
    0 phoenixcomm over 4 years ago

    image khz_321 in NexGen the RSS Radio subsystem  each radio is connected together via CAN using the stand alone modules. I am working on a Protocol Converter CANbus <-> CAN/ip. ALL the modules are running CANaerospace.

    Please Note that while CAN is a two wire system It should have a common ground. My Ground is from the RJ-45s on Pin #8 and connects to both interface module and the Arduino itself. I ground is not present for reference, you might be getting some crud that way.

    ~~Cris

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube