Disable PID AT Command.

Inquiry and support for Freematics products
Post Reply
daniel.vilela
Posts: 15
Joined: Wed Nov 26, 2014 11:14 pm

Disable PID AT Command.

Post by daniel.vilela »

Well, newer version from the GUI have the DISABLE PID feature.
But i dont see it on the list of AT Commands.. and the GUI just use that..

So where is that documented?

And.. The emulator sends on initialization that it supports all PIDs.. That is wrong. Can you correct that?
Besides that.. Can we change this in AT Commands for PIDs not supported by the emulator?

Thx.
Daniel.
pillepallepeter
Posts: 4
Joined: Tue Nov 24, 2015 5:06 pm

Re: Disable PID AT Command.

Post by pillepallepeter »

function clearDTC()
{
if (!sendCommand("ATCLR DTC")) {
alert("Unable to clear DTC");
} else {
alert("DTC cleared successfully");
dtcCount = 0;
}
}



...ATCLR DTC
daniel.vilela
Posts: 15
Joined: Wed Nov 26, 2014 11:14 pm

Re: Disable PID AT Command.

Post by daniel.vilela »

Sorry, pillepallepeter, you misunderstood the question.

Disable PID is different than to Clear DTC. I am not working with DTCs.
I am working with Service $01 PIDs.

$01 PID 0x00 is a Support PID that shows me what PID are ENABLE and the ones that i will have an answer for a PID request.
I think in the GUI is this func.. i am not very sure:

function togglePID(pid, enabled)
{
var i = parseInt(pid, 16) & 0xff;
pidDisabled[i] = !enabled;
var specialPid = i & 0xE0;
var val = 0;
var vals = "";
var pidTmp = specialPid + 1;
for (m = 0; m < 4; m++) {
val = 0;
for (n = 1; n <= 8; n++) {
val <<= 1;
if (!pidDisabled[pidTmp++]) val |= 1;
}
vals += val.toString(16) + ",";
}
specialPid |= 0x100;
var cmd = "ATSET 0" + specialPid.toString(16) + "=" + vals.substr(0, vals.length - 1);
if (!sendCommand(cmd)) {
alert("Unable to set PID " + specialPid.toString(16));
return false;
} else {
alert("PID " + pid + " is " + (enabled ? "enabled" : "disabled"));
}
}


Daniel.
daniel.vilela
Posts: 15
Joined: Wed Nov 26, 2014 11:14 pm

Re: Disable PID AT Command.

Post by daniel.vilela »

I have already found it using a serial sniffer.

it goes like this:
000000: ATSET 0100=ff,ef,ff,ff
000001: OK

this is when i disabled Engine RPM.
For VIN is correctly documented.
Post Reply