Trouble working with One+ and EVs

Inquiry and support for Freematics products
Post Reply
Can_Bot
Posts: 6
Joined: Thu Mar 25, 2021 8:08 pm

Trouble working with One+ and EVs

Post by Can_Bot »

Hey,
I am working on a project involving Hyundai Kona electric and I would like to log SoC and other custom PIDs using the Freematics One+ (Model A). I've tried going through the whole forum and tried a couple of things like sending AT commands which work to an extent but nothing further than that. (The result is displayed on the bottom). I searched for the PIDs and have them from GitHub but the real problem is, I cannot connect to the OBD port or sniff any data. Been trying this for a couple of weeks now.
I do believe some of the users have successfully done this with other EVs as well. So any help would be appreciated. Thanks in advance.

Sending ATZ
ELM327 v1.5
>
Sending ATI
OBD2USART V1.6
>
Sending ATH0
OK
>
Sending ATRV
14.63V
>
Sending ATSP6
OK
>
Sending ATDP
ISO 15765-4 (CAN 11/500)
>
Sending ATCFC1
OK
>
Sending ATCM7FF
OK
>
Sending ATCF7EC
OK
>
Sending 2102
NO DATA
>
No DTC
stanley
Site Admin
Posts: 932
Joined: Sat Mar 01, 2014 3:15 am

Re: Trouble working with One+ and EVs

Post by stanley »

Only standard OBD PIDs (refer to wikipedia) are supported.
Alexandre
Posts: 1
Joined: Tue May 04, 2021 2:18 am

Re: Trouble working with One+ and EVs

Post by Alexandre »

Hi Can_Bot,
I think we are trying to achieve more or less the same thing, but for another EVs (Renault ZOE and Peugeot e-208).
I would like to query some custom PIDs from 22 mode just like you but so far even the can_sniffing code isn't working (I only get the "uart: UART driver already installed" message when connected to those vehicles).
I'm wondering how did you end up sending those messages and if possible, could you share the code you used ?
Thanks in advance
PS : I think the problems lies in the STM32 emulation of the ELM327. Maybe not all AT commands are supported, but since the source code of the STM32 chips seems closed source, I don't know if we're going to end up getting those custom PIDs. But I don't think it's an hardware issue.
Can_Bot
Posts: 6
Joined: Thu Mar 25, 2021 8:08 pm

Re: Trouble working with One+ and EVs

Post by Can_Bot »

stanley wrote: Thu May 06, 2021 8:59 am Only standard OBD PIDs (refer to wikipedia) are supported.
Thank you for the reply, Mr. Stanley. After going through the forum, I figured this is the problem.
Can_Bot
Posts: 6
Joined: Thu Mar 25, 2021 8:08 pm

Re: Trouble working with One+ and EVs

Post by Can_Bot »

Alexandre wrote: Tue May 18, 2021 6:33 pm Hi Can_Bot,
I think we are trying to achieve more or less the same thing, but for other EVs (Renault ZOE and Peugeot e-208).
I would like to query some custom PIDs from 22 modes just like you but so far even the can_sniffing code isn't working (I only get the "uart: UART driver already installed" message when connected to those vehicles).
I'm wondering how did you end up sending those messages and if possible, could you share the code you used?
Thanks in advance
PS: I think the problem lies in the STM32 emulation of the ELM327. Maybe not all AT commands are supported, but since the source code of the STM32 chips seems closed source, I don't know if we're going to end up getting those custom PIDs. But I don't think it's a hardware issue.
Hello Alexandre,
Excuse me for the late reply. I haven't been on the forum for a long time as I could not find any solution to the problem. I've had the same problems as you've mentioned as well. The EVs use custom PIDs. So you cannot get any data from them using the Freematics hardware. We ended up ordering the expensive AutoPi after reading reviews on the Hyundai Kona Forum (https://github.com/JejuSoul/OBD-PIDs-fo ... /issues/22). Here is my code anyway if you want to try. Hope it helps.

#include <FreematicsPlus.h>

FreematicsESP32 sys;
COBD obd;

void testATcommands()
{
static const char cmds[][15] = {"ATZ\r", "ATI\r", "ATH1\r", "ATS1\r", "ATSP6\r", "ATDP\r", "ATS1\r", "ATSH7E4\r", "ATM1\r"};
char buf[128];

for (byte i = 0; i < sizeof(cmds) / sizeof(cmds[0]); i++) {
const char *cmd = cmds;
Serial.print("Sending ");
Serial.println(cmd);
if ((sys.link)->sendCommand(cmd, buf, sizeof(buf),1000)) {
char *p = strstr(buf, cmd);
if (p)
p += strlen(cmd);
else
p = buf;
while (*p == '\r') p++;
while (*p) {
Serial.write(*p);
if (*p == '\r' && *(p + 1) != '\r')
Serial.write('\n');
p++;
}
Serial.println();
} else {
Serial.println("Timeout");
}
delay(1000);
}
Serial.println();
}

void setup()
{
// USB serial
Serial.begin(115200);

// initialize co-processor link
while (!sys.begin());
// initialize OBD library
obd.begin(sys.link);

// send some commands for testing and show response for debugging purpose
testATcommands();

Serial.print(" BATTERY:");
Serial.print(obd.getVoltage());
Serial.print('V');

Serial.print(" CPU TEMP:");
Serial.print(readChipTemperature());
Serial.println();

// start CAN bus sniffing
obd.sniff();
Serial.println("CAN sniffer started");

}
Post Reply