How to decipher CAN bus message? - can-bus

I want to to know is it possible to make a script that decipher and document CAN
message.
My goal is to define which id of CAN bus message is related to speedometer, odometer, Engine RPM etc.

You cannot know this without knowing the nature of the application layer protocol. CAN is just the lowest levels of the OSI model, it doesn't define anything related to data.

Related

What does ZCD segment refer to in HL7 message?

Does anyone know what ZCD may refer to? It is described as a segment with a link back to PreManage for the patient!
Can anyone please provide more details?
The Z segments (segments those begin with the letter "Z") are custom segments. Those are not defined in specifications. They vary from vendor to vendor. Vendor may publish a document explaining usage of segment. Two connected parties should know in advance and decide the usage by mutual understanding.
As those are custom, and if there is no way to know what data they contain, it may be safe to neglect them hoping the sender have not put critical data in it.
Please refer to this:
Z-segments can be inserted anywhere in the HL7 message. A popular approach is to place the Z-segment within a group of segments that contain similar information, such as insurance. Z-segments are also often placed at the end of the message. The advantage of doing so is that this placement prevents systems configured to parse “standard” HL7 format from requiring any configuration modifications in order to process the message. The application simply reads the segments in the order expected and then extracts the data from the Z-segment (if needed) via parser modifications.
Working with unexpected Z-segments
Sometimes systems may send unexpected Z-segments, whether or not they were part of the original specifications. Even if you are not interested in the data in the Z-segment, you may still (depending on its location) need to take the segment into account while testing and developing your interface.

Issue related to CAN protocol? do I need to use CAN?

We are building Electric Vehicle for Formula students competition, for communication protocol between modules we have to use CAN method. Do we need every module to know data from the other modules. For eg. we are using Micro-controller raspberry pi Pico to collect data from sensor and based on data perform action by same microcontroller itself. But CAN method says that data should be routed and shared in network where other receiver would collect. so one thing we thought was to use one microcontroller to collect data from all sensor and share data with CAN controller to another micro-controller to perform the action. But it is increase in complexity, and CAN was designed to reduce complexity. so I am confused how to apply CAN protocol. I am not getting when some data where it is collected can be used then why do we have to share. Or may be i am just going wrong so please help to clarify this concept. thank you.
CAN Bus and the upper layer protocols based on it (like CANopen) generally provide a messaging medium for publisher & subscriber pattern.
Publisher Nodes: They produce data and publish this data to the bus.
Sensor nodes are good examples of publisher nodes.
Subscriber Nodes: They subscribe to one or more data packages on the
bus and consume these data. For example, a motor driver may subscribe
to some speed command and drive the motor accordingly.
A node can both produce and consume data, acting as a publisher and a subscriber at the same time. For example, the main control unit in the car can read various sensor data from the bus, process them and publish command data for the actuator nodes (like motor drivers).
When using CAN Bus, instead of inventing your own protocol, it may be a better idea to use an existing protocol, like CANopen. I suggest you to read CiA 301 document which explains the fundamentals of CANopen. Even if you don't use it, it will give you some ideas.

Vehicle Can Bus Access

not really sure where to put this, so please direct me elsewhere is this is not a good fit for this question.
I am currently exploring car programming via the OBD2 port. I have been scouring the internet for a OBD2 solution that will allow me to read RAW CAN bus messaged from my car. So far I have not been able to find a software that lets me do this with a ELM327 adapter. Does anyone know if there is software available that can read these A.) with this adapter and B.) Actually show me RAW CAN messages?
So far I have only been able to see the OBD2 messages, but I would like to get under this layer. Any guidance here is greatly appreciated!
Thanks!
If your car is recent enough, you won't be able to get the "RAW CAN" traffic. Because behind the OBD port is a gateway that only relay SOME of the CAN messages.
You can still get those messages with your ELM but as this device is not made to be a CAN adaptator it can be tricky. You can find a lot of information here.
To get more information on what you can find on the CAN bus of the OBD port, you can read this article. It's a good way of having a first overview of the CAN bus in cars.
If you want to have access to the CAN traffic, you will have to do some soldering on your car's wires. Here is an article of what it can look like. WARNING : do not perform random stuff on your car, it can be as dangerous as expensive.

Implementing ospf topology collector

I need to implement a software module that is able to retrieve the topology of an autonomous system.
Looking at the various protocol that are implemented in Cisco routers i concluded that the only two alternatives to obtain topology are smnp and ospf.
The first one is a workaround and i don't want to use it, this leads to ospf.
I haven't found library in c, java and python that are usable; this one ( http://www.ospf.org/ )is probably the most complete but comes without documentation and i don't have enough time to analyze all the code.
So i found quagga that can implement a software ospf router; seems the perfect alternative since it can work with both real network and simulated network in gns3.
But it's possible to obtain the ospf routing table from quagga since everything is from command line?
This are my conclusions and doubts if someone can suggest something better or help me with the next step it would be appreciated since i'm stuck at the moment.
Use quagga's ospfclient feature. There is already an example provided in the ospfclient directory (see ospfclient.c) which will show you how to retrieve the LSA database from a quagga/ospfd instance. For this solution to work you need to attach a PC to one of your OSPF backbone routers and configure quagga/ospfd on it to successfully learn the routes then you start your ospfclient to retrieve any information you need.

how to find location with business name?

I am trying to build an iphone app that finds the location with business name.
For example, I want to annotate a restaurant and I want to find it with the name of restaurant. I was trying to use CLGeocoder, but it seems like geocoder does not help in this case. I am not sure what to do.. can anyone give me a hint about this?
Thank you
Google maps will take a business name and return location(s). It sounds like a webservice is what you're needing, you'll just have to think through the inputs, the outputs, and figure out how it all logically fits into your app.
"Business name" is info independent of the address and not available to CLGeocoder. For this you have to use an external service where business names are actually registered. I would suggest the Google Places API, but the search results will still be limited to those businesses registered to Google.
And yes, you will have to dirty your hands with "NSURL stuff", and process the results with "NSJSONSerialization stuff".
If you're happy to consider an SDK-based solution, Huq Industries offer exactly this as part of their Real-world Analytics platform. They've done a lot to address the problem of reliably relating device location to physical businesses accurately by combining location with other data including WiFi. You can get business events by business name, category and address.
Coverage is pretty global and it's mostly free. Check out the SDK repo on GitHub.
Disclaimer: I contributed to this.

Resources