Showing posts with label HC-05. Show all posts
Showing posts with label HC-05. Show all posts

2016-04-24

Lanos K-Line ALDL Bluetooth adapter V2.0


The version described below is 2.0.

Download binary:  mega8_uart.hex


Apply hex:
sudo avrdude -c usbasp -p m8 -Uflash:w:mega8_uart.hex:a

Set fuses (4MHz int RC):
sudo avrdude -c usbasp -p m8 -U lfuse:w:0xe3:m -U hfuse:w:0xd9:m

HC-05 conf:
AT+CLASS?
>1f00
AT+CLASS=1
>OK  



Live demo with Delco Suite Android:
 

Debug:
Bluetooth:
sdptool browse local
sdptool add --channel=22 SP
sudo rfcomm listen /dev/rfcomm0 22  
cat /dev/rfcomm0
echo 'asdf' > /dev/rfcomm0 
echo -en '\xF4\x57\x01\x00\xB4\xF4\x92\x01\x07\x41\x00\x00\x00\x80\x81\x61\xF5\xF7\xFE\x19\x00\x69\x00\x00\xD8\x3F\x81\x79\x80\x00\x09\x5A\x5A\x00\x29\x19\x3B\x23\x00\x00\x00\x00\x20\x00\x04\x2A\x5B\x80\x00\x00\xCE\x00\x00\x00\x00\x80\x00\x08\x00\x01\x01\x00\x20\x06\x00\x00\xE4\x98\x52' > /dev/rfcomm0
Ref: How do I connect and send data to a bluetooth serial port on Linux? 
 
(src: mega8_uart.zip)
 


2015-07-03

K-Line Bluetooth adapter V.0.1

The version described below is 0.1.
Next version is 1.0 (ATmega8 5V 8MHz)




















Delco Suite (Daewoo Research, SensDiag, OpenDiagFree):
22:22:56.87  Write F4 57 01 00 B4
22:22:56.89  Read  F4 57 01 00 B4
22:22:56.97  Read  F4 92 01 07 41 00 00 00 80 81 61 F5 F7 FE 19 00 69 00 00 D8 3F 81 79 80 00 09 5A 5A 00 29 19 3B 23 00 00 00 00 20 00 04 2A 5B 80 00 00 CE 00 00 00 00 80 00 08 00 01 01 00 20 06 00 00 E4 98 52
ref: http://lanos.com.ua/forum/topic/58135-programma-dlya-raboty-s-ebu-gm-iefi6/page-40
 
echo -en '\xF4\x57\x01\x00\xB4\xF4\x92\x01\x07\x41\x00\x00\x00\x80\x81\x61\xF5\xF7\xFE\x19\x00\x69\x00\x00\xD8\x3F\x81\x79\x80\x00\x09\x5A\x5A\x00\x29\x19\x3B\x23\x00\x00\x00\x00\x20\x00\x04\x2A\x5B\x80\x00\x00\xCE\x00\x00\x00\x00\x80\x00\x08\x00\x01\x01\x00\x20\x06\x00\x00\xE4\x98\x52' >/dev/ttyUSB1

stty -F /dev/ttyUSB0 speed 9600 cs8 -cstopb -parenb -icanon min 1 time 1  
while read -rs -n 1 c; do echo $c | od -x; done < /dev/ttyUSB0

0000000 abf4 f480 000a
0000005
0000000 0aab
0000002
0000000 0a80
0000002



http://pcmhacking.net/forums/viewtopic.php?f=31&t=592
pl2303 custom baud

https://www.drive2.ru/l/3297671/
HobDrive?
http://vagcom.com.ua/programmy-dlya-lanos-sens-daewoo-chevrolet/

>244,86,1,181,
F4 56 01 B5
244 86 1 181

stty -F /dev/ttyUSB0 speed 9600 cs8 -cstopb -parenb -icanon min 1 time 1
while read -rs -n 1 c; do echo $c | xxd -p; done < /dev/ttyUSB0
echo -en 'A' > /dev/ttyUSB1  
echo -en '\x41' > /dev/ttyUSB1
while true; do cat -v < /dev/ttyUSB0; done
while true; do read -n 1 LINE < /dev/ttyUSB0; echo $LINE | xxd -p; done
 while read -rs -n 1 c; do echo $c | od -x; done < /dev/ttyUSB0

f4ab010a
b50a
7d0a
550a

http://www.oocities.org/ecmguy.geo/diagnostics/baud8192.html
The 8192 GM data format is asynchronous serial data the same as your PC is capable of processing, The 8192 baud rate is non-standard, but you can set the PC to a close enough so that the PC will accommodate the error.

GM started using the 8192 baud OBD-I interface in 1986 and continued using it widely until 1995 when a universal interface and protocol was mandated by SAE (OBD-II). The OBD-I interface on GM cars is a proprietary GM interface.

8192 (10400?)

M - K-Line
A - GND
H,G - +12V
















Soft&Manuals http://slavuta-club.info/forum/index.php?topic=11181


http://open.e-voron.dp.ua/usb_k_l_line_adapter/
http://open.e-voron.dp.ua/usb_k_l_line_adapter/


