Sync 3 APIM Bench Test Project Completed

Im very new to all of this is there a good youtube video to help me understand how to upload the data files into the bluepill? I have a light understanding of programming but ive never worked with Arduino before

You have to use an ST-Link cable / usb adapter for the physical connection to the device.
Use Visual Studio Code + Platform IO to build and upload.

1 Like

14 posts were split to a new topic: Retrofit Sync 3 into a 2018 Transit Custom Base

I donā€™t suppose you have a message required to enable radio (FM) on Sync2 while on the bench without the ACM connected?

I sent 048 - 00 00 00 00 07 00 E0 00 to turn the unit on (as well as many others, like external temperature and climate control) but cannot find one for enabling radio. At the moment the three AM, FM, DAB buttons are greyed out.

1 Like

I could be wrong but I think you need an ACM for the radio.

Of course, to LISTEN to the radio, youā€™ll need the ACM. I just want to enable radio functionality, so I can send FM data to it, like radio station name and text.

Great question, I do not know if it is looking for a CAN message in order to enable FM radio or something else. I also do not have the CAN bus message simulate it. Can you sniff the CAN line from the ACM and report back? They are like $40 from eBay or free if you use your own.

Yes, that would be the next step. I have all the hardware, just need to tap into the CAN lines. Some questions areā€¦which CAN line? HS3/MM or MS? Also, the car will be extremely chatty anyway, so wouldnā€™t be overly trivial to pin it down.

Check this out for some wiring diagrams /ideas: 2020 APIM/Screen and 2020 ACM Compatibility - #16 by Junior

I think it would be MS-CAN / I-CAN not HS-CAN

It could also talk to it directly via a non-CAN protocolā€¦ based on that post.

1 Like

Hi, I bought the parts for the bench tester excl the OBD port.

Iā€™m trying to upload the files to the STM32 and getting the following error.

</>
AVAILABLE: blackmagic, cmsis-dap, jlink, serial, stlink

CURRENT: upload_protocol = stlink

Uploading .pio\build\bluepill_f103c6\firmware.elf

xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2021-10-16-21:19)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.org/doc/doxygen/bugs.html

debug_level: 1

0x2ba01477

hla_swd

none separate

Warn : UNEXPECTED idcode: 0x1ba01477

Error: expected 1 of 1: 0x2ba01477

in procedure ā€˜programā€™

** OpenOCD init failed **

shutdown command invoked

*** [upload] Error 1

========================= [FAILED] Took 99.41 seconds =========================
</>

Also received the following error from Atom.

</>

Versions

Atom: 1.60.0 x64
Electron: 9.4.4
OS: Microsoft Windows 10 Pro
Thrown From: Atom Core

Stack Trace

Uncaught Error: The specified module could not be found.
\?\C:\Users\Windows 10 Pro\AppData\Local\atom\app-1.60.0\resources\app.asar.unpacked\node_modules\keyboard-layout\build\Release\keyboard-layout-manager.node

At electron/js2c/asar.js:140

Error: The specified module could not be found.
\\?\C:\Users\Windows 10 Pro\AppData\Local\atom\app-1.60.0\resources\app.asar.unpacked\node_modules\keyboard-layout\build\Release\keyboard-layout-manager.node
    at process.func [as dlopen] (electron/js2c/asar.js:140:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1034:18)
    at Object.func [as .node] (electron/js2c/asar.js:149:18)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:74:18)
    at customRequire (~/AppData/Local/atom/app-1.60.0/resources/app/static/<embedded>:1:802772)
    at get_KeyboardLayoutManager (~/AppData/Local/atom/app-1.60.0/resources/app/static/<embedded>:14:2877135)
    at get_manager (~/AppData/Local/atom/app-1.60.0/resources/app/static/<embedded>:14:2877237)
    at Object.getCurrentKeyboardLayout (~/AppData/Local/atom/app-1.60.0/resources/app/static/<embedded>:14:2877363)
    at e.keystrokeForKeyboardEvent (~/AppData/Local/atom/app-1.60.0/resources/app/static/<embedded>:14:1121318)
    at KeymapManager.keystrokeForKeyboardEvent (~/AppData/Local/atom/app-1.60.0/resources/app/static/<embedded>:11:1225566)
    at KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.60.0/resources/app/static/<embedded>:11:1223551)
    at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.60.0/resources/app/static/<embedded>:11:286682)

