Unfortunately we do not accept new members for free, Now Registration cost 30€, if you are interesting Send Email to [email protected]

DIY - how to make bluetooth D-CAN/K-Line Adapter
01-01-2016, 22:56 PM,
Post: #1
XZBMW  DIY - how to make bluetooth D-CAN/K-Line Adapter
Instruction how to make bluetooth D-CAN/K-Line Adapter

Quote:This chapter describes how to build a D-CAN/K-Line adapter with bluetooth support.
If you have problems building the adapter please contact me.

[Image: Download?ProjectName=EdiabasLib&DownloadId=1478010]
Basically two components are required: A standard D-CAN/K-Line Adapter. There are multiple manufactures who sell such adapters which are basically identical. I have used one with a PLCC AFT16V8B, because it's easier to replace the chip.
A HC-05 bluetooth board. It's important that it has an integrated 5V to 3.3V power regulator.

Step1: Replace the PLD
A big problem of the standard adapters is the high power consumption which results in a very high inner temperature. The main reason for this is the used PLD type. The ATF16V8B requires 50mA in standby. It's possible to replace this chip with a ATF16V8BQL type, which only requires 5mA. You could remove the existing PLD with hot air and attach a PLCC20 socket instead. With a PLC programmer program the custom.jed file into the ATF16V8BQL (The standard.jed file is the original program). The custom program adds an additional RXD input to the unused pin 1.

[Image: Download?ProjectName=EdiabasLib&DownloadId=1478011]
Step2: Program the processor
There is a replacement firmware available that has the following advantages over the standard firmware: Faster CAN communication (block size 0 and no separation time).
Allows configuration of CAN mode all the time, not only after power on.
Allows configuration of the CAN parameters (block size and separation time)
Correctly displays the ignition status (only available for K-line mode).
Allows to read the ignitions status with a telegram, this is required if you want to communicate over bluetooth.
Contains a bootstrap loader that allows firmware update without opening the device.
Reduced power consumption due to use of sleep mode.
For the first programming of the new firmware you have to connect the MISO, MOSI, SCK, RESET, GND and +5V to a standard AVR programmer (also supply the adapter with 12V). The 'combined.hex' file contains the bootstrap loader and the firmware. The fuses have to be set as follows:



Fuse

Value (hex)

Low 0xFD
High 0xDC
Extended 0xF9

The next time the firmware update is possible with UpdateLoader.exe (using CanAdapter.hex).

[Image: Download?ProjectName=EdiabasLib&DownloadId=1478012]
Step3: HC-05 connector
Now it's time to add an connector for the HC-05 board. The board requires only GND, +5V, TXD and RXD. But be beware of one problem: The HC-05 operates with 3.3V logic, whereas the converter uses 5V. For TXD signal (output from HC-05) this is no problem, the high level is detected correctly by the ATF16V8, but the RXD signal generated by the ATF16V8 has be be adjusted. I have used a voltage divider with 1K and 2K connected to ground. The HC-05 TXD signal could be now connected the Pin1 of the PLD (when using the custom.jed file).

[Image: Download?ProjectName=EdiabasLib&DownloadId=1478013]
Step4: HC-05 configuration
The HC-05 has now to be set into the correct operation mode. Connect it to an USB-TTL converter and attach the KEY pin to 3.3V or press the button on the board (depends on board type) during power on.
Use a terminal program with the following parameters: Baud 38400, 8, N, 1. Make sure that all commands are terminated with <CR><LF>! Now test the connection with the command: AT<CR><LF>. The device must respond with OK<CR><LF>. Now use the following commands to set the operation mode (also see HC-05 specification): Role slave: AT+ROLE=0
Baud rate: AT+UART=115200,0,0
Device name: AT+NAME=<Your device name>
Password: AT+PSWD=<Your password>

Step5: Replace HC-05 pin header
The pin header of the HC-05 board normally point into the wrong direction, so it will not fit into the adapter case. Remove the pin header and replace it with a new one that points into the opposite direction. Additionally you may have to replace the shrinking tube.