типовые параметры Ланос 1.5 на холостом ходу:

1 Идентификация калибровки 1857
2 Температура охлаждающей жидкости 95 °С
3 Температура воздуха 16 °С
4 Давление во впускном коллекторе 34,7 КПа
5 Атмосферное давление 99,9 КПа
6 Разрежение во впускном коллекторе 64,9 КПа
7 Напр. датч. полож. дроссельной заслонки 0,54 В
8 Частота вращения коленвала 825 об/мин
9 Выходное напряжение датчика кислорода 807 мВ
10 Скорость автомобиля 0 км/час
11 Выходное напряжение датчика кислорода 0 мВ
12 Давление кондиционера -128 КПа
13 Темп. наддува 59 °С
14 Напряжение бортсети (питания ЭБУ) 14,2 В
15 Регулировка CO (с разомкн. петлей) 128
16 Угол опережения зажигания 3,9 °пкв
17 Желаемое положение РДВ 25 шаг
18 Фактическое положение РДВ 25 шаг
19 Желаемая частота вращ. коленвала 831 об/мин
20 Длительность импульса впрыска 1,21 мс
21 Соотношение воздух/топливо 14,6
22 Обучение блока 120
23 Номер яч. памяти BLM, регулирующей подачу топлива 0
24 Переменная интегратора замкнутой петли топл. 128
25 Coolant temp. switch да
26 Высокая скорость вентилятора нет
27 Соленоид кондиционера нет
28 Низкая скорость вентилятора да
29 Выключатель кондиционера нет
30 Топливный насос да
31 Отсечка топлива нет
32 Флаг полевого обслуживания нет
33 Система впуска переменной геометрии нет
34 Соленоид продувки вкл. нет
35 Дроссель закрыт да
36 Отсечка топлива при торможении нет
37 Обр. связь по кислороду (1-замкнута, 0-разомкнута) да
38 Обучение разрешено да
39 Богатая/бедная смесь (1-богатая, 0-бедная) нет
40 Перегрев дожигателя нет
41 Холостой ход да
42 Низкие обороты да
43 Сброс перем. интегратора петли топл. нет
44 Запрос сброса РХХ нет
45 Сброс РХХ нет
46 Датчик O2 готов к работе да
47 Нейтральная передача нет
48 Кондиционер нет
49 Двигатель регулятора холостого хода нет
50 Запрос кондиционера от водителя нет
51 Запрос включения вентилятора нет
52 Октановое число 95

еще  https://yadi.sk/i/dF17ZJO5jMcUd




http://www.chiptuner.ru/content/kline
 

http://avtosxema.com/shema/321-samyy-prostenkiy-k-line-adapter-na-dvuh-tranzistorah.html


Check It 3.0 :

 
 
 






http://www.getchip.net/posts/adapter-usb-to-k-line-na-baze-atmega8-48-88/




http://www.drive2.ru/l/288230376152371443/#post

http://www.drive2.ru/l/993239/


https://www.drive2.ru/c/2032328/

https://www.drive2.ru/l/1426462/

2014-10-28

GSMIRRC: Configure Arduino + Bluetooth HC-05 Slave

How to connect Arduino to Bluetooth HC-05 module:


HC-05 is not visible for Android by default - because of "secure device class" of "1f00"
AT+CLASS? 1f00

We will set the Class to "1":
AT+CLASS=1

and the Role to "Slave"
AT+ROLE?
AT+ROLE=0


1.1. Connect Arduino to Bluetooth HC-05 according to the layout:


1.2. Do not supply the power yet

1.3. Connect the HC-05 "key" pin (1st pin from the left) to Arduino "VCC" pin


1.4. Power On HC-05 (connect Arduino to USB)


1.5.1  Connect on 38400, 8n1
or
1.5.2 Load the Arduino test sketch:

#include <SoftwareSerial.h>

SoftwareSerial BTSerial(5, 4); // RX | TX

void setup()
{
  Serial.begin(9600);
  Serial.println("Enter AT commands:");
  BTSerial.begin(38400);  // HC-05 default speed in AT command more

//38400?
}

void loop()
{

  // Keep reading from HC-05 and send to Arduino Serial Monitor
  if (BTSerial.available())
    Serial.write(BTSerial.read());

  // Keep reading from Arduino Serial Monitor and send to HC-05
  if (Serial.available())
    BTSerial.write(Serial.read());
}


1.7. Open Arduino Serial Monitor (Tools > Serial Monitor) and run the AT commands:

>OK



<AT+ROLE
>+ROLE:0
 

<AT+CLASS
>+CLASS:1f00 

>OK  

AT+PSWD=4321

>+UART=9600,0,0

>OK 
>+UART:4800,1,0


>+NAME:HC-05


Now restart HC-05 (reconnect Arduino USB) and try to find and pair HC-05 from your Android (Settings > Bluetooth > Discover new devices)
Default HC-05 pin is 1234

Let me know if you have any questions.

References:
http://www.instructables.com/id/Modify-The-HC-05-Bluetooth-Module-Defaults-Using-A/?ALLSTEPS
http://byron76.blogspot.com/2011/09/hc05-firmware.html