CANBus Determining Network Baud Rate 自动速度检测

http://www.canbushack.com/blog/index.php?title=determining-network-baud-rate

Determining Network Baud Rate

So you found a CAN BUS to reverse engineer, but you don‘t know it‘s buad rate.

There are a couple to find it out.

One.

Go one-by-one through a possible list. 

CAN BUS baud rates tend to be of only certain baud rates.

I am not positive, but this most likely has to do with the common crystal speeds used in microprocessors.

The slower the crystal, the slower the bus speed.

So baud rates tend to be one of the following:

33,333 bps, 50 Kbps, 83,333 bps, 100 Kbps, 125 Kbps, 250 Kbps, 500 Kbps (Most common), 800 Kpbs, and 1,000 Kbps.

The last two being the least common as they suffer from reduce network length issues.

You will not find a baud rate that exceeds 1,000 Kbps as this violates the CAN BUS specification.

If I do not know the baud rate of the network that I wish to connect to,

I will typically go through this list and hope one works.

In some cases you may effectively decapitate the network by having the wrong baud rate set in your tool.

So make sure you are not switching baud rates while the vehicle is in motion!  This could cause undesired effects.

Two.

Use an osciliscope or logic analyzer. 

The foolproof way of measuring any serial data network such as CAN BUS is to use tool that can measure the one bit time.

Baud rate is simply the inverse of one bit time.

So if you can measure this, you simply take 1/(one bit time) in seconds and you have your baud rate.

The best location to find a single bit on CAN BUS is to look at the last transition.

This is typically the ACK bit (acknowledge). 

This is where receiving nodes send back a single bit to say that they properly received the frame.

This is always a bit by itself as the bit to the left is recessive as well as the bit to the right whereas it is dominate.

So it will stand out and you should have little trouble finding it.

So look to that last transition and mesure from on transition to the next and you should get something like 0.000002 seconds.

In this case you will simply take 1/0.000002 and you will get 500,000.

Thus the baud rate will be 500,000 Kbps.  Done!

具有can总线模块及自动速度检测的微控制器

一种用于初始化微控制器中的控制器区域网络CAN模块的方法,在所述方法中可提供以下步骤:

测量CAN信号的多个下降沿或上升沿之间的周期时间;

对所述周期时间进行排序;

确定所述经排序周期时间的相邻周期时间之间的差值;

对所述差值进行排序;

从所述经排序差值选择第一差值并从所述第一差值确定第一频率;

使用所述选定频率初始化所述CAN模块;

接收CAN信号帧;

确定是否发生错误;

如果发生错误,则选择下一频率并重复初始化所述CAN模块直到已发现有效的CAN频率为止。

CANBus Determining Network Baud Rate 自动速度检测,布布扣,bubuko.com

时间: 2024-10-23 06:03:43

CANBus Determining Network Baud Rate 自动速度检测的相关文章

Google官方网页载入速度检测工具PageSpeed Insights 使用教程

相信有接触前端开发的大神们都听说过Google官方的PageSpeed Tools,这个网页载入速度检测工具有在线版本也有一个 Chrome 扩展,叫PageSpeed Insights,在此之前,Jeff 了解的更多是雅虎的 Yslow .不过在Jeff 使用过 PageSpeed Insights 后,感觉更加容易上手--因为人家PageSpeed Insights 有中文!下面就介绍一下PageSpeed Insights. Google官方的PageSpeed Tools的两个版本 在线

性能调优之网络速度检测

Esri提供了一个使用简单的网络速度检测应用,能检测两台电脑直接进行数据包传输的平均速率.可以用于检测以下类似问题: 为何本地电脑ArcMap访问共享文件夹上的数据时特别慢. 为何ArcGIS Server使用共享文件夹上的数据进行服务发布时,服务响应特别慢. 该应用是一个使用JavaScript编写的应用,只需要部署在支持HTML的Web服务器上即可. 笔者使用了以下环境来部署: Tomcat 7 Windows Server 2008 部署完后,访问服务器Tomcat的应用地址(例如:192

Python实现Telnet自动连接检测密码

最近在学习Python网络相关编程,这个代码实现了Telnet自动连接检测root用户密码,密码取自密码本,一个一个检测密码是否匹配,直到匹配成功,屏幕输出停止. 代码如下: #encoding=utf-8 import telnetlib import time import sys import os def do_telnet(Host, Port, username, password, finish): #连接Telnet服务器 tn = telnetlib.Telnet(Host,

I.MX6 Linux Serial Baud Rate hacking

/******************************************************************************** * I.MX6 Linux Serial Baud Rate hacking * 声明: * 1. 本文的源代码来自:myzr_android4_2_2_1_1_0.tar.bz2: * 2. 本文的目的是为了知道I.MX6串口支持的波特率有哪些,最大是多大, * 并加以验证,因为IMX6DQRM_revC.pdf数据手册上说能达到5

自动更新.检测外部程序版本号.管理员权限.禁止多次启动.代码混淆

自动更新.启动a程序.检测b程序版本号.然后在服务器上上传下载.由于要控制别人程序.所以还要检测别人程序的版本号.不一致会发短信到开发人员 ICSharpCode.SharpZipLib.dll 解压缩工具 private string GetRequestDownFile(string url, string path)//HTTP下载 { try { // 设置参数 HttpWebRequest request = WebRequest.Create(url) as HttpWebReque

Java Web应用中自动实时检测资源文件内容变化

在Java Web应用中,我们经常需要配置文件来定制系统行为,这些配置文件可能包括:类路径下的文件和文件夹.非类路径下的绝对路径和相对路径的文件和文件夹,在分布式环境中,还需要通过HTTP从统一集中的Web服务器中获得配置信息,如何对这些配置信息进行自动加载并实时检测变化呢? Java分布式中文分词组件 - word分词已经实现了这个功能,我们看看是如何实现的: package org.apdplat.word.util; import java.io.BufferedReader; impor

从TP、FP、TN、FN到ROC曲线、miss rate、行人检测评估

想要在行人检测的evaluation阶段要计算miss rate,就要从True Positive Rate讲起:miss rate = 1 - true positive rate true positive rate毕竟是一个rate,是一个比值.是谁和谁比呢?P 要从TP.FP.TN.FN讲起. 考虑一个二分类问题:一个item,它实际值有0.1两种取值,即负例.正例:而二分类算法预测出来的结果,也只有0.1两种取值,即负例.正例.我们不考虑二分类算法细节,当作黑箱子就好:我们关心的是,预

Spring Framework之Bean的自动装配检测和AOP简述

注解可以充分利用Java的反射机制获取类结构信息,从而有效减少配置工作:注解与java代码位于同一个文件,便于对变动的统一维护: 1)      Spring容器默认禁用注解装配,因此使用注解装配之前需要在配置文件中显示打开注解装配: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"

Non-standard serial port baud rate setting

////combuad_recv.cpp #include <stdio.h> /*标准输入输出定义*/ #include <stdlib.h> /*标准函数库定义*/ #include <unistd.h> /*Unix 标准函数定义*/ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> /*文件控制定义*/ #include <termios.h&