Full text
Universidade do Minho Escola de Engenharia Departamento de Informática João Bernardo Coutinho Barreiros de Freitas SNMP Agent for On-Board-Units in Vehicular Systems February 2022
Universidade do Minho Escola de Engenharia Departamento de Informática João Bernardo Coutinho Barreiros de Freitas SNMP Agent for On-Board-Units in Vehicular Systems Master dissertation Master Degree in Informatics Engineering Dissertation supervised by Bruno Alexandre Fernandes Dias February 2022
i AUTHOR COPYRIGHTS AND TERMS OF USAGE BY THIRD PARTIES This is an academic work which can be utilized by third parties given that the rules and good practices internationally accepted, regarding author copyrights and related copyrights. Therefore, the present work can be utilized according to the terms provided in the license bellow. If the user needs permission to use the work in conditions not foreseen by the licensing indicated, the user should contact the author, through the RepositóriUM of University of Minho. License provided to the users of this work Attribution-NonCommercial CC BY-NC https://creativecommons.org/licenses/by-nc/4.0/
ii STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the University of Minho. João Bernardo Coutinho Barreiros de Freitas Assinado por: JOÃO BERNARDO COUTINHO BARREIROS DE FREITAS Num. de Identificação: 15021949 Data: 2022.02.14 13:11:43+00'00'
ACKNOWLEDGEMENTS Com o fim deste trabalho a minha jornada académica chega ao fim e como tal é um bom momento para refletir e agradecer a toda as pessoas que nestes anos me ajudaram, especialmente no último ano, ano em que desenvolvi o protótipo que irá ser apresentado nesta dissertação. Porque o desenvolvimento e redação da presente dissertação seria completamente impossível sem o apoio e a ajuda prestados por várias pessoas, desde já, um enorme e especial obrigado. No entanto, antes de começar a exposição, cumpre agora individualizar todos aqueles que contribuíram, de forma notória, para a realização do presente desenvolvimento, fazendo com que este caminho não fosse trilhado solitariamente. Primeiramente, aos meus pais, Anabela Freitas e Pedro Freitas, e irmão, José Pedro Freitas, por toda a ajuda, paciência, apoio, conforto e carinho incondicional, seria injusto da minha parte não prestar o maior dos agradecimentos. Em segundo lugar, gostava de agradecer ao resto da minha família e amigos, por serem de e para a vida, que direta ou indiretamente contribuíram para a realização deste trabalho e por todos os bons momentos. Em terceiro, gostaria de deixar um reconhecimento público de agradecimento ao Professor Doutor Bruno Alexandre Dias pela persistência, rigor, exigência e disponibilidade em ajudar e orientar a presente dissertação, desde o primeiro dia. Sem este contributo este trabalho seria completamente impossível. Por fim queria agradecer ao resto da equipa docente da escola de Engenharia da Universidade do Minho por terem feito desta jornada na Universidade do Minho os melhores anos da minha vida. iii
ABSTRACT On average over 60 Million automobiles are sold every year in the whole world and at one point or another every single one of these vehicles will require some form of maintenance to be performed. With the ever increasing complexity of these vehicles, any maintenance job has also increased in its difficulty and time required to complete, as such there is a need for a set of fast and reliable diagnostic tools to speed up this process. Furthermore, with the ever closer introduction of Vehicular ad hoc networks (VANETs), there is a need for an application that is able to read sensor data in real time and change the state of actuators in a vehicle with minimum delay, allowing for the introduction of such methods like platooning, which require several vehicles of different types and models to accelerate or brake simultaneously while also allowing a closer headway between vehicles, since the reaction time of such a system would be entirely based on the latency of the communication method/protocol being used and not the capabilities of the human driving the vehicle. As such. the main objective of this project is to create and test a Management Information Base (MIB) specification to be implemented on an Simple Network Management Protocol (SNMP) agent inside an On-Board-Unit (OBU) that allows a company or individual to quickly and safely access all information gathered from the vehicles’ own sensors while also allowing for its configuration and, at the same time, managing errors in the system. This system will make use of the preexisting Controller Area Network (CAN) technology to access and gather data from a vehicles sensors so that it can be accessed in real-time through an application. Such an application will communicate with the vehicles OBU using SNMP. This solution should be capable of handling more requests for data than already existing standard technologies and protocols, such as On Board Diagnostics (OBD-II), while also being faster than them. Additionally a way for users or other entities in a VANET to activate/deactivate specific actuators should also be included in this solution as such a feature is vital to the introduction of methods like platooning. Keywords: VANET, CAN, MIB, SNMP, On-Board-Unit, SNMP Agent, configuration, error management, Platooning, OBD-II, … iv
RESUMO Em média são vendidos mais de 60 milhões de automóveis por ano em todo mundo e, eventualmente, todos eles irão necessitar de manutenção. Com a complexidade destes veículos sempre a aumentar, qualquer trabalho de manutenção tem aumentado na sua dificuldade como no tempo despendido e. como tal, há uma necessidade de um conjunto de ferramentas de diagnóstico que sejam rápidas e de confiança para acelerar este processo. Ao mesmo tempo, com o aumento de investimento e desenvolvimento de Vehicular ad hoc networks (VANETs), há necessidade de uma aplicação que permita a leitura de sensores em tempo real e mudança de estado de atuadores de um veículo com delay mais baixo possível, permitindo a introdução de métodos de condução como platooning, que obriga a que vários veículos de diferentes marcas e modelos acelerem e travem ao mesmo tempo o que permite a que a distância entre eles baixe visto que o tempo de reação de tal sistema é baseado na latência do método/protocolo de comunicação e não nas capacidades do condutor. O principal objectivo deste projeto é criar e testar uma especificação Management Information Base (MIB) para ser implementada num agente (SNMP) Simple Network Management Protocol dentro de uma On-Board-Unit (OBU) que permita a uma empresa ou individuo o acesso a toda a informação acumulada através dos sensores do veiculo e, ao mesmo tempo, permitir a configuração do veículo e a sua gestão de erros. Este sistema vai utilizar a tecnologia Controller Area Network (CAN) para aceder e acumular dados dos sensores do veiculo para que estes sejam acedidos em tempo real através de uma aplicação. Esta aplicação irá comunicar com a OBU do veiculo através do protocolo SNMP. Esta solução deverá ser capaz de gerir mais pedidos de informação que tecnologias ou protocolos standard já existentes, como On Board Diagnostics (OBD-II), sendo também mais rápido que estes. Adicionalmente, esta solução deverá também incluir alguma maneira para que utilizadores ou outras entidades numa VANET possam activar/desactivar actuadores específicos visto que tal funcionalidade é vital para a introdução de métodos de condução como platooning. v
CONTENTS 1 INTRODUCTION 1 1.1 Motivation 2 1.2 Objectives 3 1.3 Document Layout 5 2 RELATED TECHNOLOGIES 6 2.1 SNMP 7 2.1.1 USM/VACM 8 2.1.2 How it works 9 2.2 SNMP Message Format 11 2.3 MIB 13 2.4 OBD-II 14 2.5 CAN 15 2.5.1 How it works 16 2.5.2 Message Types 17 2.5.3 Message Fields 17 2.6 SNMP and IOT 21 2.7 Summary 21 3 SNMP-BASED SOLUTION 22 3.1 System Architecture 24 3.2 Management Information Base 25 3.2.1 System OBU Group 26 3.2.2 Sensor Group 27 3.2.3 Error Group 34 3.2.4 Actuator Group 35 3.2.5 Structure of Management Information 38 3.3 Summary 39 4 PROTOTYPE DEVELOPMENT & TESTING 40 4.1 NET-SNMP 41 4.2 Generating Virtual CAN Messages 41 4.3 SNMP Agent 42 4.3.1 Decoding CAN Messages 44 4.3.2 Managing Requests 48 4.3.3 Storing Sensor Readings 54 4.3.4 Saving Modes 58 4.4 Manager 59 vi
CONTENTS vii 4.4.1 Authentication and Privacy 59 4.4.2 GetBulk and Set 61 4.4.3 View any table in the system 61 4.4.4 Create new requests 62 4.4.5 View a request 64 4.4.6 Edit a request 65 4.4.7 View Active errors in the system 66 4.4.8 Send Command 66 4.5 Tests and Results 67 4.5.1 Testing Environment 67 4.5.2 Testing Results 68 4.6 Summary 70 5 CONCLUS ION 71 References 73 Annex A: OBU MIB 77
1 INTRODUCTION The automotive industry has for over two decades used CAN (Controller Area Network) to manage and configure sensors and actuators in industrial environments as well as to allow universal communication between industrial components developed by different manufacturers. While it’s not the only technology to provide these features, it’s the most widely used in industrial environments, and more importantly the automotive industry. More specifically, this technology is used in the internal architecture of vehicles and, as such, it does not allow any third-party applications or hardware to access the CAN bus directly. This presents an unique problem to overcome, ”How can a third party entity gain access to this network so it can monitor data being transmitted over CAN and change the state of any actuator in it?”. The most common method that’s currently used to overcome this problem is by accessing the CAN bus indirectly through (OBD) (On-Board-Diagnostics) technologies and its variants and while this solution allows a third party to read sensor data and send commands to ECUs, it comes with its own drawbacks, both in terms of security, performance and versatility which, while minor inconveniences as far as the average user or repair technician is concerned, does restrict its integration in more advanced communication systems, such as VANETs (Vehicular ad-hoc Network). SNMP (Simple Network Management Protocol) [1] is widely used to manage and configure equipment and services, not only in internet networks but also in all other applications domains. Through its long years as a standard, it has shown to be a stable and efficient protocol that can be used by network managers to manage, monitor, and configure equipment while being lightweight enough that even devices with lacking computing power can use it. Through the use of SNMP, and an accompanying custom MIB (Management Information Base), another possible solution to the aforementioned problem will be presented that doesn’t compromise in security and efficiency while providing the same functionalities in regards to configuration and monitoring of sensors and actuators. This solution will be non proprietary, i.e universal, by being a program that can be integrated and setup on an already existing vehicle OBU and as such won’t require vehicle manufacturers to redesign the internal architecture of their vehicles. This type of solution has already been proposed [2][3] and, in a way, this project will try to study its effectiveness. 1
1.1. Motivation 2 1.1 MOTIVATION An ITS (Intelligence Transportation System) is an advanced application which aims to provide services that enable users to be better informed and make safer, more coordinated, and ’smarter’ use of transport networks. This includes, for example, calling for emergency services when an accident occurs or using cameras to enforce traffic laws depending on conditions. Somewhat more relevant for this project is that an ITS application will also allow for cooperative systems on the road, that is, communication between car-to-car, car-to- infrastructure and vice versa. For this use-case, data obtained from a vehicle can be used to detect events, such as rain or congestion, and based on these events take preventive actions with the objective of increasing road safety. Such a system needs to overcome a couple of obstacles before it can be introduced as a standard on all vehicles. One such obstacle is how to quickly and reliably collect/transfer data from a vehicle’s sensors in a network, and while there are already some solutions in-place that partially overcome this, they are not without drawbacks. These solutions usually come in two ”flavors”: • Built-in telematics- Communication with the outside world is done via an proprietary Internet connection and a GSM module. • Brought-in telematics- Communication with the outside world is done via a device that is plugged in to the OBD port. As mentioned, each one of these two methods has its own drawbacks, where the former makes use of proprietary internet connection and software which means any customer will only have access to content that the manufacturer allows the customer to have, the latter is limited by low throughput caused by OBD-II standard and requires specialized hardware and software to use. Protocol Nrº Protocol Max Throughput 1 SAE J1850 (PWM) 41.6kbps 2 SAE J1850 (VPW) 10.4kbps 3 ISO 9141-2 10.4 kbps 4 ISO 14230-4 (KWP 2000) 10.4kbps 5 ISO 15765-4 (CAN) 500kbps Table 1: Throughput of main standards supported by OBD-II[4] This low throughput is the major obstacle that prevents OBD-II from being used in VANET since, when OBD-II is being used to collect data from a vehicle it must first send a request, Parameter ID (PID), to the OBU for the data, wait for the response and only then send a second PID. This means that as the number of requests increase, so will the refresh rate of each individual request, more specifically, if there’s only one PID enabled, the maximum refresh rate is 50ms but if we were to increase the number of PIDs to the maximum, that is 20 PIDs per second, we would be looking at a refresh rate of 1000ms per PID [5][6][7].
1.2. Objectives 3 This limitation in number of sensors that can be monitored at the same time, low throughput and low refresh rate when the number of sensors being monitored increases makes the OBD-II interface a problematic source of sensor data if we were to use it in VANETs. This low refresh rate is especially damning when we consider that even assuming a busload of 70%, which is generally considered the ”real-world” maximum, it means that for example, an SAE J1939 data frame may occur every 0.77 ms @ 250 kbps or 0.39 ms @ 500 kbps [8], significantly faster than the 50ms refresh rate on OBD-II. One other obstacle to overcome is how to get OBUs made by different manufacturers to communicate with each other in an environment where each manufacturer relies on their own adapted proprietary architecture, which renders any interoperability between applications by different manufacturers difficult to achieve. And lastly, how can we allow for third-party software makers to develop and implement their own C-ITS applications to compete in the automotive market independently of the manufacturer[9] without disclosing any details on a manufacturers proprietary architecture. A proven technology like SNMP working alongside CAN can be used to overcome these obstacles while also adding an extra level of security since access to the MIB objects of the SNMP agent integrated in the OBU will only be possible to application modules/SNMP managers in the vehicle’s local network since it is not wise to allow outside entities direct access to sensors/actuators of a vehicle[3]. 1.2 OBJECTIVES The main objective of this dissertation will be the development of a solution that allows any authorized entity to obtain data from sensors and allow the configuration of actuators connected to it, through an SNMP agent integrated in the OBU and accompanying MIB, in a way that does not compromise in performance and security regarding further development of host-based distributed applications. This solution should bypass any bottlenecks caused by the slow throughput of OBD-II, which will allow for real-time diagnostics to be performed on a whole fleet of vehicles while also allowing for better and easier integration of the vehicle’s sensors with VANETs, it should also give access to any car manufacturer or end-user a solid base with which to build upon and develop their own diagnostics/configuration software. In essence this solution will be comprised of four different parts: • MIB. • SNMP Agent. • SNMP Manager. • Host Based Distributed Application. The MIB will define the database that will be used for managing vehicle’s sensors and actuators, while both the SNMP Agent and SNMP Manager will communicate with each other
1.2. Objectives 4 using SNMP and the MIB, thus, allowing for data collected from the vehicle’s sensors to be transmitted to whichever device holds the SNMP Manager. Finally a Host Based Distributed Application should provide an easy to use interface that allows a user to read sensor data and configure actuators in real time. The SNMP Manager can also be included in the Host Based Distributed Application. Additionally a decoder will also be developed so that we are able decode messages sent in the vehicle’s internal network by ECUs into human readable data. Both the MIB and SNMP agent will be integrated directly in the OBU while the SNMP manager and host based distributed application should be installed in the vehicle’s private network, directly in the OBU and/or outside it. Any communication between other distributed ITS applications and the system should be done via this host based distributed application. To accomplish this, an iterative methodology based on document research, solution proposal, implementation and testing will be followed: • Thoroughly research state-of-the-art access technologies to CAN bus, namely OBD and its variants. • Research recent projects that have attempted to overcome the inherent limitations of OBD based solutions. • Research advantages and disadvantages of an SNMP based solution. • Define a MIB that can monitor and configure sensors and actuators connected to an OBU. Such a MIB has to allow access to low level ITS functions implemented by the vehicles manufacturer and, at the same time, be transparent in relation to the chosen electronic communication bus, be it CAN, Flexray or any other. • Develop a prototype SNMP agent and manager so that it’s possible to test the validity of the introduced contexts.
1.3. Document Layout 5 1.3 DOCUMENT LAYOUT This dissertation is divided into five chapters covering areas related to SNMP,OBD-II and CAN architecture, proposed approach, development decisions, results and finally a conclusion and future work: • Chapter 1 - Introduction: In this chapter the context of the dissertation is set, as well as the motivation and objectives to be met. The layout of the dissertation is also explained • Chapter 2 - Related Technologies and R&D Works: In this chapter the already existing technologies and solutions are explained and discussed. • Chapter 3 - Proposed Approach: In this chapter a proposed approach will be presented based on the results of the discussions in Chapter 2. • Chapter 4 - Developing a Prototype: This chapter will explain in detail the most critical steps in the development of this solution while also presenting and discussing test results. • Chapter 5 - Conclusion: This chapter will contain the conclusions of this dissertation and any potential future work that could improve the presented solution.
2 RELATED TECHNOLOGIES Ever since the first communications networks were introduced, in the shape of telephone networks (POTS), there has been a need for Network Managers (NM), which at that time were telephone operators, to detect network-affecting problems, like equipment failure or traffic overloads and fix them by rerouting/blocking traffic from entering the congested network or alerting a technician to initiate maintenance activities. Nowadays, telephone networks have been replaced by PSTN while the humble telephone operator was replaced by routing protocols like RIP,OSPF or BGP. Another area in which NMs became relevant was in industry, where networks are extremely important as a way to keep production lines running as efficiently as possible. In this area, the role of an NM is to ensure that every cog in the machine is running properly and at optimum condition. To fulfill this role a protocol that was simple, centralized and had low consumption of resources on the managed devices was needed. While a variety of protocols were proposed, most were rejected except for SNMP. With the 1970’s fuel crisis, the automobile industry realized that fuel efficiency would become a consumer and government requirement. In response to this, the United States Congress established a set of standards named Corporate Average Fuel Economy (CAFE) which all companies had to comply. At the same time, computer controls as well as sensor technology were coming of age and by marrying electronics, sensors and software one could create automotive computer controlled systems and with this the fuel efficiency race was on. With the advent of these computer controlled systems a need to diagnose and monitor the performance characteristics of individual components was born [10] and it was due to this need that solutions like OBD were developed. With all these sensors, and their corresponding ECUs, being added to a vehicle, its wiring became an issue. To fix this a field bus system based on serial communication was developed and introduced in the 1980’s called CAN which, as promised, reduced wiring while also increasing reliability and improved service and maintenance features [11]. 6
2.1. SNMP 7 With the introduction of VANETs, a need for an efficient and safe way to access sensor data from a vehicle to use in ITS applications has surfaced, however this need can’t be easily met with OBD based solutions but it can be done if we were to replace OBD with SNMP as the interface technology [3][2][9]. As per [2], SNMP enabled micro controller boards can communicate with multiple sensors while also forwarding data to an on-board SNMP manager. The CAN interface would also allow for efficient and reliable data transfer between the SNMP enabled micro controller boards and SNMP manager, additionally, off board communication can be handled by cellular technologies. Although a promising start, [2] does not specify how this solution is to be implemented or the structure of its MIB and its proposal of multiple SNMP agents in a vehicle, one per type of sensor, goes against normalized ITS architectures proposed by institutions like ETSI or the one proposed in [9]. In [3], the use of SNMP in the context of vehicles with OBUs capable of communicating and integrating with VANETs is mentioned although, once again, no MIB is proposed or any details on how this solution may be integrated. Out of the three research papers, [9] is the one that provides the most insight into how SNMP can be integrated into a modern ITS architecture and as such it will form the basis of this solution despite also lacking a MIB specification. 2.1 SNMP Originally developed and introduced by university researchers in the 1988, SNMP is a standard protocol for network management. It’s used by Network Administrators to monitor and map network availability, performance and error rates [12] and uses UDP as the transport protocol, however TCP can be used as well. It was aproved as an internet standard by Internet Architecture Board (IAB) in 1990 to address a clear and growing need for network management [1]. In this solution, SNMP will be used to allow an Agent integrated in the OBU to communicate and transfer data to a manager, installed somewhere in the vehicle. SNMP comes in 3 main versions: • SNMPv1-Released in 1990. • SNMPv2-Released in 1993. • SNMPv3-Released in 1999. SNMPv1 SNMPv1, as the name implies, is the first publicly available version of SNMP and while it accomplished its goal of being an open, standard protocol, it was lacking in key areas. More specifically, it only supports 32-bit counters, which hampers its ability to manage modern networks, and has poor security features.
2.1. SNMP 8 SNMPv2 Released in 1993, the main differences between this version and SNMPv1 are improved error handling, the addition of SET operations and support for 64-bit counters. Security features are exactly the same as in SNMPv1, which is in the form of community strings, a simple password that devices need to be able to talk to each other and transfer information. SNMPv3 SNMPv3 is the newest version of SNMP, released in 1999, and its new features primarily revolve around enhanced security. Each SNMP entity now has an Engine ID which is used to generate a key for authenticated messages. Besides authentication SNMPv3 now also supports encrypting of SNMP messages with USM/VACM. 2.1.1 USM/VACM Introduced as part of SNMPv3, USM/VACM allows for better message security and access control respectively. USM, User-Based Security Model, provides message security by: • Data integrity checking, to ensure that the data was not altered in transit. • Data origin verification, to ensure that the request or response originates from the source from which it claims to have come from. • Message timeliness checking and, optionally, data confidentiality, to protect against eavesdropping. While View-Based Access Control Model (VACM) is the ability to control exactly what data an individual user can read or write. It should also be noted that these security models can be used concurrently with the older community string based security [1]. With these functionalities enabled it’s required that users provide the following information when invoking commands. Parameter Command-line Option Description engineID -e <EngineID>Engine ID of the SNMP agent securityName -u <Name>User name authProtocol -a <MD5|SHA>Authentication Type authKey -A <PASSPHRASE>Passphrase securityLevel -I <authNoPriv|AuthPriv|noAuthNoPriv>Security Level privProtocol -x <none|des>Privacy protocol privPassword -X <password>Password Table 2: SNMPv3 Security Parameters [1]
2.1. SNMP 9 2.1.2 How it works An SNMP network is usually composed by three different parts: • Manager- Installed in a Network Management System NMS: –Queries Agents. –Sets variables on Agents. –Gets responses from Agents. –Acknowledges asynchronous events from Agents. • Agent- Installed in a device that is to be monitored: –Collects management information about its local environment. –Stores and retrieves management information as defined in the MIB. –Signals an event to the Manager. –Acts as a proxy for some non–SNMP manageable network node. • MIB: –Contains an information database describing the managed device parameters. –Both the Agent and Manager share this database and the latter uses it to request specific information from the former. These requests are done via a set of operations: • GET- Retrieves the object instance from an Agent. • GETNEXT- Retrieves the next object variable. • GETBULK- Retrieves a large amount of objects variables, without needing several GETNEXT operations. • SET- Tells the NMS to modify the value of an object variable. • TRAPS- Alerts the SNMP manager about a condition on the network. • INFORMS- Traps that include a request for confirmation of receipt from the SNMP manager.
2.1. SNMP 10 In summary, we have a Manager installed in an NMS which communicates with Agents installed in one or more devices, where each Agent is keeping track of several parameters of that device via a MIB which is in turn shared between both Manager and Agent thus allowing the former to request specific information from the latter. Figure 1: Simplified SNMP architecture. From [13]. Figure 2: Management Information Base. From [14].
2.5. CAN 17 2.5.2 Message Types There are four different types of messages, or frames, that can be transmitted by a node on a CAN bus: • Data Frame- Most common message type, used to send data on the CAN bus. • Remote Frame- Used to solicit the transmission of the corresponding Data Frames. • Error Frame- Used to request re-transmission of a message. • Overload Frame- Used to indicate when a node is too busy. 2.5.3 Message Fields ACAN frame can have up to 7 fields: • Start of Frame- Marks the beginning of a frame, consists of one bit only. • Arbitration Field- Contains an Identifier and a Remote Transmission Request bit. Total size of 11 or 29-bit. • Control Field- Indicates the total number of bytes on Data Field. • Data Field- Depending on the type of frame, will either be empty or contain the data that is getting transmitted up to a maximum of 8 bytes. • CRC Field- Contains CRC Sequence, and CRC delimiter. • ACK Field- Contains two bits with an ACK Slot and ACK Delimiter. • End of Frame- Contains a series of recessive bits. As previously mentioned there are three main specifications being used in the CAN standard.
2.5. CAN 18 CAN2.0A This version is mostly used in light vehicles and features an 11-bit identifier. Figure 8: CAN2.0A message. From [24] CAN2.0B This version is mostly used in heavy vehicles, like trucks and buses, and features an 29-bit identifier. Figure 9: CAN2.0B message. From [24] CAN FD Newest specification of CAN standard, it’s expected to provide up to five times the speed of classical CAN, at 5Mbit/s, will increase the maximum data payload from 8 bytes to 64 bytes and is expected to appear on all vehicles from 2019 onward. Figure 10: CANFD message. From [25]
2.5. CAN 19 Other Network Types Before exploring other communication network protocols it’s important to to clearly define SAE network classes. These range from A (lowest speed) to C (highest speed). Every protocol will fit into at least one of these classes but some like CAN, class B and C, can actually fit into two [26]: • Class A- low speed (less than 10Kb/s) for convenience features such as body and comfort. • Class B- medium speed (between 10 and 125Kb/s) for general information transfer, such as emission data, instrumentation. • Class C- high speed (greater than 125Kb/s) for real-time control such as traction control, brake by wire, etc. While CAN it the most widely used in-vehicle communication network protocol, it doesn’t mean it’s the only one in existence. Many of these protocols were created by different companies or consortium’s a way to meet the different performance requirements throughout a vehicle. LIN Local Interconnect Network (LIN) is a low-cost serial communication system used as SAE class A network, which is a network that is used when the needs, in terms of communication, do not require the implementation of higher-bandwidth multiplexing networks such as CAN[27]. The typical applications involving LIN include controlling doors (e.g., door locks, opening/closing windows) or controlling seats (e.g., seat position motors, occupancy control). The maximum data rate of LIN is 20Kb/s. MOST Media Oriented System Transport (MOST) is a SAE class C network with a data rate of 25Mb/s that provides point-to-point audio and video data transfer with different possible data rates. MOST supports end-user applications like radios, GPS navigation, video displays and entertainment systems and has become the de-facto standard for transporting audio and video streams within vehicles[28].
2.5. CAN 20 FlexRay Also a SAE class C network, FlexRay is an automotive network communications protocol developed by the FlexRay Consortium, now disbanded, which was a consortium of vehicle manufacturers that included the likes of: • BMW. • Daimler. • Volkswagen. • General Motors. The aim of this consortium was to develop a faster and more reliable automotive network communications protocol than CAN. FlexRay specifies three different bit-rates, all of which are faster than classical CAN [29]: • 10Mbit/s. • 5Mbit/s. • 2.5Mbit/s. A FlexRay signal can carry up to 254 bytes, much higher than both classical CAN and CANFD at 8 and 64 bytes respectively, and has three CRC, which allows it to be more reliable and flexible than its main competitor. However it hasn’t seen wide adoption due to higher installation costs and problems with extending network length, being only used by high-end manufacturers like BMW, Audi, Bentley and Mercedes in their latest top of the range models, and as such it’s expected to be replaced by Ethernet systems in the near future.
2.6. SNMP and IOT 21 2.6 SNMP AND IOT Now, more and more objects are becoming embedded with sensors and gaining the ability to communicate. Many IOT devices have sensors that can register changes in temperature, light, pressure, sound and motion. To monitor/configure this myriad of sensors, SNMP based solutions can prove to be ideal due to the fact that SNMP was designed to be used in resource constrained devices [30]. These same requirements also exist when it comes to OBUs since they are also resource constrained devices, although not at the same level as IOT sensors and as such frameworks have already been proposed that provide remote vehicular sensor monitoring through SNMP [2][3]. By nature, this will require OBUs with an SNMP agent integrated and luckily modern ones do already come with such an agent incorporated in them to configure/monitor some aspects of their every day running however this agent is unable to access sensors/actuators of the vehicle. 2.7 SUMMARY In this chapter a general overview of the CAN protocol and SNMP was given, as well as how each of these two protocols work, their architecture, real world uses and how different versions of each protocol, and competitors, compare to each other so that the best options would be chosen for the project. Additionally a short introduction to the OBD-II standard was given, since it will be compared throughout this dissertation with the developed solution.
3 SNMP-BASED SOLUTION In this chapter the requirements, design goals and main issues to overcome will be presented as well as the proposed solution to meet them. This solution will be based on the performance of already existing protocols, SNMP versions, SNMP commands, security features and more. Lastly the system architecture will also be presented as well as any API that aids in the development of this project. Since the most commonly used protocol within a vehicles’ internal network is CAN, this solution will be developed with it in mind, in essence, using both SNMP and CAN to allow outside entities to access the internal network of a vehicle. This solution needs to be universal, that is, it can be used by any manufacturer independently of its proprietary internal architecture, and it must allow: • Monitoring sensor data from a vehicle. • Control over a vehicles actuators in a way that is: –As direct as possible. –As safe as possible. –As reliable as possible. –With as little delay as possible. –With as high of a data rate as possible. Due to security reasons, no manufacturer will allow direct access to actuators or sensors of a vehicle to any third party applications, and as such, the only current options are to access these components via the OBU, or any other application or mechanism that the manufacturer may or may not provide. Due to this, the only truly universal method to obtain sensor/actuator access is to do it through OBD-II port, however this is limited both in terms of performance and in terms of what sensors/actuators we can access. This project hopes to develop another method to access to these components with the use of SNMP and a custom made MIB, since through these we can overcome most of the limitations of OBD-II and mitigate others, i.e. security requirements can be met through the use of SNMPv3, by avoiding constant and active polling we can also increase data rate and decrease delay. 22
23 Nevertheless, even with SNMP, it is not wise to allow direct access to the agent that is integrated in the OBU since it can be dangerous to allow an outside entity direct access to the vehicles actuators and instead only allow applications in the vehicle’s local network to directly access the SNMP agent in the OBU. These applications, each with their own SNMP manager, can be roughly split into three types: • Applications that are only useful to the driver, passenger or other internal vehicle applications/services. These applications can also obtain additional data from external sources, V2X, to implement features like: –Adaptive Cooperative Cruise Control. –Cooperative Cruise Control. –Emergency Breaking. • Applications that contribute to the implementation of another distributed service, or application system, that requires V2X communications to trade information between the multiple components in it. This includes features like: –Platooning. –Cooperative Mapping. –Cooperative Traffic Management. • Applications that serve as a proxy to allow indirect access to external services. This includes: –Billing tolls and parking spaces. –Information gathering services for brand/dealer clouds. –Transport fleet monitoring systems. –Vehicle diagnostics and inspection The overall architecture of this project shall include an SNMP Agent instegrated in a vehicle OBU, this Agent will manage and store data captured from the vehicles ECU in a MIB. This MIB will be shared between the Agent and Manager, thus allowing for the latter to request data from the former. The same MIB can also be used by the Manager to send Set messages that change data in an Agent which will in turn allow for error management and configuration of an vehicle’s actuators. This Manager can then be used in both ITS applications or a manufacturers’ diagnostic software. In addition to this, since the primary goal of any C-ITS application is to both save lives and improve traffic flow[31] any application developed to work in this environment needs its communication with other entities on the road, be them OBUs, RSUs or even pedestrians, to be both fast and secure and as such this solution should provide an alternative that improves on the performance, when compared to other universal solutions like OBD-II.
3.1. System Architecture 24 3.1 SYSTEM ARCHITECTURE As shown in Figure 11 this solution will require one or more applications to be installed in the car, but outside of the OBU, and one SNMP Agent that is integrated directly on the vehicles OBU. The SNMP Agent main function will be to store data recorded by the vehicles’ sensors and, based on requests from the application, transmitting that data to the application, which may then forward it to the relevant entities. If this application is being used to communicate to outside entities its SNMP manager should also serve as a gateway application, filtering, preprocessing and even allowing/blocking access to certain functionalities based on the entity as a security feature. In the architecture represented in Figure 11 we have a car, its local network, OBU and ITSLCI (Intelligent Transport System Local Common Interface). As part of the OBU we have a SNMP agent and three types of services modules[9]: • Communication Services Module - This interface module will permit sharing of all medium-access technologies supported by the OBU by all application environments in the ITS station and deployed on resources outside the OBU, or hosts • Information Services Module- This interface module will permit access and manipulation of data generated by all sensors, actuators and other devices in the vehicle, indirectly or directly connected to the OBU • Function Services Module- This interface module will permit access to lower-level functionality procedures. These are functions that the manufacturers, due to security, safety, performance and liability issues, should have the responsibility and the desire to implement (or closely control its implementation). The SNMP agent is integrated in the OBU and is part of the Information Service Module. Certain internal OBU services included in the Function Service Module can communicate with the SNMP agent directly, through SNMPv3. These services can then be accessed with other access technologies that are defined in the ITS-LCI. Otherwise, one can directly access the SNMP agent through SNMP manager(s) outside the OBU. These will be integrated within one of the three types of applications mentioned above and no matter the type of application, it has to be connected to the vehicles internal network while communication with external distributed applications/services is done indirectly though modules or proxies. Finally, if and when sensor data is being monitored by local network applications where authentication is not essential, which can happen if the development and installation environment of applications in the vehicles local network is more ”closed-off” and secure, using SNMPv2c instead of SNMPv3 to monitor sensor data can be more efficient in terms of delay and throughput.
3.2. Management Information Base 25 Figure 11: System Architecture 3.2 MANAGEMENT INFORMATION BASE The MIB that was developed for this project will contain tabular objects that were grouped up based on their function: • System Group- This group will contain all the objects/tables related to vehicle/OBU metadata. • Sensor Group- This group will contain all objects/tables related to sensor readings. • Error Group- This small group will contain all objects/tables related to error management. • Actuator Group- This small group will contain all objects/tables related to actuators.
3.2. Management Information Base 26 Note: For simplicity sake certain nodes were not implemented in the prototype and as such, the OIDs defined in this dissertation will differ from the OIDs used in the prototype. This does not invalidate the results obtained with this prototype. 3.2.1 System OBU Group This group will contain all information regarding the installed OBU, for example: Date of installation, Version Number, Runtime, alongside capabilitiesTable and connectedVehiclesTable, these objects will serve mostly as a way to store the vehicles’ ”metadata”, this includes capabilities, vehicle ID, mileage, age, country of origin, etc. These tables will be populated based on information provided by the manufacturer on a per vehicle basis and as such it’s the least developed part of this project. systemOBUGroup Object SMI type OID numberOfCapabilties INTEGER 1.3.6.1.3.8888.1.1 capabilitiesTable Table 1.3.6.1.3.8888.1.2 numberOfConnectedVehicles INTEGER 1.3.6.1.3.8888.1.3 connectedVehiclesTable Table 1.3.6.1.3.8888.1.4 sysOBUDateandTime OBUDateandTime 1.3.6.1.3.8888.1.5 sysOBUNMonRequest Unsigned32 1.3.6.1.3.8888.1.6 sysOBUNEventRequest Unsigned32 1.3.6.1.3.8888.1.7 sysOBUNConfRequest Unsigned32 1.3.6.1.3.8888.1.8 sysOBUNErrors Unsigned32 1.3.6.1.3.8888.1.9 sysOBUVehicleID String[...] 1.3.6.1.3.8888.1.10 sysOBUDistanceType Integer/Enum 1.3.6.1.3.8888.1.11 sysOBUTotalDistance Unsigned32 1.3.6.1.3.8888.1.12 sysOBUCountry Integer/Enum 1.3.6.1.3.8888.1.13 Table 4: systemOBUGroup Capabilities Table This table will list the vehicle/OBU capabilities, including all available services. capabilitiesTable Object SMI type OID CapabilitiesID Unsigned32 1.3.6.1.3.8888.1.2.1..1 SetOfCapabilitiesID Unsigned32 1.3.6.1.3.8888.1.2.1..2 SpecificCapabilitiesID Unsigned32 1.3.6.1.3.8888.1.2.1..3 CapabilityValue String[...] 1.3.6.1.3.8888.1.2.1.4 Table 5: capabilitiesTable
3.2. Management Information Base 33 Figure 13: requestMonitoringDataTable and its relationships Figure 14: Sensor Group
3.2. Management Information Base 34 3.2.3 Error Group This small group will be used to help diagnose the reasons why certain requests were not set. These reasons can range from invalid mapTypeTable ID to duplicate requests on the same object by an user. It will be similar to mapTypeTable in the sense that there’s a main table where the errors are added and and auxiliary table where the descriptions of the errors are stored. This way if there several instances of the same error the same description won’t be repeated over and over again, only the index that points to that description will be repeated. Error Table This first table is where the errors that are currently active will be stored so as to allow the user to know why their request was not set. It will store a timestamp of the error as well as an expire time to delete this error entry. It will also store the username of the user whose request triggered the error as well as the errorDescriptionTable ID. errorTable Object SMI type OID errorID Unsigned32 1.3.6.1.3.8888.3.2.1.1 errorTimeStamp OBUDateandTime 1.3.6.1.3.8888.3.2.1.2 errorDescriptionID Unsigned32 1.3.6.1.3.8888.3.2.1.3 errorUser String[...] 1.3.6.1.3.8888.3.2.1.4 errorExpireTime String[...] 1.3.6.1.3.8888.3.2.1.5 Table 14: errorTable Error Description Table This auxiliary table will store a simple description of the error as well as an error code. It is populated on start-up based on the contents of a text file. errorDescriptionTable Object SMI type OID errorDescrID Unsigned32 1.3.6.1.3.8888.3.4.1.1 errorDescr String[...] 1.3.6.1.3.8888.3.4.1.2 errorCode Unsigned32 1.3.6.1.3.8888.3.4.1.3 Table 15: errorDescriptionTable
3.2. Management Information Base 35 Figure 15: Error Group 3.2.4 Actuator Group This final group is intended to allow actuators to be activated/deactivated with as quickly as possible, for example if the lead vehicle in a platoon were to break, all other vehicles in that same platoon need to break with minimal delay, so as to avoid a crash. This could be done by sending a message to the OBU of every vehicle in the platoon, which in turn would send CAN messages to the relevant nodes of the vehicle’s CAN network to activate the brake actuators. Sadly, due to proprietary reasons, there’s not much insight into how these CAN messages would look like, as such, this portion of the MIB will probably require some changing before it’s implemented in a real vehicle. Command Template Table This table is populated on start-up based on the contents of a text file. It includes a short description of what the command will do, the target node, in hexadecimal, and a template of the command, also in hexadecimal. e.g. AA BB CC DD EE ** ** H1, where ’*’ indicate where the user input will be added. commandTemplateTable Object SMI type OID commandTemplateID Unsigned32 1.3.6.1.3.8888.4.2.1.1 commandDescription String[...] 1.3.6.1.3.8888.4.2.1.2 targetNode String[...] 1.3.6.1.3.8888.4.2.1.3 commandTemplate String[...] 1.3.6.1.3.8888.4.2.1.4 Table 16: commandTemplateTable
3.2. Management Information Base 36 Command Table This final table will store all commands that were not yet sent to the CAN network. It contains the user input, an ID to commandTemplateTable and the SNMP username of the user that sent the command. The command will first be validated, then the CAN message will be created with the user input and the template, following that, the message will be sent over the CAN network to the target node and finally the entry will be deleted from commandTable. If validation or the transmission of the CAN message fails, a new entry in errorTable will be created and the entry in commandTable will be deleted. commandTable Object SMI type OID commandID Unsigned32 1.3.6.1.3.8888.4.4.1.1 templateID Unsigned32 1.3.6.1.3.8888.4.4.1.2 commandInput INTEGER 1.3.6.1.3.8888.4.4.1.3 commandUser String[...] 1.3.6.1.3.8888.4.4.1.4 Table 17: commandTable Figure 16: Actuator Group These three groups can now be merged together into a full MIB providing us with a full view of the whole tree.
3.2. Management Information Base 37 Figure 17: Full MIB The following tables are presented as an example, in them we have three requests and some of the samples recorded for them. requestMonitoringDataTable ReqID ReqControlID ReqMapID ReqStatID ... LastSampleID NOfSamples ... 0 0 199 2 ... 18 10 ... 1 1 50 3 ... 8 8 ... 2 0 199 0 ... 18 4 ... Table 18: Example requestMonitoringTable • Request 0 - Request made for sensor whose ID is 199, it has statistics enabled, index nº2, and 10 recorded samples. Its latest sample is sample nº 18. • Request 1 - Request made for sensor whose ID is 50, it has statistics enabled, index nº3, and 8 recorded samples. Its latest sample is sample nº 8. • Request 2 - Request made on the same object as Request 0, confirmed by the fact that ”ReqMapID” and ”ReqControlID” are equal, it does not have statistics enabled and has 4 recorded samples. Much like request 0, its latest sample is nº 18.
3.2. Management Information Base 38 samplesTable sampleID ... PreviousSampleID ... SampleRecordedValue ... ... ... ... ... ... ... 15 ... 14 ... 2000 ... 16 ... 15 ... 2500 ... 17 ... 16 ... 2450 ... 18 ... 17 ... 2300 ... Table 19: Example samplesTable If, for example, we wanted to get all the samples related to request 2 all we have to do is go to sample nº18 and then, based on its ”PreviousSampleID”, go to the sample indicated by it. By repeating this process 4 times, the number of samples indicated by ”NOfSamples”, we can obtain all samples related to this request. In this case the samples related to request 2 are: • Sample 18 - 2300 • Sample 17 - 2450 • Sample 16 - 2500 • Sample 15 - 2000 To aid in the understanding of this data we can then use ”ReqMapID” to check ”generic- TypeID” and ”sampleUnitID” related to this request. These two indexes will point to the unit description and type description of the request which may, for example, be ”rpm” and ”Actual engine speed which is calculated over a minimum crankshaft angle of 720 degrees divided by the number of cylinders.” respectively. This indicates that both Request 0 and Request 2 are being used to collect/monitor rpm data. 3.2.5 Structure of Management Information With all tables, and their contents, defined all that is needed is to do is convert that information into an SMI specification. As an example, a portion of the full MIB will be presented, where the column ”SavingMode”, of the table requestMonitoringDataTable is defined. In this example, we can verify that ”SavingMode” is an object that can be read, written or created and that this object is of the type ”Integer” with two valid options, 0 and 1, meaning ”permanent” and ”volatile” respectively. Additionally we can also verify that ”SavingMode” is the 5th column of the table requestMonitoringDataTable.
3.3. Summary 39 Max-Access Value Description read-create Object can be read, written or created read-write Object can be read or written read-only Object can only be read accessible-for-notify Object can be used only using SNMP notification (SNMP traps) not-accessible Used for special purposes Table 20: Max-Access values 1... savingMode OBJECT−TYPE 3SYNTAX INTEGER { permanent(0) , 5volatile(1) } MAX−ACCESS read−crea te 7STATUS current DESCRIPTION 9”This ob je ct wi ll id en ti fy the mode in which a s p e c i f i c request wil l be saved ” −− 1.3.6.1.3.8888.1.1.5 11 ::= { requestMonitoringDataEntry 5 } . . . Listing 3.1: Partial MIB Specification The full MIB definition developed for this project can be found in Full MIB Specification. 3.3 SUMMARY In this chapter, an overview of the potential use cases for this solution as well as its objectives was given followed by an overview of the the system architecture. Additionally, the most important tables of the MIB were presented, including an introduction on how these tables are defined in the SMI specification and the reasoning behind the specification of those tables. Finally a brief example of how these tables can be used to monitor sensor data was given.
4 PROTOTYPE DEVELOPMENT & TESTING In this chapter a summary of the development steps of the prototype created for this project will be presented starting with the choice of language and API, followed by a short explanation into how a CAN message are decoded. Following this a more in-depth dive into how the sub-agent processes both CAN messages and manager requests will be given. Additionally, regarding the manager, its functionalities will be presented alongside the reasoning behind the choice of protocol that will provide authentication and privacy to the data being transmitted, followed by a short explanation into how the SNMP manager communicates with the sub-agent. Finally, the results of this solution will be presented alongside a comparison with OBD-II. The first step in this type of development is deciding on the programming language that is to be used. In this case the chosen programming language for this phase of the project is C/C++, since its response times were roughly 3 4those in Java while also being less computationally intensive. Additionally C/C++ is the preferred language to develop software modules within OBUs which makes it the best choice for this phase of the project. Response Time (ms) 1attr/method Nattrs/method NMOs/method 1MO/method C/C++ 0.8 1 6 37 Java 1 2 8 45 Table 21: Comparison between C++ and Java response times [32] • 1attr/method - Response times for retrieving a single attribute from an object. • Nattrs/method - Response times for retrieving all eight object attributes from an object. • NMOs/method - Response times for retrieving all objects from all TCP connections (40 in total) using GETBulk. • 1MOs/method - Response times for retrieving all objects from all TCP connections (40 in total) using GETNext. 40
4.1. NET-SNMP 41 The next step in the development was creating the MIB, which was already presented in the previous chapter. This MIB should allow for sensor data to be read, actuators to be activated/deactivated, any requested data to be stored and, finally, all information regarding the vehicle or its OBU to be stored. 4.1 NET-SNMP The API that was chosen for the development of this phase of the project is included in the Net-SNMP application suite. This suite includes: • Command-line applications to retrieve and manipulate information from SNMP capable devices. • Graphical MIB browser (tkmib). •SNMP Agent (snmpd) that supports Agent Extensibility (AgentX) protocols. • Library for developing new SNMP applications with C and Perl APIs. Lastly this suite also includes a tool (mib2c) that is designed to take a portion of the MIB tree (as defined by a MIB file) and generate the template C code necessary to implement the relevant management objects within it. Through this tool every table defined in 3.2 will be converted to C code, so that our custom AgentX SubAgent can handle communication with the manager and manage all of our tables. 4.2 GENERATING VIRTUAL CAN MESSAGES Before creating the SNMP sub-agent, a simple program that can write CAN messages into a virtual CAN interface was created. Since the SNMP sub-agent will also be connected to this interface it will be able to receive CAN messages in real time much like it would happen in real life. This simple program will read CAN messages from a .trc file containing raw CAN bus logs and write the contents of that file into the previously created CAN interface. To do this two simple structures were created.
4.3. SNMP Agent 42 typedef s t r u c t can 2{ double timestamp ; 4unsigned char ∗id ; int dlc ; 6unsigned char data [MAXDATALENGTH] ; } can ; 8typedef s t r u c t canlist { 10 int capacity ; int current ; 12 can ∗ l i s t ; } c a n l i s t ; These structures are populated based on the contents of the log file and then iterated through to write those messages into the CAN interface. Naturally, these CAN messages are encoded by the ECUs prior to being sent, as such, the agent will need to decode them so they can be stored in the MIB. Additionally the timestamp of the original CAN messages can be used to replicate the time interval between the arrival of two consecutive messages. 4.3 SNMP AGENT One feature within SNMP that will be used in this phase of the project is that of sub-agents. These are independent SNMP daemons, that are transparent to the network management station[33], that register to the master agent the MIB modules they want to take care of[34], additionally, since the OBU may need to support other MIBs besides the one developed above, including the MIB-II Standard, it is recommended to manage custom MIBs, through subagents especially since that is the only way to make use of the Net-SNMP API. In the Net-SNMP API this feature is handled by an SNMP agent (snmpd) that supports AgentX protocols. From this point on, the terms ”agent” and ”sub-agent” may be used interchangeably but they both indicate the same software module that was developed and implements the custom ”OBUMIB”. When it comes to actually building the SNMP sub-agent in C code, the Net-SNMP website does come with some very useful tutorials and example code snippets that were used in the development of the sub-agent [35], which can, at its most basic level, be divided into 3 parts: • Registering Sub-Agent with the master Agent. • Registering and initializing the MIB tables the Sub-Agent will handle. • A main loop which will handle the requests by the manager.
4.3. SNMP Agent 49 To do this, it will first traverse commandTable in search of entries, when a entry is found it will check if the indicated templateID is in the MIB, as an entry of commandTemplateTable, if not, an entry in errorTable will be created followed by the deletion of this entry in commandTable. Then it will check whether or not the command input is valid, at least as far as the target node is concerned, if it’s invalid, an entry in errorTable will once again be created followed by the deletion of this entry in commandTable. If it’s a valid input a CAN message will be created by adding the command input, in hexadecimal, to the command template and finally the message will be sent to the CAN network. To ensure that the message was received successfully by the receiver the CAN standard does include a feature similar to TCP where the receiver will send an acknowledgement to the transmitter to confirm the receipt of the message, in CAN this is done by sending a data frame with a dominant bit during the ACK slot [39]. If such a data frame is not received, a new entry in errorTable will be created followed by the deletion of the entry in commandTable. If the message transmission is successful, the entry in commandTable will now be deleted since it’s no longer needed. Figure 21: How an entry in commandTable is managed
4.3. SNMP Agent 50 The second function, checkTables(), is included in the files pertaining to requestMonitoringDataTable and besides ensuring that the manager requests are valid, this function will also change the status of an entry and create/delete any auxiliary entries to a specific request. These status are the following: • 0 - Off. • 1 - On. • 2 - Set. • 3 - Delete. • 4 - Ready. To further understand how an entry in requestMonitoringDataTable is validated we first needed to know what columns in the table does the user have access to. These were: • requestMapID - Points to an entry in mapTypeTable which identifies the sensor whose data is being recorded. • requestStatisticsID - Points to an entry in requestStatisticsDataTable, 0 indicates no entry should be created while 1 indicates the opposite. • savingMode - Indicates whether this entry is volatile or permanent. • startTime - Indicates when the monitoring should start. • waitTime - Indicates an (optional) time to prepare the system to handle the request. • durationTime - Indicates how long should the monitoring go on for. • expireTime - Indicates how long after the request ended should data be kept in the MIB. • maxNofSamples - Maximum number of samples to be recorded. • loopMode - Whether or not the request should be restarted after deletion. When a new request is set by a manager, its entry in requestMonitoringDataTable will have a status of 2 (SET). While in this state, the request will first be validated and, if successful, its status will be changed to 4 (READY). If it fails validation an entry will be created in errorTable and the entry in requestMonitoringDataTable deleted.
4.3. SNMP Agent 51 Validating Manager Requests To validate manager requests we needed to go to every single column set by the request and check whether or not it’s valid. This is done via the following steps: • 1-Check if startTime was set by the manager, if not use current system time as startTime. • 2-Compare current system time with startTime and check if startTime is between 00:00:00 and 23:59:59. • 3-Check if waitTime is between 00:00:00 and 23:59:59. • 4-Check if durationTime is between 00:00:00 and 23:59:59. • 5-Check if expireTime is between 00:00:00 and 23:59:59. • 6-Check if maxNofSamples is greater than 0. • 7-Check if savingMode is either 0 or 1. • 8-Check if the manager who created this entry has already created another entry for the same object. • 9-Check if requestStatisticsID is either 0 or 1. • 10-Check if requestMapID points to a valid entry in mapTypeTable. • 11-Check if loopMode is either 1 or 2. If it fails at any of these points, the status of the request will be changed to 3 (DELETE) with an appropriate entry in errorTable being created explaining where the request failed. Once validated, the status of the entry is changed to 4 (READY) and the next step is creating an entry in requestControlDataTable. Since there can be multiple requests on the same object we had to first check if there’s an entry in requestControlDataTable with the same requestControlMapID as the requestMapID in the request. If an entry is found then there’s no need to create a new entry in requestControlDataTable, requiring only updating the request to take into account the ID of that entry. If no entry is found, then a new entry in requestControlDataTable will be created, returning it’s ID so it can be updated in the request.
4.3. SNMP Agent 52 The next step involves adding endTime to the entry, by adding startTime+waitTime+durationTime. This endTime indicates at which time should the entry be set to 0 (OFF). Following that, startTime+waitTime is compared to current system time to know if the entry can be set to 1 (ON). If so, prior to changing status to 1, we had to first check whether or not the request will need an entry in requestStatisticsDataTable, creating one if it’s indeed necessary. Finally the status will change to 1 (On). In addition to these previously mentioned features, checkTables() also fullfill any roles regarding managing a request. These include: • Updating in requestControlDataTable based on the status, savingModes and times of entries in requestMonitoringDataTable related to it. • Changing status from 1 (ON) to 0 (OFF) when current system time is after endTime. • Changing status from 0 (OFF) to 3 (DELETE) when current system time is after expire- Time. • Deleting an entry when it’s status is 3 (DELETE). This last feature will include multiple steps. First and foremost, the startTime of the entry that is to be deleted will be compared to the commitTime of its related entry in requestControlDataTable. Since the times in requestControlDataTable will always be equal to the oldest request on this object still in the MIB, we could find out if this entry is the oldest for this object or not. If there’s indeed an older request for the same object in the system then we don’t need to delete any sample, and only need to delete the entry in requestMonitoringDataTable and requestStatisticsDataTable, if this last one exists. If both startTimes are equal, it can mean one of three options: • It’s the oldest request among several others on the same object. • It’s the joint oldest request among several others on the same object. • It’s the only request on this object.
4.3. SNMP Agent 53 For the first of these situations, we must first find the second oldest request on this object and once we find it we must update the entry in requestControlDataTable to take into account that request. Following that we will delete all samples that predate this second oldest request and finally delete the entry in requestMonitoringDataTable and all those uniquely related to it. For the second situation we only need to delete the entry in requestMonitoringDataTable and requestStatisticsDataTable, if it exists. For the last one, all entries in samplesTable related to this request will be deleted alongside the entries in requestControlDataTable, requestMonitoringDataTable and, if it exists, requestStatisticsDataTable. Giving us the following flowchart: Figure 22: How is an entry in requestMonitoringDataTable managed It should be noted that after an entry with loopMode set to 1 (YES) is deleted, a new copy of that request will be added to the system.
4.3. SNMP Agent 54 4.3.3 Storing Sensor Readings In this section we will dive into how data from the CAN network is stored but, before going into details we must first give a short introduction to containers, at least as far as the NETSNMP API is concerned. Containers In essence, containers are a generic data interface similar to a database, and just like one, you use an index or key to access and sort data. These containers will keep our rows in memory while also sorting them, when rows are added or removed, providing a specific row for GET/SET requests without requiring OIDs and, as such, significantly simplifying the process of obtaining data from tables. This simplification allows developers to concentrate on operation the data rather than having to deal with SNMP GET/SET details[40]. These containers can be used to traverse tables and also include some easy to use operations that allowed us to add, remove or find an entry in a table based on its index or even iterate through all entries on a table: • CONTAINER_INSERT - Given an container and an object, it will add the object to the container. • CONTAINER_REMOVE - Given an index and a container, it will remove the object matching that index. • CONTAINER_FIND - Given an index and a container, it will return the object matching that index. • CONTAINER_ITERATOR - Allows iterating through the contents of a container.
4.3. SNMP Agent 55 Since requestMonitoringDataTable is one of the two tables that the user can directly change, the files pertaining to this table will be the ones to, for the most part, handle how CAN messages will be stored and how auxiliary entries in other tables are created. This was already touched upon in 4.3.2, more specifically the function checkTables(), however, in this section the focus will be on the function checkSamples() which should provide a slightly deeper dive into the internal logic of the program. 1... /∗ i n i t i a l i z e mib code here ∗/ 3BO_List ∗boList = readDBC(FILE LOCATION) ; . . . 5int fd [2] ; i f ( pipe ( fd ) < 0) 7e x i t (1) ; canDecoder = fork () ; 9/∗ you ’ re main loop here . . . ∗/ i f (canDecoder == 0) 11 parseCAN( boList , fd ) ; else 13 while (keep_running) { 15 checkTables() ; i f (agent_check_and_process(0) > 0) 17 checkActuators () ; decodedCAN dc ; 19 int ret va l = f c n t l ( fd [0] , F_SETFL , f c n t l ( fd [0] , F_GETFL) | O_NONBLOCK) ; r = read ( fd [0] , &dc , sizeof(decodedCAN) ) ; 21 i f (r>0 && dc . signals >=0){ /∗ Create checksum−>check and timestamp−>s ∗/ 23 for (int i = 0 ; i < dc . sign a ls ; i++) checkSamples ( signalname , dc . value [ i ] , dc . signals , s , check) ; 25 } } Listing 4.3: Final Sub-Agent code Unlike checkTables(), that is executed once per loop, checkActuators() is only executed whenever a SNMP message is received, while checkSamples() is only executed when a CAN message is successfully decoded. Once the parent process receives the decoded message it will, for every signal, traverse requestMonitoringDataTable looking for entries whose status is 1 (ON) that are recording this signal.
4.3. SNMP Agent 56 This was done by first obtaining the entry in mapTypeTable that requestMapID points to and then comparing its data source with the signal name. If they match the next step is to traverse samplesTable and check if this particular sample has already been added by comparing the requestMapID and checksum with the ones included in samplesTable, if an entry is found with both items matching then this sample has already been added to the system. If the sample has been found, the only thing we needed to do is update lastSampleID within requestMonitoringDataTable to the ID of this new sample and it’s entry in requestStatistics- DataTable, if it exists. Otherwise the sample will be added to samplesTable and then both requestControlDataTable, requestMonitoringDataTable and requestStatisticsDataTable, if it exists, will be updated. This is done to prevent repeat samples of being added to the system. For example this is the function that is used to check if a sample is already added to the system. /∗ This func tion w il l check i f a sample was already added to the ta bl e by comparing the checksum , i f i t e x i s t s i t s index w ill be returned ∗/ 2int checkSampleChecksum(char ∗checksum , unsigned long id ) { 4int res = 0 ; void ∗data ; 6netsnmp_iterator ∗it ; i t = CONTAINER_ITERATOR(cb . container ) ; 8i f (NULL == i t ) e x i t ; 10 for ( data = ITERATOR_FIRST( i t ) ; data ; data = ITERATOR_NEXT( i t ) ) { 12 samplesTable_context ∗samples = data ; i f (strcmp (checksum , samples−>sampleChecksum) == 0 && id == samples−> mapTypeSamplesID) 14 { res = samples−>sampleID ; 16 break ; } 18 } ITERATOR_RELEASE( i t ) ; 20 return res ; } Listing 4.4: Ensuring repeat samples are not added
4.3. SNMP Agent 57 On the other hand the function that adds a new entry to samplesTable looks like this. 1/∗ samplesStruct i s a s t r u c t si m il ar to samplesTables_context that i s used to aid in the creat ion of new en tr ie s ∗/ void insertSamplesRow( samplesStruct ∗req ) 3{ samplesTable_context ∗ctx ; 5netsnmp_index index ; oid index_oid [ 2] ; 7index_oid [0] = req−>sampleID ; index . oids = ( oid ∗)&index_oid ; 9index . len = 1 ; ctx = NULL; 11 /∗ Search for i t f i r s t . ∗/ ctx = CONTAINER_FIND( cb . container , &index ) ; 13 i f ( ! c tx ) { 15 // No dice . We add the new row ctx = samplesTable_create_row(&index , req ) ; 17 CONTAINER_INSERT(cb . container , ctx ) ; } 19 } Listing 4.5: Adding entries to a table Figure 23: How a signal is stored in the database
4.3. SNMP Agent 58 4.3.4 Saving Modes Another functionality that was added was that of saving modes. These are part of request- MonitoringDataTable and requestControlDataTable, as setting mode and commit mode respectively, and are used to determine which requests present in the system are to be saved in a cache file when the system is turned off. Once the shutdown procedure has begun, requestMonitoringDataTable will be traversed so as to delete all entries whose setting mode is set to ”Volatile”. Once such a request is found, it’s status will be changed to ”Delete” so that all remaining entries in the system are those with the setting mode as ”Permanent”. The remaining entries in requestMonitoringDataTable will then be stored in a cache file as well as the entries in requestControlDataTable, requestStatisticsDataTable and samplesTable that are in the system. This is done by first adding all those entries to the following struct which is then written to a file. 1/∗ s tatis t i c s Cache , controlCache and samplesCache are s imila r to monitoringCache ∗/ typedef s t r u c t monitoringCache 3{ requestMonitoringDataTable_context ∗∗items ; 5int current ; int capacity ; 7} monitoringCache ; typedef s t r u c t systemCache 9{ monitoringCache mc; 11 s t a t i s t i c s C a c h e sc ; controlCache cc ; 13 samplesCache rc ; } systemCache ; Listing 4.6: Cache struct On start-up, if a cache file is present, the contents of the file will be read and added back to the system.
4.4. Manager 65 4.4.6 Edit a request Much like ”View Request”, this functionality will also require the user to choose between already existing request on the system, which means it starts by sending a ”bulkget” message for the contents of requestMonitoringDataTable to the manager. Figure 30: Requests and the current contents of their editable columns After choosing what request to edit, the user will choose the column to be edited and input the new value. Finally, the manager will send the corresponding ”snmpset” message which if successfully validated will change the corresponding entry. As mentioned in 4.4.4, some columns can only be changed by the user on creation, some can only be edited after creation, while others can’t be changed by the user at all. When it comes to editing columns in a request, it was decided that the user should only be allowed to change 4 of them: • Saving Mode (0 or 1). • Loop Mode (1 or 2). • Max Number of Samples (>0). • Status (0 to 4). While for most of this columns validation is rather straightforward, meaning they only need to meet a simple condition, when it comes to the ”status” some other restrictions must be taken into account based on the current status of the request. For example, if the request status is ”ready” or ”set” it can be changed to ”on”, ”off” or ”delete”, while at the same time, if a request is ”off” it can only be be changed ”delete”. This is done due to the linked list nature of how samples are stored in the MIB and will prevent a requests’ status from going backwards in the sense that the proper path of all requests is set->ready->on->off->delete. If the input given by the user is found to be invalid, a new entry in errorTable will be created while the edit itself will be canceled.
4.4. Manager 66 4.4.7 View Active errors in the system This functionality will consist of sending bulkget commands to both errorDescriptionTable and errorTable since the former contains the descriptions of the error while the latter contains the error itself as well as a timestamp and the user who made the error in the first place. With the contents of these two tables we could now present the errors in a user friendly manner. Figure 31: Active Errors in the system 4.4.8 Send Command This final functionality will, quite simply, send a ”bulkget” message for the contents of commandTemplateTable and print all existing commands in an easy to understand manner. The user will then choose the command it wants to send and input the new value. Figure 32: Sending a command to the agent The manager will then create a new entry in commandTable by sending a ”snmpset” message containing the input given by the user and the template that was chosen so that the agent can validate, build and send the correct CAN message to the network. Figure 33: Confirmation that the agent sent the CAN message
4.5. Tests and Results 67 4.5 TESTS AND RESULTS With development complete the next step is to run a few baseline performance tests and compare them to already existing solutions, more specifically OBD-II. In this section, besides the aforementioned tests, the testing environment will also be presented and finally a discussion of the results will be made. 4.5.1 Testing Environment Since this is still just a prototype there’s no vehicle or OBU where this can solution can be tested in and as such the tests will be performed in an instance of Ubuntu 20.04.2 on VMWare Workstation 16 Pro, version 16.0.0 build-16894299, on Windows 10 Pro. System Specification (Available) Intel Core i5-4670 @3.4Ghz 4(2) Cores 16(8)GB DDR3 1600Mhz Any results obtained in this system won’t be totally conclusive of the performance in any OBU however it can prove that this solution has promise and is worth further development. When testing the simulator will write CAN messages from raw CAN log to a virtual CAN interface, which the sub agent will listening into. The manager will be used to create some requests and then view the results of those requests. When it comes to choosing what signal the system is going to record, a few statistics of the CAN logs were created so as to identify which ECU was transmitting more messages. ECU Number of Messages Percentage EEC1 19535 45.6% EEC2 3907 9.12% EEC3 3907 9.12% LFE 1954 4.56% PTO 1954 4.56% ... ... ... Table 22: Number of messages per ECU On all four raw CAN logs that were obtained to test this solution, the most active ECU was EEC1 and as such all requests will be on signals coming from that ECU.
4.5. Tests and Results 68 4.5.2 Testing Results There are four important metrics that are relevant when it comes to this solution: • How long does it take to execute a command. • How long does it take to decode a signal. • How long does it take to insert a sample in the system. • How long does it take a manager to get the results of a request. To measure time taken by any process, we can use clock() function which is available time.h. We can call the clock function at the beginning and end of the code for which we are measuring time, subtract the values, and then divide by CLOCKS_PER_SEC (the number of clock ticks per second) to get processor time, like following. clock_t s t a r t = clock () ; 2. . . /∗ Do the work . ∗/ clock_t end = clock () ; 4pr i n t f (”%f \n” ,( double) (end − s t a r t ) / CLOCKS_PER_SEC) ; Listing 4.9: Measuring Time Executing a command and decoding a message These two metrics were the simplest ones to measure since, to execute a command we only needed to measure how long it takes to run the function checkActuators(), while to decode we only needed to measure the time it takes to run the function decode(). After inserting the code above in the relevant parts of the program, some commands were added by the manager to the system and the time taken to run those commands were measured. On average, each command took around 80μs to execute. This result only takes into account how long the system takes to read the entry from the table, create a CAN message, transmit it and delete the entry from the system. While this functionality is still incomplete, and as such the result is fairly inconsequential, it can still give an idea of the possible performance of this solution. When it comes to decoding messages, the test consisted of running the simulator and subagent at the same time, measuring how long it took to decode each CAN message. which on average took around 30μs. Once again, while it’s not representative of real world performance these can be used to measure the validity of this solution, additionally one can expect that in-house decoders that are already in use by vehicle manufacturers are more efficient than the one than the one that was created for this phase of the project.
4.5. Tests and Results 69 Inserting a sample in the system To measure how long it takes to insert samples in the system two types of tests were run, one where there’s only one request in the system and another where there were several requests on the system. Since EEC1 is the most active ECU in the CAN logs that were used in these tests, the requests will all be made for signals of this particular ECU. For the test with a single request, the manager was used to make a request on the signal EngSpeed, which is part of EEC1. The time it took the system to add new entries to the MIB was then measured and printed out, giving the following results Figure 34: Inserting samples on a single request As can be seen above, outside of the first two entries, the amount of time it took to add entries to the MIB was between 50μs and 130μs. Next several requests were created on signals of EEC1, more specifically 10 requests were created by 2 different users on the same set of sensors (EngSpeed, ActualEngPercentTorque, EngTorqueMode, EngStarterMode, DriversDemandEngPercentTorque). Figure 35: Inserting samples on multiple requests Once again out of the 100+ samples that were added into the system, the longest it took was around 200μs while on average the results were similar to those obtained in the first, 90μs.
4.6. Summary 70 Obtaining samples from a table For these measurements the same tests as the section above were used, but this time the measurements were taken by measuring how long it took the manager to run the function bulkget() when attempting to view the results of a request. For a single request, containing 10 samples, it took around 20ms to obtain the results, while with 10 requests in the system, it took around 40 ms. It should be noted that with bulkget function that was developed for this phase of the project, it will return all entries of a table. Figure 36: Single request Figure 37: Multiple requests Comparing with OBD-II As it stands the results are rather one sided, while it must be mentioned that OBD-II was, as the name implies, originally intended to be used in diagnosing possible issues with a vehicle, the 20 query per second limit and accompanying slow refresh rate will impede its use with any sort of VANET application while the prototype presented above will only be limited by the computing power of the OBU and available bandwidth, since it’s wholly dependent on the ability of the agent to respond immediately to the requests of the manager, which the Standard does not ensure. Nevertheless, as per [44] and [45], the response times presented above are within margin for use in CACC (Cooperative Adaptive Cruise Control), ACC(Adaptive Cruise Control) and platooning applications. 4.6 SUMMARY In this chapter the various development steps of the prototype were presented, in addition to this the development of the tools that allow a CAN message to be sent, decoded and handled by the prototype was also presented alongside some code snippets and flowcharts for individual functions within the agent. The development of the manager was also presented, where each functionality, including the choice of security protocol, of this manager was explained and demonstrated as well. Finally, some metrics were measured so that this solution can be compared with the tools that are currently in use.
5 CONCLUSION With the ever closing introduction of VANETs, the realization that the protocols that are currently in use to obtain data from within a vehicle are wholly unsuitable for this new paradigm as come to the surface, since while those protocols and solutions are quite capable when used for their original purpose, they lack the performance required for future applications. This means that new unprecedented solutions need to be developed so that those new requirements are met and with this work a solution that does just that has been presented. That is an agnostic and modular architecture that allows the development of cooperative ITS applications. This work proves that SNMP can indeed be used to monitor vehicular sensors while also allowing some degree of control over a vehicle via its actuators. This solution provides the basis through which any application that may require access to real-time sensor data or direct access to actuators, so as to change their states in real time, can be developed around, while also being an agnostic and modular architecture that allows the development of cooperative ITS applications. Additionally, it can also provide the same functionalities whose requirements are already met by standards like OBD-II without requiring the customer or manufacturer to use specialized hardware. Since this solution is based on SNMP, a manufacturer would only need to integrate an SNMP sub-agent like the one developed for this project in the OBU as well as installing applications that integrate an SNMP manager, for example in the local vehicle system (outside the OBU). After setting up the agent and manager, the only requirement left would be an ITS application, developed by the manufacturer or a third party, to handle the communication between the different entities within a VANET. From the results discussed in chapter 4 we can prove that, despite being an early prototype, the performance of this solution is a marked improvement over already existing solutions both in latency, number of sensors that can be queried at the same time and refresh rate of any of those queries, while using a proven and reliable protocol in the form of SNMPv3. Additionally, for certain use cases where authentication and privacyis not required, SNMPv2c can be used instead of SNMPv3 which will further improve the performance. With this, we can safely say that the objectives listed in chapter 1.2 and chapter 3 were met, since a MIB that can allow low level ITS functions implemented by the vehicles manufacturer and is transparent to the chosen electronic communication bus was successfully created. Ad- 71
72 ditionally, a prototype SNMP agent and manager, and accompanying decoder/ generator, that allow for the creation of monitoring requests and commands to the network were also developed to test the validity of this project. FUTURE WORK This being said, the present work it still just a prototype and as such it can still be improved on multiple fronts before being deployed. These range from overall stability and performance improvements to refinement of the presented solution, for example when it comes to how this solution changes the state of actuators. One such improvement is that of the decoder, since the current decoder being used lacks the ability to decode messages from protocols other than CAN2.0B and more specifically data frames. As such, the decoder should be refined so that it supports all kinds of CAN frames from all CAN protocols, or its competitors. The main focus should be to make it compatible with CANFD. Alternatively in-house decoders made by the manufacturer should be used instead of a custom decoder since those will already be capable of achieving the same results with optimum performance. For security reasons it might be wise to limit the access of certain sensors/actuators based on who the user is since currently there’s no such method in place, additionally the current method of obtaining the username of the manager that made a request relies too much on that manager inserting the right name, ideally the username should be obtained by the agent when the packet arrives, this username can be the IP address or SNMPv2 Community string/SNMPv3 User Name. This will most likely require converting the current sub agent based solution to an custom SNMP agent. Some new SNMP primitives should be created similar to SNMP traps so that when a trap is triggered, it would transmit it in broadcast mode to all relevant entities. Additionally if two entities made a request on the same sensor, instead of the source vehicle transmitting the stored data individually to each of those entities it should transmit it in broadcast mode similar to what CAN protocol already uses since it would lower the bandwidth being used. A new primitive similar to ”bulkget” should also be created so that it only returns samples related to a specific sensor or request, since currently, it will transmit all data in a table which decreases performance. Finally, some real world tests should also be performed to validate this solution since the tests performed and presented in this document were done in a computer with performance that does not represent real world capabilities of OBU.
REFERENCES [1] O’Reilly Douglas Mauro, Kevin Schmidt. Essential SNMP. O’Reilly, 2 edition, 2003. [2] G. Mohinisudhan, Sahana K. Bhosale, and Bharat S. Chaudhari. Reliable On-board and Remote Vehicular Network Management for Hybrid Automobiles. In 2006 IEEE Conference on Electric and Hybrid Vehicles, pages 1–4, 2006. doi: 10.1109/ICEHV.2006.352284. [3] Joao AFF Dias, Joel JPC Rodrigues, Vasco NGJ Soares, João MLP Caldeira, Valery Korotaev, and Mario L Proença. Network management and monitoring solutions for vehicular networks: a survey. Electronics, 9(5):853, 2020. [4] Ishak Aris, Mohamad Fauzi Zakaria, S. Bashi, and R Sidek. Development of OBD-II Driver Information System. In International Engineering Convention, Jeddah, Saudi Arabia, March 2007. [5] ISO 15031-5:2015. Road vehicles — Communication between vehicle and external equipment for emissions-related diagnostics — Part 5: Emissions-related diagnostic services. Standard, International Organization for Standardization, Geneva, CH, 2015. [6] How fast can OBD-II data update. https://customer.cradlepoint.com/s/article/What- Is-the-Maximum-Refresh-Interval-for-OBD2, . Accessed:17/10/2021. [7] OBD Knowledge Sampling Rate. http://www.mx.innova.com/en-US/TechnicalInfo/ OBDKnowledge, . Accessed:30/10/2021. [8] Wilfried Voss. A comprehensible guide to J1939. Copperhill Technologies Corporation, 2008. [9] Bruno Dias, Alexandre Santos, António Costa, Bruno Ribeiro, Fabio Goncalves, Joaquim Macedo, Maria Nicolau, Oscar Gama, and Susana Sousa. Agnostic and Modular Architecture for the Development of Cooperative ITS Applications. Journal of Communications Software and Systems, 14:218–227, 09 2018. doi: 10.24138/jcomss.v14i3.550. [10] Keith McCord. Automotive Diagnostic Systems: Understanding OBD I and OBD II. CarTech Inc, 2011. [11] Wilfried Voss. A comprehensible guide to controller area network. Copperhill Media, 2008. [12] SolarWinds. A guide to understanding SNMP. In A guide to understanding SNMP, 2013. [13] Cisco Systems. Introduction to SNMP and MIB. 2004. [14] Nick Urbanik. The Structure of Management Information (SMI). 73
REFERENCES 74 [15] SNMP Version 3 (SNMPv3) Message Format. http://www.tcpipguide.com/free/t_ SNMPVersion3SNMPv3MessageFormat.htm. Accessed:24-12-2020. [16] Dr. Marshall T. Rose and Keith McCloghrie. Structure and identification of management information for TCP/IP-based internets. RFC 1155, May 1990. [17] SNMP MIB. https://docs.oracle.com/cd/E13203_01/tuxedo/tux90/snmpmref/1tmib. htm, . Accessed:24/12/2021. [18] On-board diagnostics. https://en.wikipedia.org/wiki/On-board_diagnostics, . Accessed:12-12-2020. [19] Aastha Yadav, Gaurav Bose, Radhika Bhange, Karan Kapoor, N Ch Sriman Narayana Iyenger, and Ronnie Caytiles. Security, Vulnerability and Protection of Vehicular Onboard Diagnostics. International Journal of Security and Its Applications, 10:405–422, 04 2016. doi: 10.14257/ijsia.2016.10.4.36. [20] Md Arafatur Rahman. Design of Wireless Sensor Network for Intra-vehicular Communications. 01 2014. [21] Steve Corrigan HPL. Introduction to the controller area network (can). Application Report SLOA101, pages 1–17, 2002. [22] Controller area networks and the protocol can for machine control systems. Mechatronics, 4 (2):159 – 172, 1994. ISSN 0957-4158. doi: https://doi.org/10.1016/0957-4158(94)90041-8. Special Issue Mechatronics in Sweden. [23] Simple intro to CAN bus. https://www.csselectronics.com/screen/page/simple-intro- to-can-bus/language/en. Accessed:24-11-2020. [24] CAN bus the central networking system of vehicles. https://premioinc.com/blogs/blog/ can-bus-the-central-networking-system-of-vehicles. Accessed:12-12-2020. [25] CAN bus serial protocol decoding. https://www.picoauto.com/library/picoscope/canbus-serial-protocol-decoding. Accessed:26-11-2020. [26] A survey of automotive networking applications and protocols. 2015. [27] Françoise Simonot-Lion Nicolas Navet. In-vehicle communication networks - a historical perspective and review. International Journal of Security and Its Applications, 09 2013. [28] Jun Huang, Mingli Zhao, Yide Zhou, and Cong-Cong Xing. In-vehicle networking: Protocols, challenges, and solutions. IEEE Network, 33(1):92–98, 2019. doi: 10.1109/MNET.2018. 1700448. [29] FlexRay Consortium. FlexRay Communications System Protocol Specification Version 3.0.1. In FlexRay Communications System Protocol Specification, 10 2020.
REFERENCES 81 192 STATUS current DESCRIPTION 194 ”” −− 1.3.6.1.3.8888.1.4.1.4 196 ::= { connectedVehiclesEntry 4 } 198 localOrRemote OBJECT−TYPE SYNTAX INTEGER 200 MAX−ACCESS read−only STATUS current 202 DESCRIPTION ”” 204 −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 1 . 4 . 1 . 5 ::= { connectedVehiclesEntry 5 } 206 c a p a b i l i t i e s OBJECT−TYPE 208 SYNTAX Unsigned32 (1..99999999) MAX−ACCESS read−only 210 STATUS current DESCRIPTION 212 ”” −− 1.3.6.1.3.8888.1.4.1.6 214 ::= { connectedVehiclesEntry 6 } 216 sysOBUDateandTime OBJECT−TYPE SYNTAX OBUDateandTime 218 MAX−ACCESS read−only STATUS current 220 DESCRIPTION ”” 222 −− 1.3.6.1.3.8888.1.5 ::= { systemOBUGroup 5 } 224 sysOBUNMonRequest OBJECT−TYPE 226 SYNTAX Unsigned32 (1..99999999) MAX−ACCESS read−only 228 STATUS current DESCRIPTION 230 ”” −− 1.3.6.1.3.8888.1.6 232 ::= { systemOBUGroup 6 } 234 sysOBUNEventRequest OBJECT−TYPE SYNTAX Unsigned32 (1..99999999) 236 MAX−ACCESS read−only STATUS current 238 DESCRIPTION ”” 240 −− 1.3.6.1.3.8888.1.7 ::= { systemOBUGroup 7 }
REFERENCES 82 242 sysOBUNConfRequest OBJECT−TYPE 244 SYNTAX Unsigned32 (1..99999999) MAX−ACCESS read−only 246 STATUS current DESCRIPTION 248 ”” −− 1.3.6.1.3.8888.1.8 250 ::= { systemOBUGroup 8 } 252 sysOBUNErrors OBJECT−TYPE SYNTAX Unsigned32 (1..99999999) 254 MAX−ACCESS read−only STATUS current 256 DESCRIPTION ”” 258 −− 1.3.6.1.3.8888.1.9 ::= { systemOBUGroup 9 } 260 sysOBUVehicleID OBJECT−TYPE 262 SYNTAX OCTET STRING MAX−ACCESS read−only 264 STATUS current DESCRIPTION 266 ”” −− 1.3.6.1.3.8888.1.10 268 ::= { systemOBUGroup 10 } 270 sysOBUDistanceType OBJECT−TYPE SYNTAX INTEGER 272 MAX−ACCESS read−only STATUS current 274 DESCRIPTION ”” 276 −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 1 . 1 1 ::= { systemOBUGroup 11 } 278 sysOBUTotalDistance OBJECT−TYPE 280 SYNTAX Unsigned32 (1..99999999) MAX−ACCESS read−only 282 STATUS current DESCRIPTION 284 ”” −− 1.3.6.1.3.8888.1.12 286 ::= { systemOBUGroup 12 } 288 sysOBUCountry OBJECT−TYPE SYNTAX INTEGER 290 MAX−ACCESS read−only STATUS current
REFERENCES 83 292 DESCRIPTION ”” 294 −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 1 . 1 3 ::= { systemOBUGroup 13 } 296 sensorGroup OBJECT−GROUP 298 OBJECTS { numberOfRequests , 300 requestID , requestMapID , 302 requestMonControlID , savingMode , 304 samplingFrequency , maxDelay , 306 startTime , endTime , 308 waitTime , durationTime , 310 expireTime , lastSampleID , 312 loopMode , nOfSamples , 314 status , requestUser , 316 numberOfRequestsControl , requestControlID , 318 requestControlMapID , settingMode , 320 commitTime , endControlTime , 322 durationControlTime , expireControlTime , 324 valuesTableID , statusControl , 326 numberOfRequestsStatistics , statisticsID , 328 durationTimeStatistics , nOfSamplesStatistics , 330 minValue , maxValue , 332 avgValue , numberOfSamples , 334 sampleID , requestSampleID , 336 timeStamp , sampleFrequency , 338 previousSampleID , numberOfMapTypes , 340 mapTypeID , proprietaryTypeID ,
REFERENCES 84 342 genericMapTypeID , sampleUnitMapID , 344 precision , maxMapDelay , 346 maxSamplingFrequency , interfaceSource , 348 dataSource , numberOfGenericTypes , 350 genericTypeID , typeDescription , 352 numberOfSampleUnits , sampleUnitID , 354 unitDescription , sampleRecordedValue , 356 sampleType , mapTypeSamplesID , 358 maxNOfSamples , requestStatisticsID , 360 sampleCheckSum } STATUS current 362 DESCRIPTION ”This group includes a l l o bj ect s rel ated to sensor data r e t r i e v a l ” 364 −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 2 −− ::= { obuMIB 2 } 366 numberOfRequests OBJECT−TYPE 368 SYNTAX INTEGER MAX−ACCESS read−only 370 STATUS current DESCRIPTION 372 ”” −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 2 . 1 374 ::= { sensorGroup 1 } 376 requestMonitoringDataTable OBJECT−TYPE SYNTAX SEQUENCE OF RequestMonitoringDataEntry 378 MAX−ACCESS not−acc e ss i bl e STATUS current 380 DESCRIPTION ”This t able wi ll l i s t a l l information regarding a requests on a s p e c i f i c object . ” 382 −− 1.3.6.1.3.8888.2.2 ::= { sensorGroup 2 } 384 requestMonitoringDataEntry OBJECT−TYPE 386 SYNTAX RequestMonitoringDataEntry MAX−ACCESS not−acc e ss i bl e 388 STATUS current DESCRIPTION ”” 390 INDEX {
REFERENCES 85 requestID } 392 −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 2 . 2 . 1 ::= { requestMonitoringDataTable 1 } 394 RequestMonitoringDataEntry ::= SEQUENCE { 396 requestID Unsigned32 , requestMonControlID Unsigned32 , 398 requestMapID Unsigned32 , r e q u e s t S t a t i s t i c s I D Unsigned32 , 400 savingMode INTEGER, samplingFrequency Unsigned32 , 402 maxDelay INTEGER, startTime OBUDateandTime , 404 endTime OBUDateandTime , waitTime OBUDateandTime , 406 durationTime OBUDateandTime , expireTime OBUDateandTime , 408 lastSampleID Unsigned32 , nOfSamples Counter32 , 410 maxNOfSamples Unsigned32 , loopMode INTEGER, 412 st a tus INTEGER, requestUser OCTET STRING} 414 requestID OBJECT−TYPE 416 SYNTAX Unsigned32 (1..99999999) MAX−ACCESS read−crea te 418 STATUS current DESCRIPTION 420 ”This o bj ec t w ill i de nt if y an individual request ” −− 1.3.6.1.3.8888.2.2.1.1 422 ::= { requestMonitoringDataEntry 1 } 424 requestMonControlID OBJECT−TYPE SYNTAX Unsigned32 426 MAX−ACCESS read−crea te STATUS current 428 DESCRIPTION ”This o bj ec t w ill i de nt if y the requestControlDataEntry re late d to a request ” 430 −− 1.3.6.1.3.8888.2.2.1.2 ::= { requestMonitoringDataEntry 2 } 432 requestMapID OBJECT−TYPE 434 SYNTAX Unsigned32 MAX−ACCESS read−crea te 436 STATUS current DESCRIPTION 438 ”This o bject will id en ti fy the mapTypeTable re lated to a requests ” −− 1.3.6.1.3.8888.2.2.1.3 440 ::= { requestMonitoringDataEntry 3 }
REFERENCES 86 442 r e q u e s t S t a t i s t i c s I D OBJECT−TYPE SYNTAX Unsigned32 444 MAX−ACCESS read−crea te STATUS current 446 DESCRIPTION ”This o b j e c t will id e n tif y the request S t a t isticsDat a E n try rela ted to a request ” 448 −− 1.3.6.1.3.8888.2.2.1.4 ::= { requestMonitoringDataEntry 4 } 450 savingMode OBJECT−TYPE 452 SYNTAX INTEGER { permanent(0) , 454 volatile(1) } MAX−ACCESS read−crea te 456 STATUS current DESCRIPTION 458 ”This o bj ec t w ill i de nt if y the mode in which a s p e c i f i c request w ill be saved ” −− 1.3.6.1.3.8888.2.2.1.5 460 ::= { requestMonitoringDataEntry 5 } 462 samplingFrequency OBJECT−TYPE SYNTAX Unsigned32 464 MAX−ACCESS read−crea te STATUS current 466 DESCRIPTION ”This o b j e c t will sto re the sampling frequency” 468 −− 1.3.6.1.3.8888.2.2.1.6 ::= { requestMonitoringDataEntry 6 } 470 maxDelay OBJECT−TYPE 472 SYNTAX INTEGER MAX−ACCESS read−crea te 474 STATUS current DESCRIPTION 476 ”This o b j e c t will sto re the maximum delay allowed” −− 1.3.6.1.3.8888.2.2.1.7 478 ::= { requestMonitoringDataEntry 7 } 480 startTime OBJECT−TYPE SYNTAX OBUDateandTime 482 MAX−ACCESS read−crea te STATUS current 484 DESCRIPTION ”This o bj ect will store the s t a r t time of a ce rt ai n request ” 486 −− 1.3.6.1.3.8888.2.2.1.8 ::= { requestMonitoringDataEntry 8} 488
REFERENCES 87 endTime OBJECT−TYPE 490 SYNTAX OBUDateandTime MAX−ACCESS read−crea te 492 STATUS current DESCRIPTION 494 ”This o bj ec t w ill stor e the end time of a ce rtai n request ” −− 1.3.6.1.3.8888.2.2.1.9 496 ::= { requestMonitoringDataEntry 9 } 498 waitTime OBJECT−TYPE SYNTAX OBUDateandTime 500 MAX−ACCESS read−crea te STATUS current 502 DESCRIPTION ”This o bj ec t w ill stor e the wait time of a c er ta in request ” 504 −− 1.3.6.1.3.8888.2.2.1.10 −− ::= { requestMonitoringDataEntry 10 } 506 durationTime OBJECT−TYPE 508 SYNTAX OBUDateandTime MAX−ACCESS read−crea te 510 STATUS current DESCRIPTION 512 ”This o bj ec t w ill stor e the duration time of a ce rta in request ” −− 1.3.6.1.3.8888.2.2.1.11 514 ::= { requestMonitoringDataEntry 11} 516 expireTime OBJECT−TYPE SYNTAX OBUDateandTime 518 MAX−ACCESS read−crea te STATUS current 520 DESCRIPTION ”This o bj ec t w ill stor e the expire time of a c er tain request ” 522 −− 1.3.6.1.3.8888.2.2.1.12 ::= { requestMonitoringDataEntry 12} 524 lastSampleID OBJECT−TYPE 526 SYNTAX Unsigned32 MAX−ACCESS read−crea te 528 STATUS current DESCRIPTION 530 ”This o bject will stor e the ID of the l a s t sample to be recorded” −− 1.3.6.1.3.8888.2.2.1.13 532 ::= { requestMonitoringDataEntry 13 } 534 nOfSamples OBJECT−TYPE SYNTAX Counter32 536 MAX−ACCESS read−only STATUS current 538 DESCRIPTION
REFERENCES 88 ”This o bj ec t wil l st ore the t o t a l number of samples recorded” 540 −− 1.3.6.1.3.8888.2.2.1.14 ::= { requestMonitoringDataEntry 14 } 542 maxNOfSamples OBJECT−TYPE 544 SYNTAX Unsigned32 MAX−ACCESS read−crea te 546 STATUS current DESCRIPTION 548 ”This o b j e c t will sto re the max number of samples to be recorded for a request ” −− 1.3.6.1.3.8888.2.2.1.15 550 ::= { requestMonitoringDataEntry 15 } 552 loopMode OBJECT−TYPE SYNTAX INTEGER { 554 yes (1) , no(2) } 556 MAX−ACCESS read−only STATUS current 558 DESCRIPTION ”This o b j e c t will id e n tif y whether the request wi ll loop or not” 560 −− 1.3.6.1.3.8888.2.2.1.16 ::= { requestMonitoringDataEntry 16 } 562 st a tus OBJECT−TYPE 564 SYNTAX INTEGER { off (0) , 566 on(1) , se t (2) , 568 delete (3) , ready (4) } 570 MAX−ACCESS read−only STATUS current 572 DESCRIPTION ”This o bj ec t w ill i de nt if y the current s ta tus of a request ” 574 −− 1.3.6.1.3.8888.2.2.1.17 ::= { requestMonitoringDataEntry 17 } 576 requestUser OBJECT−TYPE 578 SYNTAX OCTET STRING MAX−ACCESS read−crea te 580 STATUS current DESCRIPTION 582 ”This o bj ec t w ill stor e the expire time of a c er tain request ” −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 2 . 2 . 1 . 1 8 584 ::= { requestMonitoringDataEntry 18} 586 numberOfRequestsControl OBJECT−TYPE SYNTAX INTEGER
REFERENCES 89 588 MAX−ACCESS read−only STATUS current 590 DESCRIPTION ”” 592 −− 1.3.6.1.3.8888.2.3 ::= { sensorGroup 3 } 594 requestControlDataTable OBJECT−TYPE 596 SYNTAX SEQUENCE OF RequestControlDataEntry MAX−ACCESS not−acc e ss i bl e 598 STATUS current DESCRIPTION 600 ”This tabl e i s used to i d e nti f y and store information regarding a l l requests on an object . ” −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 2 . 4 602 ::= { sensorGroup 4 } 604 requestControlDataEntry OBJECT−TYPE SYNTAX RequestControlDataEntry 606 MAX−ACCESS not−acc e ss i bl e STATUS current 608 DESCRIPTION ”” 610 INDEX { requestControlID } 612 −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 2 . 4 . 1 ::= { requestControlDataTable 1 } 614 RequestControlDataEntry ::= SEQUENCE { 616 requestControlID Unsigned32 , 618 requestControlMapID Unsigned32 , settingMode INTEGER, 620 commitTime OBUDateandTime , endControlTime OBUDateandTime , 622 durationControlTime OBUDateandTime , expireControlTime OBUDateandTime , 624 valuesTableID Unsigned32 , statusControl INTEGER } 626 requestControlID OBJECT−TYPE 628 SYNTAX Unsigned32 (1..99999999) MAX−ACCESS read−only 630 STATUS current DESCRIPTION 632 ”ID of a ce rtai n request ” −− 1.3.6.1.3.8888.2.4.1.1 634 ::= { requestControlDataEntry 1 } 636 requestControlMapID OBJECT−TYPE
REFERENCES 90 SYNTAX Unsigned32 638 MAX−ACCESS read−only STATUS current 640 DESCRIPTION ”This o b j e c t will id e n tif y the requestControlMapID related to a ce r t ain request ” 642 −− 1.3.6.1.3.8888.2.4.1.2 −− ::= { requestControlDataEntry 2 } 644 settingMode OBJECT−TYPE 646 SYNTAX INTEGER { permanent(0) , 648 volatile(1) } MAX−ACCESS read−only 650 STATUS current DESCRIPTION 652 ”This o bj ec t w ill i de nt if y the mode in which a s p e c i f i c request w ill be se t ” −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 2 . 4 . 1 . 3 −− 654 ::= { requestControlDataEntry 3 } 656 commitTime OBJECT−TYPE SYNTAX OBUDateandTime 658 MAX−ACCESS read−only STATUS current 660 DESCRIPTION ”This o bj ec t w ill stor e the commit time of a c er ta in request ” 662 −− 1.3.6.1.3.8888.2.4.1.4− − ::= { requestControlDataEntry 4 } 664 endControlTime OBJECT−TYPE 666 SYNTAX OBUDateandTime MAX−ACCESS read−only 668 STATUS current DESCRIPTION 670 ”This o bj ec t w ill stor e the end time of a ce rtai n request ” −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 2 . 4 . 1 . 5 −− 672 ::= { requestControlDataEntry 5 } 674 durationControlTime OBJECT−TYPE SYNTAX OBUDateandTime 676 MAX−ACCESS read−only STATUS current 678 DESCRIPTION ”This o bj ec t w ill stor e the duration time of a ce rta in request ” 680 −− 1.3.6.1.3.8888.2.4.1.6 −− ::= { requestControlDataEntry 6 } 682 expireControlTime OBJECT−TYPE 684 SYNTAX OBUDateandTime MAX−ACCESS read−only
REFERENCES 97 978 proprietaryTypeID OBJECT−TYPE SYNTAX Unsigned32 980 MAX−ACCESS read−only STATUS current 982 DESCRIPTION ”” −− 1.3.6.1.3.8888.2.10.1.2 984 ::= { mapTypeEntry 2 } 986 genericMapTypeID OBJECT−TYPE SYNTAX Unsigned32 988 MAX−ACCESS read−only STATUS current 990 DESCRIPTION ” This o b je ct w il l contain the generic type of data recorded , t h i s gener ic type of data i s stored on the genericTypesTable ” 992 −− 1.3.6.1.3.8888.2.10.1.3 ::= { mapTypeEntry 3 } 994 sampleUnitMapID OBJECT−TYPE 996 SYNTAX Unsigned32 MAX−ACCESS read−only 998 STATUS current DESCRIPTION 1000 ” This o b je ct w il l i d e nt i f y the unit in which samples are taken , t h i s unit i s stored on the sampleUnitsTable ” −− 1.3.6.1.3.8888.2.10.1.4 1002 ::= { mapTypeEntry 4 } 1004 precision OBJECT−TYPE SYNTAX INTEGER (0| 1..9999999) 1006 MAX−ACCESS read−only STATUS current 1008 DESCRIPTION ” This o bj e ct wi ll i d en t i fy the p re cis ion of a p ar t i c u la r sensor ” 1010 −− 1.3.6.1.3.8888.2.10.1.5 ::= { mapTypeEntry 5 } 1012 maxSamplingFrequency OBJECT−TYPE 1014 SYNTAX Unsigned32 MAX−ACCESS read−only 1016 STATUS current DESCRIPTION 1018 ”This o b j e c t will id e n tif y the maximum sampling frequency of a p ar t i cu l a r sensor” −− 1.3.6.1.3.8888.2.10.1.6 1020 ::= { mapTypeEntry 6 } 1022 maxMapDelay OBJECT−TYPE SYNTAX INTEGER 1024 MAX−ACCESS read−only
REFERENCES 98 STATUS current 1026 DESCRIPTION ”This o b j e c t will id e n tif y the maximum delay of a p a rt i c ul a r sensor ” 1028 −− 1.3.6.1.3.8888.2.10.1.7 ::= { mapTypeEntry 7 } 1030 dataSource OBJECT−TYPE 1032 SYNTAX OCTET STRING MAX−ACCESS read−only 1034 STATUS current DESCRIPTION 1036 ” This o bj e ct wi ll i d en t i fy the sensor , fo r example ’FMCW Sensor ’ ” −− 1.3.6.1.3.8888.2.10.1.8 1038 ::= { mapTypeEntry 8 } 1040 interfaceSource OBJECT−TYPE SYNTAX OCTET STRING 1042 MAX−ACCESS read−only STATUS current 1044 DESCRIPTION ” This o bj e ct wi ll i d en t i fy the i n t e r f a c e from which data i s being read , f or example ’CAN 2.0 ’ ” 1046 −− 1.3.6.1.3.8888.2.10.1.9 ::= { mapTypeEntry 9 } 1048 numberOfGenericTypes OBJECT−TYPE 1050 SYNTAX INTEGER MAX−ACCESS read−only 1052 STATUS current DESCRIPTION 1054 ”” −− 1.3.6.1.3.8888.2.11 1056 ::= { sensorGroup 11 } 1058 genericTypesTable OBJECT−TYPE SYNTAX SEQUENCE OF GenericTypesEntry 1060 MAX−ACCESS not−acc e ss i bl e STATUS current 1062 DESCRIPTION ”This tabl e will contain a generic description of the type of data a c e r tain sensor i s generating , for example : ’ Vehicle v el oc it y ’ . ” 1064 −− 1.3.6.1.3.8888.2.12 ::= { sensorGroup 12 } 1066 genericTypesEntry OBJECT−TYPE 1068 SYNTAX GenericTypesEntry MAX−ACCESS not−acc e ss i bl e 1070 STATUS current DESCRIPTION ”” 1072 INDEX {
REFERENCES 99 genericTypeID } 1074 −− 1.3.6.1.3.8888.2.11.1 ::= { genericTypesTable 1 } 1076 GenericTypesEntry ::= SEQUENCE { 1078 genericTypeID Unsigned32 , typeDescription OCTET STRING } 1080 genericTypeID OBJECT−TYPE 1082 SYNTAX Unsigned32 (1..99999999) MAX−ACCESS read−only 1084 STATUS current DESCRIPTION 1086 ”This o b j e c t will id e n ti f y a ce rtain type description ” −− 1.3.6.1.3.8888.2.11.1.1 1088 ::= { genericTypesEntry 1 } 1090 typeDescription OBJECT−TYPE SYNTAX OCTET STRING 1092 MAX−ACCESS read−only STATUS current 1094 DESCRIPTION ”This o b j e c t will contain generic information regarding the types of data that can be recorded” 1096 −− 1.3.6.1.3.8888.2.11.1.2 ::= { genericTypesEntry 2 } 1098 numberOfSampleUnits OBJECT−TYPE 1100 SYNTAX INTEGER MAX−ACCESS read−only 1102 STATUS current DESCRIPTION 1104 ”” −− 1.3.6.1.3.8888.2.13 1106 ::= { sensorGroup 13 } 1108 sampleUnitsTable OBJECT−TYPE SYNTAX SEQUENCE OF SampleUnitsEntry 1110 MAX−ACCESS not−acc e ss i bl e STATUS current 1112 DESCRIPTION ” This t ab le will contain the unit with which a sensor i s recording data , for example : ’Km/h ’ . 1114 This will define the coding algorithm for the Precision object on the mapTypeTable . ” −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 2 . 1 4 1116 ::= { sensorGroup 14 } 1118 sampleUnitsEntry OBJECT−TYPE SYNTAX SampleUnitsEntry
REFERENCES 100 1120 MAX−ACCESS not−acc e ss i bl e STATUS current 1122 DESCRIPTION ”” INDEX { 1124 sampleUnitID } −− 1.3.6.1.3.8888.2.14.1 1126 ::= { sampleUnitsTable 1 } 1128 SampleUnitsEntry ::= SEQUENCE { 1130 sampleUnitID Unsigned32 , unitDescription OCTET STRING } 1132 sampleUnitID OBJECT−TYPE 1134 SYNTAX Unsigned32 (1..99999999) MAX−ACCESS read−only 1136 STATUS current DESCRIPTION 1138 ”This o b j e c t will id e n ti f y a ce rtain unit description ” −− 1.3.6.1.3.8888.2.14.1.1 1140 ::= { sampleUnitsEntry 1 } 1142 unitDescription OBJECT−TYPE SYNTAX OCTET STRING 1144 MAX−ACCESS read−only STATUS current 1146 DESCRIPTION ” This o b je c t w il l contain the un its in which sensors record t h e i r data ” 1148 −− 1.3.6.1.3.8888.2.14.1.2 ::= { sampleUnitsEntry 2 } 1150 errorGroup OBJECT−GROUP 1152 OBJECTS { numberOfErrorDescriptions , 1154 numberOfErrors , errorID , 1156 errorTimeStamp , errorDescriptionID , 1158 errorDescrID , errorDescr , 1160 errorUser , errorExpireTime , 1162 errorCode } STATUS current 1164 DESCRIPTION ”This group includes a l l ob je c ts relat ed to errors ” 1166 −− 1.3.6.1.3.8888.3 −− ::= { obuMIB 3 } 1168 numberOfErrors OBJECT−TYPE
REFERENCES 101 1170 SYNTAX INTEGER MAX−ACCESS read−only 1172 STATUS current DESCRIPTION 1174 ”” −− 1.3.6.1.3.8888.3.1 1176 ::= { errorGroup 1 } 1178 errorTable OBJECT−TYPE SYNTAX SEQUENCE OF ErrorEntry 1180 MAX−ACCESS not−acc e ss i bl e STATUS current 1182 DESCRIPTION ”This tabl e will contain information regarding acti v e error codes . ” 1184 −− 1.3.6.1.3.8888.3.2 ::= { errorGroup 2 } 1186 errorEntry OBJECT−TYPE 1188 SYNTAX ErrorEntry MAX−ACCESS not−acc e ss i bl e 1190 STATUS current DESCRIPTION 1192 ”” INDEX { 1194 errorID } −− 1.3.6.1.3.8888.3.2.1 1196 ::= { errorTable 1 } 1198 ErrorEntry ::= SEQUENCE { 1200 errorID Unsigned32 , errorTimeStamp OBUDateandTime , 1202 errorDescriptionID Unsigned32 , errorUser OCTET STRING, 1204 errorExpireTime OCTET STRING } 1206 errorID OBJECT−TYPE SYNTAX Unsigned32 (1..99999999) 1208 MAX−ACCESS read−only STATUS current 1210 DESCRIPTION ”This o b j e c t will id en t i fy a l l currently a c tive reported error s ” 1212 −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 3 . 2 . 1 . 1 ::= { errorEntry 1 } 1214 errorTimeStamp OBJECT−TYPE 1216 SYNTAX OBUDateandTime MAX−ACCESS read−only 1218 STATUS current DESCRIPTION
REFERENCES 102 1220 ”This o b j e c t will sto re the time in which an error was f i r s t reported ” −− 1.3.6.1.3.8888.3.2.1.2 1222 ::= { errorEntry 2 } 1224 errorDescriptionID OBJECT−TYPE SYNTAX Unsigned32 1226 MAX−ACCESS read−only STATUS current 1228 DESCRIPTION ” This o b je ct w il l contain the de scr ipt ion of a c e r t ai n error , t h i s de scri ptio n i s stored on the errorD esc rip tionTable ” 1230 −− 1.3.6.1.3.8888.3.2.1.3 ::= { errorEntry 3 } 1232 errorUser OBJECT−TYPE 1234 SYNTAX OCTET STRING MAX−ACCESS read−only 1236 STATUS current DESCRIPTION 1238 ”This o b j e c t will be used to sto re the user whose actions triggered an error ” −− 1.3.6.1.3.8888.3.2.1.4 1240 ::= { errorEntry 4 } 1242 errorExpireTime OBJECT−TYPE SYNTAX OCTET STRING 1244 MAX−ACCESS read−only STATUS current 1246 DESCRIPTION ” This o b je ct wi ll be used with errorTimeStamp to de lete an erro r entry a f t e r the expire time has been passed” 1248 −− 1.3.6.1.3.8888.3.2.1.5 −− ::= { errorEntry 5 } 1250 numberOfErrorDescriptions OBJECT−TYPE 1252 SYNTAX INTEGER MAX−ACCESS read−only 1254 STATUS current DESCRIPTION 1256 ”” −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 3 . 3 1258 ::= { errorGroup 3 } 1260 errorDescriptionTable OBJECT−TYPE SYNTAX SEQUENCE OF ErrorDescriptionEntry 1262 MAX−ACCESS not−acc e ss i bl e STATUS current 1264 DESCRIPTION ”This ta b le will be used to sto re a l l possible errors , both ac tive or otherwise , and t h e i r de sc ri pt ion s . ” 1266 −− 1.3.6.1.3.8888.3.4
REFERENCES 103 ::= { errorGroup 4 } 1268 errorDescriptionEntry OBJECT−TYPE 1270 SYNTAX ErrorDescriptionEntry MAX−ACCESS not−acc e ss i bl e 1272 STATUS current DESCRIPTION 1274 ”” INDEX { 1276 errorDescrID } −− 1.3.6.1.3.8888.3.4.1 1278 ::= { errorDescriptionTable 1 } 1280 ErrorDescriptionEntry ::= SEQUENCE { 1282 errorDescrID Unsigned32 , errorDescr OCTET STRING, 1284 errorCode Unsigned32 } 1286 errorDescrID OBJECT−TYPE SYNTAX Unsigned32 (1..99999999) 1288 MAX−ACCESS read−only STATUS current 1290 DESCRIPTION ”This o b j e c t will id e n ti f y a ce rtain error description ” 1292 −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 3 . 4 . 1 . 1 ::= { errorDescriptionEntry 1 } 1294 errorDescr OBJECT−TYPE 1296 SYNTAX OCTET STRING MAX−ACCESS read−only 1298 STATUS current DESCRIPTION 1300 ”This o b j e c t will provide a generic description to the error being reported ” −− 1.3.6.1.3.8888.3.4.1.2 1302 ::= { errorDescriptionEntry 2 } 1304 errorCode OBJECT−TYPE SYNTAX Unsigned32 1306 MAX−ACCESS read−only STATUS current 1308 DESCRIPTION ”This o b j e c t will contain the current error code that was triggered by user action ” 1310 −− 1.3.6.1.3.8888.3.4.1.3 ::= { errorDescriptionEntry 3 } 1312 actuatorGroup OBJECT−GROUP 1314 OBJECTS { numberOfCommandTemplates ,
REFERENCES 104 1316 numberOfCommands , commandID, 1318 templateID , commandInput , 1320 commandUser , commandTemplateID , 1322 commandDescription , targetNode , 1324 commandTemplate } STATUS current 1326 DESCRIPTION ”This group includes a l l ob je c ts relat ed to actuators ” 1328 −− 1.3.6.1.3.8888.4 −− ::= { obuMIB 4 } 1330 numberOfCommandTemplates OBJECT−TYPE 1332 SYNTAX INTEGER MAX−ACCESS read−only 1334 STATUS current DESCRIPTION 1336 ”” −− 1.3.6.1.3.8888.4.1 1338 ::= { actuatorGroup 1 } 1340 commandTemplateTable OBJECT−TYPE SYNTAX SEQUENCE OF CommandTemplateEntry 1342 MAX−ACCESS not−acc e ss i bl e STATUS current 1344 DESCRIPTION ”This tabl e will contain CAN command templates to be used when ac tivat i n g / deactivating actuators ” 1346 −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 4 . 2 ::= { actuatorGroup 2 } 1348 commandTemplateEntry OBJECT−TYPE 1350 SYNTAX CommandTemplateEntry MAX−ACCESS not−acc e ss i bl e 1352 STATUS current DESCRIPTION ”” 1354 INDEX { commandTemplateID } 1356 −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 4 . 2 . 1 ::= { commandTemplateTable 1 } 1358 CommandTemplateEntry ::= SEQUENCE { 1360 commandTemplateID Unsigned32 , commandDescription OCTET STRING, 1362 targetNode OCTET STRING, commandTemplate OCTET STRING } 1364
REFERENCES 105 commandTemplateID OBJECT−TYPE 1366 SYNTAX Unsigned32 (1..99999999) MAX−ACCESS read−only 1368 STATUS current DESCRIPTION 1370 ”This o bj ec t w ill i de nt if y a s p e c i f i c command template ” −− 1.3.6.1.3.8888.4.2.1.1 −− 1372 ::= { commandTemplateEntry 1 } 1374 commandDescription OBJECT−TYPE SYNTAX OCTET STRING 1376 MAX−ACCESS read−only STATUS current 1378 DESCRIPTION ”This o b j e c t will sto re a short description of what a command does” 1380 −− 1.3.6.1.3.8888.4.2.1.2 −− ::= { commandTemplateEntry 2 } 1382 targetNode OBJECT−TYPE 1384 SYNTAX OCTET STRING MAX−ACCESS read−only 1386 STATUS current DESCRIPTION 1388 ”This o bj ec t wil l st ore the Node ID to which a command will be sent ” −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 4 . 2 . 1 . 3 −− 1390 ::= { commandTemplateEntry 3 } 1392 commandTemplate OBJECT−TYPE SYNTAX OCTET STRING 1394 MAX−ACCESS read−only STATUS current 1396 DESCRIPTION ”This o b j e c t will sto re a template of a command in hex . eg : FF FF FF ∗∗ ∗∗ FF FF FF , where ∗ in dicate where user input will be placed ” 1398 −− 1.3.6.1.3.8888.4.2.1.4 −− ::= { commandTemplateEntry 4 } 1400 numberOfCommands OBJECT−TYPE 1402 SYNTAX INTEGER MAX−ACCESS read−only 1404 STATUS current DESCRIPTION 1406 ”” −− 1.3.6.1.3.8888.4.3 1408 ::= { actuatorGroup 3 } 1410 commandTable OBJECT−TYPE SYNTAX SEQUENCE OF CommandEntry 1412 MAX−ACCESS not−acc e ss i bl e STATUS current
REFERENCES 106 1414 DESCRIPTION ”This tabl e will contain a l l commands that are to be sent into the CAN network” 1416 −− 1.3.6.1.3.8888.4.4 ::= { actuatorGroup 4 } 1418 commandEntry OBJECT−TYPE 1420 SYNTAX CommandEntry MAX−ACCESS not−acc e ss i bl e 1422 STATUS current DESCRIPTION ”” 1424 INDEX { commandID } 1426 −− 1.3.6.1.3.8888.4.4.1 ::= { commandTable 1 } 1428 CommandEntry ::= SEQUENCE { 1430 commandID Unsigned32 , 1432 templateID Unsigned32 , commandInput INTEGER, 1434 commandUser OCTET STRING} 1436 commandID OBJECT−TYPE SYNTAX Unsigned32 (1..99999999) 1438 MAX−ACCESS read−crea te STATUS current 1440 DESCRIPTION ”This o b j e c t will id e n tif y a ce r tain command” 1442 −− 1.3.6.1.3.8888.4.4.1.1 −− ::= { commandEntry 1 } 1444 templateID OBJECT−TYPE 1446 SYNTAX Unsigned32 MAX−ACCESS read−crea te 1448 STATUS current DESCRIPTION 1450 ”This o b j e c t will be used to st ore the ID of the commandTemplate to be used in t h i s command” −− 1.3.6.1.3.8888.4.4.1.2 −− 1452 ::= { commandEntry 2 } 1454 commandInput OBJECT−TYPE SYNTAX INTEGER 1456 MAX−ACCESS read−crea te STATUS current 1458 DESCRIPTION ”This o b j e c t will be used to store the user inputs that are to be used in the command” 1460 −− 1 . 3 . 6 . 1 . 3 . 8 8 8 8 . 4 . 4 . 1 . 3 −−