Commands

     -4:44.2.0 platformio-ide:target:upload (input.hidden-input)
     -4:44.2.0 platformio-ide:target:upload-C:\Users\Windows 10 Pro\Desktop\stm32_can_sim-main\stm32_can_sim-main (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)

Non-Core Packages

autocomplete-clang 0.13.1 
build 0.70.0 
busy-signal 2.0.1 
file-icons 2.1.47 
intentions 2.1.1 
language-ini 1.25.0 
linter 3.4.0 
linter-gcc2 0.8.8 
linter-ui-default 3.4.1 
platformio-ide 2.7.2 
platformio-ide-debugger 1.2.6 
platformio-ide-terminal 2.10.1 
tool-bar 1.4.4 

Additional Information

Iā€™m a complete novice but feel like Iā€™ve got myself as far as I can on my own / reading your material.
Thanks for any help in advance.

Tom

Hi all, I managed to successfully install the code onto the Bluepill. Just had to remove the line of code for the upload flags.

Iā€™ve plugged in my APIM to the bench tester but my screen just flashes on then off. Iā€™ve also tried turning it back on without the CAN lines in the APIM connector with the same result. Any ideas?
Thanks for your help.

Itā€™s because you have a bluepill with a fake ST32 chip. You have to modify a file to make the stlink work with itā€¦ Debugging of STM32F103 clone "BluePill" board, wrong idcode - Debugging - PlatformIO Community

Try and remove some of the CAN code it sends and only leave what is applicable to your APIM. Look at line ā€œstatic can_messages cMessages[4] = {ā€

Thanks for getting back to me.

Of the numbers 1-5 - should number 5 always remain in the code? For example just use a combo of lines 1+5 or 2+5 etc? Or more than 2 lines at a time like 1+4+5
Thanks,

static can_messages cMessages[4] = {

  1. // turn on C1MCA - this turned most units on
  2. // turn on CGEA 1.3 - newer protocol, this actually made some APIMs turn off so it is commented out
  3. //sync4 turn on
  4. // turn CGEA 1.3 - second option, seems to work better
  5. // Accessory ON, Gear Park, Speed 0 - this needed or else the APIM will default to driving mode and will lock out many settings

Try one a time. The last one that tells the speed should always remain however (if you want all the functionality to be enabled). Make sure you change the array size from 4 to 2. Also, you are sure your APIM is functional?

Will do, thanks.

Well this is what iā€™m trying to determine. The guy that shipped it to me from the US updated it to Sync 3.4 and sent me photos of it all looking good and working. Iā€™m converting a UK fiesta you see, so donā€™t have a vehicle that i know works that i can plug the APIM into.
G1BT18B955TC - thats my APIM Part No.

Thanks,

Do you have the correct screen size? A Fiesta APIM I had did not work display anything with a normal 8" screen until I updated the sync software and then also modified the config on it via forscan.

Iā€™ve bought all the parts from the USA including fascia adapters for the screen. I see what you mean about updating in Forscan to make it work, but the harness the guy sold me could be the root of the problem. Thatā€™s why Iā€™m trying to fire up the screen/apim on the bench to see where the fail point is.

None of those CAN lines got me a different result. 2 of the CAN lines wouldnā€™t flash the screen on at all.
Should the CAN board (TJA1050) have an LED on when in use? STM32 and my power board both light up.

Thanks,

So it does not work in the car either?
Which screen are you trying to use it with? 6.5" or 8"? Was the APIM configured for the correct screen?

No it doesnā€™t work in the car either. The screen came with the APIM and has been working when the guy i bought it off had it on the bench.

Iā€™ve not been able to fire it up in the car or on the bench.