[Image: Download?ProjectName=EdiabasLib&DownloadId=1478019]
[Image: Download?ProjectName=EdiabasLib&DownloadId=1478015]
Step6: Add a power switch
If you want to leave the adapter plugged into the OBDII socket, you need a possibility to switch it off. You have to disconnect the pin header as shown in the picture below and add a switch that could be mounted in the empty USB cable space.

[Image: Download?ProjectName=EdiabasLib&DownloadId=1478016]
Step7: Mount everything together
Plug the modified HC-05 into it's socket and close the adapter. You should now be able to connect to the adapter via bluetooth from the PC. Make sure you are using a bluetooth chip in the PC and not a USB-TTL converter with HC-05 in master role because this will result in incorrect timing!
When sending strings to the adapter you should at least get an echo from the adapter, otherwise there is a problem with the connections.
You could test reading the ignition pin with the following command (hex values):
82 F1 F1 FE FE 60
The response is (additionally to the echo):
82 F1 F1 FE <state> <checksum> with state bit 0 set to 1 if ignition is on.

Firmware update
With UpdateLoader-win32.exe (application is only in german language) it's possible to update the firmware via bluetooth. Simply select the COM port and the hex file (CanAdapter.hex, not Combined.hex!) and start update.
The update can only be initiated if there is a valid application in the adapter. When the update via bluetooth is not possible any more, connect the adapter via USB, start the update process and power on the adapter (12V).

[Image: Download?ProjectName=EdiabasLib&DownloadId=1478018]

Last edited Nov 8, 2015 at 2:14 PM by uholeschak, version 4

LINK
https://ediabaslib.codeplex.com/wikipage...Title=Home
Reputation: +4 - misterixion [+1] , Marcos [+1] , carpi [+1] , eudin77 [+1]
Quote this message in a reply
[+] 24 users say Thank You to Miłosz for this post
03-01-2016, 20:48 PM,
Post: #2
RE: DIY - how to make bluetooth D-CAN/K-Line Adapter
Very nice mod , i test today and work good
Quote this message in a reply
09-01-2016, 11:21 AM,
Post: #3
RE: DIY - how to make bluetooth D-CAN/K-Line Adapter
Wirefan , what program do you use for connection , inpa , rheingold ?
Quote this message in a reply
10-03-2016, 16:23 PM,
Post: #4
RE: DIY - how to make bluetooth D-CAN/K-Line Adapter
Does ignition detection work?
Quote this message in a reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Car Systems / Custom Retrofit Garage ENBT Adapter Ulsmak 39 2,072 02-04-2024, 08:25 AM
Last Post: painsage
  Nbt Bluetooth music streaming help hero3838 14 2,749 01-04-2024, 11:43 AM
Last Post: atomantmk
XZBMW BMW F01 Bluetooth Communication Issues NAVJunk 10 394 08-03-2024, 06:30 AM
Last Post: NAVJunk
  BMW F20 / F21 Bluetooth Audio 6NH=>6N* possible? 320ed 8 1,798 19-01-2024, 17:54 PM
Last Post: Fxes
  F20 HU-Entry Replacement but Bluetooth not fully working Dee67 4 398 15-11-2023, 23:40 PM
Last Post: mbm1703
XZBMW BMW Software Update and Bluetooth® compatibility Twointje 5 595 24-10-2023, 03:52 AM
Last Post: Twointje
XZBMW Can anyone make NCD for Secure Coding 2.0 bmwtech 24 9,071 26-09-2023, 09:22 AM
Last Post: Vadim AA
XZBMW bmw x1 1.8l 2013y mev17.2.1 renew & virgine make ! worldbenz2015 2 296 07-08-2023, 17:40 PM
Last Post: worldbenz2015
XZBMW Steering Retrofiting on BMW E64 To make work heating Fraizer 0 188 04-08-2023, 13:17 PM
Last Post: Fraizer
XZBMW G12 Snap-in adapter does not hold the tablet. mmwmmw 1 235 10-07-2023, 14:48 PM
Last Post: Powerlab

Forum Jump:


Users browsing this thread:
1 Guest(s)

Return to TopReturn to Content