Using the CAN bus commands

The contents of this guide have been moved to our documentation website here.

This thread will remain open for discussion.


With the suggested command, I see :

peter26@Volvol V50 $ obd.query mode=01 pid=0C


  Passed invalid arguments to obd.query: query() takes at least 1 argument (2


      Queries a given OBD command.

Error message doesn’t appear to make any sense.

Hi @plord

It does seem like there is an error with this function. Its been noted and will be fixed for the next release coming shortly.


Ah, thanks for the confirmation. I’ll re-try after the next update :slight_smile:

How can I understood what Protocol ID i need to use with my Mazda CX-5?
AutoPI are not able to automatically detect, how I can detect it?


Hi Matteo

What is the output of


in the web terminal?

If it is unable to detect the protocol, you will have to look up the protocol for your car yourself, but even if it can detect which one it is, you may still need to look up the other busses yourself, as the auto detect will only detect the first available bus - and you probably have access to more than one.

A quick google search found this:

Which suggests that it may be HS (31-36) and MS (51-54) - but this is just a quick guess.

Best regards

1 Like

I’m still struggling how this command works. Relating your example to the wikipedia page I presume this is requesting service 01 pid 0C - ie engine RPM ?

Can you also give an example of using the obd.query (or other) command to query a non-standard PID ?

Guessing a lot, I tried :

$  obd.query test pid=2101 force=True
_type: test
_stamp: '2018-11-29T20:01:29.786962'
value: |-

Is this a reasonable request ? How to decode the responses ?

Also, is there some advice how to initially explore the car - obd.dump returns nothing in my Kona Electric, but can we query a range of non-standard PID’s or at least find what non-standard PID’s are available ?

Many thanks.

Hi Malte
I did a google search but I couldn’t find anything for my Volvo V60 2015!!
What do you suggest?!

I have a problem with CAN analyzer. The recording time is too short I meat the time between 2 beeps!! I have increased the recording time from 2 sec to 30 sec but it is still too short🤭. It’s a little bit hard to perform that action I need between 2 beeps!! Is there something which can help me??

Hey Alex

When you say the recording time is too short, you mean that you’d like the be able to increase the recording time? - Or do you mean that the time between the beeps is shorter than the configured duration?

If the issue is that you’d like to record for more than 30 seconds, which is the current max in the UI, then you can do the following.

The Can Analyzer section on uses the following commands behind the scenes.
And you can execute the same commands via the terminal on, where you can set the duration to whatever you like.

obd.dump will do the actual recording and dump the file to a default directory.

obd.recordings will list the recordings in the default directory

Best regards

I ment time between 2 beeps are too short maybe half a second. I can not perform that command which I need to record it.

Hi Alex

Ah okay - It sounds like an error is occurring causing it to stop recording.
Do you see any errors in the UI when this happens?

Also, can you take a look in the log of the device? specifically the last_errors might be interesting.

You can send the log to they should be able to tell you the cause, when looking into the log.

Best regards

I have now tryed repeadely to use CAN Analyzer.
Recording :+1: seems to be working.
But when i try to play it, i se no action.

i hav tryed to use some of thes commands you are talking about in the therminal,
but still no respond.

Is ther a simple way to send commands?

I am trying out with a lock the car.
i an searching for a way “just” to make the light blink, like when i lock it.

1 Like

I have the same problem!!

1 Like


What type of issue do you see?

The Cloud basically just runs the AutoPi core commands for you, so you always have the possiblity to do it manually.

To list the current recordings, use the obd.recordings command:

To replay an entire recording, use the command:

To replay a single command, use the obd.send command:


What was your progress in locking and unlocking your doors with AutoPi?

Still no luch getting the communication working!

1 Like

I also tried to record some commands on my 2015 BMW F10. Although I can read the RPM and SPEED and other parameters using protocol=6 and baudrate=500000, whenever I try obd.dump I get “CAN sending or receiving failed”.

Looking into the syslog I see there is an exception in in line 610 which at first glance leads me to believe either there is an issue with the protocol and baudrate mentioned above or I am seriously missing something!

Also tried from the cloud GUI. All I get is toasters that the recording has started and immediately stopped. My guess is the issue is the same, just that the actual exception is not being propagated to the UI.

Any clues? :slight_smile:

I have exactly the same problem. With an BMW F11.