A quick look at SocketCAN

Slides:



Advertisements
Similar presentations
Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang.
Advertisements

Flaws of traditional device drivers framework Too much functionality in device drivers Duplication of code Large size No buffering support Limited facilities.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
1 Linux Networking and Security Chapter 2. 2 Configuring Basic Networking Describe how networking devices differ from other Linux devices Configure Linux.
Figure 1.1 Interaction between applications and the operating system.
Understanding Networks I. Objectives Compare client and network operating systems Learn about local area network technologies, including Ethernet, Token.
Network Programming Eddie Aronovich mail:
Linux Networking CIS Why Linux/Unix? Configurability ▫Customizable System to satisfy unique needs. Scalability ▫Able to serve an increasing number.
Introduction to Linux Network 劉德懿
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 7 Connect the SUSE Linux Enterprise Server to the Network.
Chapter 12: Configuring Networks The Complete Guide to Linux System Administration.
Clara Gaspar, November 2012 Experiment Control System LS1 Plans…
Vision/Benefits/Introduction Randy Armstrong (OPC Foundation)
September 6, 2015 Connecting Client Applications to Informix Databases using IBM Informix Connect and ODBC James Edmiston Database Consultant Quest Information.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward.
Layer Architecture of Network Protocols
UNIX SVR4 COSC513 Zhaohui Chen Jiefei Huang. UNIX SVR4 UNIX system V release 4 is a major new release of the UNIX operating system, developed by AT&T.
Operating System. Architecture of Computer System Hardware Operating System (OS) Programming Language (e.g. PASCAL) Application Programs (e.g. WORD, EXCEL)
Tools for Web Applications. Overview of TCP/IP Link Layer Network Layer Transport Layer Application Layer.
LWIP TCP/IP Stack 김백규.
1 Lecture 20: I/O n I/O hardware n I/O structure n communication with controllers n device interrupts n device drivers n streams.
High Performance Computing & Communication Research Laboratory 12/11/1997 [1] Hyok Kim Performance Analysis of TCP/IP Data.
IT COOKBOOK Windows Network Programming. Chapter 01. Intro. to Network and Socket Programming.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
Day 14 Introduction to Networking. Unix Networking Unix is very frequently used as a server. –Server is a machine which “serves” some function Web Server.
Chapter 2 Operating System Overview
CE Operating Systems Lecture 3 Overview of OS functions and structure.
AoE and HyperSCSI on Linux PDA Prepared by They Yu Shu.
Byoung-Jo CHOI Fall 2007 SW Project II Advanced Linux Programming.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 1.
Software Defined Networking and OpenFlow Geddings Barrineau Ryan Izard.
Chapter 4: server services. The Complete Guide to Linux System Administration2 Objectives Configure network interfaces using command- line and graphical.
1 Socket Interface. 2 Basic Sockets API Review Socket Library TCPUDP IP EthernetPPP ARP DHCP, Mail, WWW, TELNET, FTP... Network cardCom Layer 4 / Transport.
Tgt: Framework Target Drivers FUJITA Tomonori NTT Cyber Solutions Laboratories Mike Christie Red Hat, Inc Ottawa Linux.
SOCKET PROGRAMMING Presented By : Divya Sharma.
Introduction to Operating Systems Concepts
The Linux System.
Chapter 12: Configuring Networks
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Chapter Objectives In this chapter, you will learn:
Module 8: Networking Services
Generic OPC UA Server Framework
Operating System.
Institute of Nuclear Physics Polish Academy of Sciences
IzoT™ Device Stacks March 2014.
G.Thomas & D.Davids (CERN) & O.Holme (ETH Zurich)
Henk Boterenbrood Benjamin Farnham Vyacheslav Filimonov
The Software Framework available at the ATLAS ROD Crate
MOBILE DEVICE OPERATING SYSTEM
Introduction to Networking
Popular Operating Systems
IP Network Layer and Ethernet Encapsulation
ATLAS Wiener OPC UA Server
TRT DCS status and LS1 plans
Introduction to Computers
Chapter 3: Windows7 Part 4.
Introduction to the Kernel and Device Drivers
CSCI 315 Operating Systems Design
CANalytics TM CAN Interface Software BY.
Radiation- and Magnet field- Tolerant Power Supply System
Chapter 2: The Linux System Part 1
I/O Systems I/O Hardware Application I/O Interface
CUPS Print Services.
Time Gathering Systems Secure Data Collection for IBM System i Server
Linux Architecture Overview.
Linux and TCP/IP Networking
Module 12 Network Configuration
Welcome to Linux Chap#1.
A very basic introduction
Presentation transcript:

A quick look at SocketCAN Piotr Nikiel, ATLAS Central DCS 25 Feb 2014

CANopen Readout Chain OPC UA Server CAN Bus File System SocketCAN Configurable hardware interface OPC UA Server Vendor SocketCAN driver module UNIX Sockets CAN Hardware Interface Vendor-specific Win64/Linux Driver Vendor API CANOpen XML OPC UA TCP/IP XML Configuration File File System WinCC OA System OPC UA Client fwElmb CAN Bus WCCOA XML

User’s perspective You plug a SocketCAN device into a computer Kernel loads a corresponding device driver Standard Linux kernel has ~10 CAN device drivers (e.g. Kvaser) ATLAS DCS provides production RPM for SysTec CAN network interface shows up (e.g. can0) Interface can be opened by any application e.g. OPC UA CANopen server Standard Linux tools: ifconfig, tcpdump, ip, … CAN utils: candump, cansend, cangen, …

Operating System’s perspective SocketCAN is a subclass of standard Network Interface, like Ethernet or Wi-Fi So it inherits abundance of features and tools ifconfig: ip link set can0 type can bitrate 125000 tcpdump can0 Queues & buffers configuration sysfs, udev, … everything -bash-4.1$ ifconfig can0 Link encap:UNSPEC HWaddr 0E-58-F5-59-00-00-60-00-00-00-00-00-00-00-00-00 UP RUNNING NOARP MTU:16 Metric:1

Programmer’s perspective The traditional Sockets API – stable, mature, reliable and proven for 40+ years No specific libraries, headers, frameworks needed 100% compatibility among various vendors/products Natural richness of Unix Sockets comes at no expense: Blocking/nonblocking calls select(), poll(), … Native error support (strerror(), perror(), …) Convenience library for interface setup: libsocketcan

Programming example – Query State of an ELMB Send NodeGuard request CAN frame can_frame f; f.can_id = (0x700 + elmbId) | CAN_RTR_FRAME; f.can_dlc = 0; write (sock, (void*) &f, sizeof f); Receive CAN frame containing the ELMB’s response read (sock, (void*) &f, sizeof f); printf (“ELMB state: %u\n”, f.data[0]);

SysTec RPM Our branch of SysTec Driver: Has some local fixes Has some improvements for configuration Has nice status tools: Is packaged in a production ready RPM [dcs@pcatldcsp10 ~]$ /opt/systec_can/systec_status.py Port State | [green led] [red led] | can0 OK(certain) | can1 OK(certain) | can2 BAD(UNCERTAIN) | ?blink? blink can3 OK(certain) | can4 BAD(UNCERTAIN) | ?blink? blink can5 BAD(UNCERTAIN) | ?blink? blink can6 Port closed(no info) | ? can7 Port closed(no info) | ?