elm327 and OBD II PID specification - obd-ii

i plugged elm327 mini(bluetooth) to my car(peugeot 3008)
when i have tested some commands, i found not ordinary response.
ATZ
ELM327 v2.1
ATSP0
OK
ATDP0
ISO 15765-4 (CAN 11/500)
ATE0
OK
ATL0
OK
0100
SEARCHING...\r4100983BA011\r1: 06410080000010\r\r>
by OBD-II PIDs, i thought "0100" means "PIDs support[01-20]" and return 4 data bytes. but i received more than 4 bytes (multi-line like CAN style was displayed)
does OBD-II specification is wrong? or i am missing something?
p.s "0101" also returns more than 4 data bytes (using multiline)
410100040000\r1: 0641010006E000\r2: 0041010006E000\r3: 0041010006E000\r4: 03618D6106E000\r\r>

You are getting responses from multiple ECUs
If you want to get their addresses then do
ath1
0100
ath1 turn on header, 0100 queries for a resonse
you will get the response like:
7E8064100983BA011
7E906410080000010
the first one (7E8) is from the engine, the 2nd (7E9) is from the transmission.
If you just want to hear from the engine alone run
atsh7e0
for transmission, if available do
atsh7e1

Your vehicle or OBD simulator has returned responses from two possible ECUs. The "4100983BA011" is from the first and "410080000010" from the second.
Send the command again, but use ATH1 before sending 0100 and you will see the CAN ID of the source addresses of the ECUs sending their responses to your diagnostics tool.

Related

Looking for an example of a OBD-II complete data frame

I'm developing an OBD-II reader where I want to query requests to read PID parameters with a stm32 processor. I already understand what should go on the data field, but the ID is giving me a headache. As I have read, one must send 0x7DF to broadcast a request, and each ECU will respond with his own ID. However, I have been asked to do this within the SAE J1939 protocol, which uses the 29 bit extended identifier, and I don't know what I need to add to this ID.
As I stated in the title, could someone show me some actual data from a bus using this method? I've been searching on the internet for real frames but did not have any luck so far.
I woud also appreciate if someone could shred some light to if the OBD-II communication needs some acknowledgment to work properly.
Thanks
I would suggest you to take a look on the SAE J1939 documentation, in the more specifically on the J1939/21,J1939-71 and J1939/73.
Generally, a J1939 transport protocol response sequence can be processed as follows:
Identify the BAM frame, indicating a new sequence being initiated
(via the PGN 60416 - 0xEC00 can be reach by 0x1CECFF00 )
Extract the J1939 PGN from bytes 6-8 of the BAM payload to use as the
identifier of the new frame
Construct the new data payload by concatenating bytes 2-8 of the data
transfer frames (i.e. excl. the 1st byte)
A J1939 data transfer messages with ID 1CEBFF00 (PGN 60160 or EB00).
Above, the last 3 bytes of the BAM equal E3FE00. When reordered, these equal the PGN FEE3 aka Engine Configuration 1 (EC1). Further, the payload is found by combining the the first 39 bytes across the 6 data transfer packets/fram
The administrative control device or any device issuing the vehicle use status PID should be sensitive to the run switch status (SPN 3046 - 0xFDC0 which probably can be reach by 0xCFDC000) and any other locally defined criteria for authorized use (i.e., driver log-ons) before the vehicle use status PID is used to generate an unauthorized use alarm.
Also, you can't forget to uses a read/send to extend ID message, since that is a 24-bit.
In fact, i will suggest you to use can-utils to make your a analyses even easier. A simple can-dump or can-sniffer you can see what is coming on your broadcast.
Some car's dbc https://github.com/commaai/opendbc

EMV card & APDU command to get the track 2

I trying to get the PAN from my card. I read a lot of topic about that, but I still understand :'(
I understand I have to find the AID I tried :
00A404000E315041592E5359532E4444463031
Thats works, but I don't really get some interesting informations ... If I correctly understand I have to find the 94 Application File Locator (AFL) (16 Byte) to be able to read the data...
Do i have to try another AID until I find the AFL ?
Thanks
Track2(tag 57) is usually returned in in response to READ RECORDs. To issue READ RECORDs you need to get the AFL first. AFL is returned in response to GET PO.
In VISA contactless you will get track in GET PO itself and you will get AFL only if ODA is required.

Jmeter Variable from CSV

I am running a Jmeter Test Plan with an HTTP Request, to test the performance of a web service.
In my test, I need a variable named REF to be changed in the body data of my HTTP Request.
REF can have 3000 values. So I have created a CSV file with all these 3000 values, a CSV Data Set Config, and a parameter in Jmeter named REF, and I use it in my HTTP Request like that :
<measure>
<measureRef id="${REF}"></measureRef>
<measureTime>${__time(yyyy-MM-dd'T'HH:mm:ss)}</measureTime>
<measureVal>
<value>${__Random(1,100,)}</value>
</measureVal>
</measure>
As you can see it in this XML, I use the functions time and Random of Jmeter to have different requests everytime I run the test plan.
I would like yo run the test plan automatically for all the 3000 values of REF. To do that, I tried to configure the thread group like this : Number of Threads = 3000 and Loop Control = 1.
The problem is that the test takes 3 minutes to be done. So I would like to know if there is another way to do. The thing is that I need the test to be done for all the differents 3000 values in my CSV, and I don't see another way to do. I tried to put another measure in my Body Data, like this :
<measure>
<measureRef id="${REF}"></measureRef>
<measureTime>${__time(yyyy-MM-dd'T'HH:mm:ss)}</measureTime>
<measureVal>
<value>${__Random(1,100,)}</value>
</measureVal>
</measure>
<measure>
<measureRef id="${REF}"></measureRef>
<measureTime>${__time(yyyy-MM-dd'T'HH:mm:ss)}</measureTime>
<measureVal>
<value>${__Random(1,100,)}</value>
</measureVal>
</measure>
But the value of REF that is used this the same in the two measures, and what I want is to have different values picked in the CSV.
I also tried to configure the Thread Group like this : Number of Threads = 1 and Loop Control = 3000. But it's not working, I have a lot of errors...
I want the test to be runned quickly because to test my web service, I'd like to inject the 3000 values every 1 minute (by using a Flow Control Action maybe). And if the test runs in 3 minutes, I would be too long, and all the values would not be tested...
Thank you for your help !
If you are using 2 data in 1 request then you can use max 1500 virtual users if you are not repeating your data.
If it is fine then add 2 columns in csv file like REF1 and REF2 and each column will have 1500 data. Then you can use ${REF1} and ${REF2} in your requests.
If it takes you 3 minutes to add 3000 values with 3000 users and you need this to be done in 1 minute I can think of 2 possible causes:
Your application cannot process the requests faster. You can try increasing number of threads i.e. to 9000 in the Thread Group and see whether it helps or not. If you still have this 3 minutes processing time - it's your application to blame
JMeter is not capable of sending requests fast enough.
First of all make sure to follow JMeter Best Practices
Then make sure to monitor the health of the machine where JMeter is running using i.e. JMeter PerfMon Plugin as JMeter must have enough headroom to operate
If a single machine cannot produce 3000 requests per minute - you will have to go for Distributed Testing

Smtp status codes numeric and numeric dotted codes meanings

I'm new to smtp.
Sometimes I receive from severs headers like the following:
smtp; 550 5.1.1
Now I would like to understand the code, but Iack some specific terms to find out documentation.
How are called the first class of codes, (the ones composed by three digits) ?
How are called the second class ones, the ones composed by dots and digit?
Where Can I find specific docs for them, or chapter of smtp protocol referencing them?
Reply code and status code.
EG. 550 -> reply code 5.1.1 -> status code
This resource is quite explaining as well:
https://support.google.com/a/answer/3221692?hl=en

jmeter several http request reading from one csv data set config

Is it posible to have several http request read from one csv data set config?
I whant to make http request 1 to read from line 1 to 50 and http request 2 read from line 51 to 100 from the .csv file, and so on. Is this posible? or do i ahve to make more small csv files and more csv data set config.
Yes it is possible but generally not recommended. It will be much easier if smaller CSV's are used. Nevertheless you can make following changes for doing it through CSV data set config: -
Configure "Recycle on EOF" to False.
Configure "Stop thread on EOF" to False.
Sharing mode to "All threads".
Place HTTP requests in different thread group and set total number of threads to desired value. In your case the value for 1st and 2nd thread group should be 50. Also make sure that two thread groups does not start at same time. Add a startup delay for 2nd thread group.