Site Tools


en:tech:tradfri_mod

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:tech:tradfri_mod [2021/01/20 10:57] – [Debugger] bullaren:tech:tradfri_mod [2022/09/26 09:58] (current) – external edit 127.0.0.1
Line 20: Line 20:
  
 ==== Debugger ==== ==== Debugger ====
-UA debugger is required to be able to read or write to the FLASH. An inexpensive variant is again available from [[https://www.ebay.de/itm/J-Link-OB-ARM-Debugger-Programmer-Downloader-ersetzt-v8-SWD-M74/164140805411?_trkparms=ispr%3D1&hash=item26378ded23:g:5QwAAOSwWp9efchy&amdata=enc%3AAQAFAAACcBaobrjLl8XobRIiIML1V4Imu%252Fn%252BzU5L90Z278x5ickkfOCvCjTOBWK8pwriaolq5kz8V%252F3fTn%252Bq1NprncvlEKsUO895Z6XqDQhlhBvpbG2iNwBFjad%252BDPZzBz7ihvtqJ4%252B%252Bg52gz8KOIOGYrD10yG3A8AfpY1cUWzvu8tjab91BJZ%252BYgvMSWDu1nbAGr1BOFXMR46ClABTL4mEBQrf2agUZJLnBxpsl6eg40caxG9mTAKdcyprIgilxKr99%252FLN6mijnJnSD2rdRaCudzFVV0vcj%252B%252BgahlfPxBTYA4RaRXWwLxoK5OGzTPTPnSSFAU4dxhb%252BySdVAd2cy1yq%252F7zyU5bQ48QCTp9KEEWC60mX4eRiMYN3EIcyBZ1KakivZwJC%252B%252FT4Y1euzBAqGr81Bx0FVIFD9uX%252BVFN8Ch%252B%252FDkW%252FCoehDajj06GFZjuZbEw65UEwoFKvkT4xMk6hEalDff2nViNHxTpK3Z2i1r%252BEFH0ZiMkRdOq1zxKbQpRufFLAr4hltuxPB3F%252BsOtgxmP1XT3pUWGvUis%252FsYC71Fw6uOu6NeaDkkxc7rP7oZw%252BvwS4jvcnEN2MZ5TMjUdXfcO%252FRThvUAwzwbAO0%252BVDJDvt3NPkaK774dr9QnaxHRZLTQzz6%252FqF7Bg3%252FRCMJ7Yn7VyHgw6OXDfYC68nUXPiJG3s0J%252FvztIof9JHeEgEioob5i4s5K%252Fg8yheJiR%252FnHUhphEOkmgMLjrXyhm16zhzXjdonBc0JNe52Ols5CWLD3ueZbnegfefnFdKcykgiE71oxGlVddcdR2vCcTXdgLqjmeUQsjTpab3ws0l3YetcB7SR5%252BHUG6L7w%253D%253D%7Ccksum%3A164140805411432396b05a514c0f8bca653630049171%7Campid%3APL_CLK%7Cclp%3A2334524|Ebay]]. You can find more information, among other things [[https://github.com/basilfx/TRADFRI-Hacking/blob/master/FIRMWARE.md|here]].+debugger is required to be able to read or write to the FLASH. An inexpensive variant is again available from [[https://www.ebay.de/itm/J-Link-OB-ARM-Debugger-Programmer-Downloader-ersetzt-v8-SWD-M74/164140805411?_trkparms=ispr%3D1&hash=item26378ded23:g:5QwAAOSwWp9efchy&amdata=enc%3AAQAFAAACcBaobrjLl8XobRIiIML1V4Imu%252Fn%252BzU5L90Z278x5ickkfOCvCjTOBWK8pwriaolq5kz8V%252F3fTn%252Bq1NprncvlEKsUO895Z6XqDQhlhBvpbG2iNwBFjad%252BDPZzBz7ihvtqJ4%252B%252Bg52gz8KOIOGYrD10yG3A8AfpY1cUWzvu8tjab91BJZ%252BYgvMSWDu1nbAGr1BOFXMR46ClABTL4mEBQrf2agUZJLnBxpsl6eg40caxG9mTAKdcyprIgilxKr99%252FLN6mijnJnSD2rdRaCudzFVV0vcj%252B%252BgahlfPxBTYA4RaRXWwLxoK5OGzTPTPnSSFAU4dxhb%252BySdVAd2cy1yq%252F7zyU5bQ48QCTp9KEEWC60mX4eRiMYN3EIcyBZ1KakivZwJC%252B%252FT4Y1euzBAqGr81Bx0FVIFD9uX%252BVFN8Ch%252B%252FDkW%252FCoehDajj06GFZjuZbEw65UEwoFKvkT4xMk6hEalDff2nViNHxTpK3Z2i1r%252BEFH0ZiMkRdOq1zxKbQpRufFLAr4hltuxPB3F%252BsOtgxmP1XT3pUWGvUis%252FsYC71Fw6uOu6NeaDkkxc7rP7oZw%252BvwS4jvcnEN2MZ5TMjUdXfcO%252FRThvUAwzwbAO0%252BVDJDvt3NPkaK774dr9QnaxHRZLTQzz6%252FqF7Bg3%252FRCMJ7Yn7VyHgw6OXDfYC68nUXPiJG3s0J%252FvztIof9JHeEgEioob5i4s5K%252Fg8yheJiR%252FnHUhphEOkmgMLjrXyhm16zhzXjdonBc0JNe52Ols5CWLD3ueZbnegfefnFdKcykgiE71oxGlVddcdR2vCcTXdgLqjmeUQsjTpab3ws0l3YetcB7SR5%252BHUG6L7w%253D%253D%7Ccksum%3A164140805411432396b05a514c0f8bca653630049171%7Campid%3APL_CLK%7Cclp%3A2334524|Ebay]]. You can find more information, among other things [[https://github.com/basilfx/TRADFRI-Hacking/blob/master/FIRMWARE.md|here]].
  
 {{ :tech:j-link_debugger.png?direct&300 |}} {{ :tech:j-link_debugger.png?direct&300 |}}
Line 34: Line 34:
 In addition, the module must be supplied with 3.3V. J-Link from [[https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack|SEGGER]] is available as software. Version V648b ran stable on my Mac. In addition, the module must be supplied with 3.3V. J-Link from [[https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack|SEGGER]] is available as software. Version V648b ran stable on my Mac.
  
-==== Auslesen ====+==== Read out ====
  
-Im Terminal geben wir dann folgendes ein (Pfad anpassen):+In the terminal window we then enter the following command (adapt path):
  
 ''<pfad>/JLinkExe -If SWD -Speed 5000 -Device EFR32MG1PXXXF256'' ''<pfad>/JLinkExe -If SWD -Speed 5000 -Device EFR32MG1PXXXF256''
  
-Es erscheint der ''J-Link>'' prompt. Zum Verbinden mit dem Cortex-M4 einfach ''connect'' eingeben und bei Erfolg sieht die Rückmeldung so aus:+The ''J-Link>'' prompt appearsTo connect to the Cortex-M4 simply enter ''connect'' and if successful, the response looks like this:
 <code> <code>
 J-Link>connect  J-Link>connect 
Line 58: Line 58:
 </code> </code>
  
-Der Cortex-M4 des TRÅDFRI Moduls verfügt über vier FLASH Bereiche, die wir betrachten müssen:+The Cortex-M4 of the TRÅDFRI module has four FLASH areas that we have to consider:
  
 ^ Area ^ ADDR ^ Size ^ ^ Area ^ ADDR ^ Size ^
Line 66: Line 66:
 |  CHIP  |  ''0xfe08000''  |  ''0x400''  | |  CHIP  |  ''0xfe08000''  |  ''0x400''  |
  
-Zum Auslesen und Abspeichern geben wir die folgenden Befehle ein:+To read out and save, we enter the following commands:
  
 <code> <code>
Line 78: Line 78:
 </code> </code>
  
-Mit dem Befehl ''J-Link>verifybin TRADFRI_main.bin 0x0'' lässt sich das Ausgelesene nochmal verifizieren+With the command ''J-Link> verifybin TRADFRI_main.bin 0x0'' the read out can be verified again
-Zum Glück waren bisher alle von mir ausgelesenen Module nicht lesegeschützt.\\ +Fortunately, all of the modules I read were not read-protected so far. \\ 
-Haben wir alle vier Files können wir jetzt jedes beliebige Modul neu programmieren und so die gewünschte Funktion erhalten. In meinem Fall habe ich die TRÅDFRI Module aus dem Repeater genommen und in Rollo Module umgewandelt und [[de:tech:gw60|hier]] verwendet.+If we collect all four files, we can now reprogram any module and thus obtain the desired function. In my case I took the TRÅDFRI modules out of the repeater and converted them into blind modules and used them [[en:tech:gw60 | here]].
  
-==== Programmieren ====+==== Programming ====
  
-Das Programmieren geht genauso einfach wie das Auslesen mit folgenden Befehlen:+Programming is just as easy as reading out with the following commands:
  
 <code> <code>
Line 101: Line 101:
 </code> </code>
  
-==== TRÅDFRI Taster ====+==== TRÅDFRI on/off switch ====
  
-Das gleiche Verfahren lässt sich übrigens auch für andere TRÅDFRI Geräte anwenden, wo nicht dieses Modul eingesetzt wirdDer Schaltungsaufbau ist nämlich immer der gleicheDazu muss man auf der Platine nur die vier Anschlüsse findenDiese sind immer auch als Pads für den Modultest rausgeführt und somit leicht erreichbar.\\ +The same procedure can also be used for other TRÅDFRI devices that do not use this moduleThe circuit structure is always the sameAll you have to do is find the four connections on the circuit boardThese are always available as pads for the module test and are therefore easily accessible. \\ 
-Für das [[de:tech:gw60|Rollo Projekt]] habe ich dazu den Standard TRÅDFRI Taster (kabelloser Dimmer genannt) in einen Taster für das Rollo umgewandeltDen gibt es ja leider nicht einzeln zu kaufen.+For the [[en:tech:gw60 | blind project]] I converted the standard TRÅDFRI on/off switch into a button for the blindUnfortunately, you can't buy one individually.
  
-{{:tech:tradfri_taster.png?nolink&200|}} +{{:tech:tradfri_taster.png? nolink & 200|}} 
-{{:tech:tradfri_tester_rollo.png?direct&200|}}+{{:tech:tradfri_tester_rollo.png? direct & 200|}}
  
-Wie man den Taster öffnet ist [[http://westsideelectronics.com/ikea-tradfri-on-off-switch-teardown/hier]] gut beschriebenDie Anschlüsse zum Programmieren sind auf der Rückseite des PCBs beschriftet und die Verbindung zum Debugger ergibt sich daher wie folgt:+How to open the button is [[http://westsideelectronics.com/ikea-tradfri-on-off-switch-teardown/here]] well describedThe connections for programming are labeled on the back of the PCB and the connection to the debugger is shown as follows:
 ^  JLINK  ^  TRÅDFRI Taster  ^ ^  JLINK  ^  TRÅDFRI Taster  ^
 |  VCC  |  VCC  | |  VCC  |  VCC  |
Line 115: Line 115:
 |  SWCLK  |  CLK  | |  SWCLK  |  CLK  |
 |  GND  |  GND  | |  GND  |  GND  |
 +
 {{:tech:tradfri_taster_pcb_bottom.png?direct&300|}} {{:tech:tradfri_taster_pcb_bottom.png?direct&300|}}
  
 ==== Update ==== ==== Update ====
  
-Alle TRÅDFRI Komponenten unterstützen Over-The-Air (OTA) UpdatesDarum braucht man sich nicht zu kümmern da es im Hintergrund zum Beispiel durch das Gateway erfolgtWollen wir beim Umprogrammieren jedoch gleich die aktuelle Firmware flashendann können wir die Daten auch direkt vom IKEA OTA Server holenFindige Entwickler haben dazu ein [[https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/ikea-ota-download.py|Python Script]] geschriebenMit Hilfe dieses Script werden alle auf dem Server vorhanden Files heruntergeladenDas Beispiel für das Rollo sieht dann so aus ''10037585-5.1-TRADFRI-connected-blind-2.2.009.ota.ota.signed''\\+All TRÅDFRI components support Over-The-Air (OTA) updatesYou don't need to worry about that, as it takes place in the background, for example through the gatewayHowever, if we want to flash the current firmware while reprogrammingwe can also fetch the data directly from the IKEA OTA serverResourceful developers have written a [[https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/ikea-ota-download.py |Python Script]]. With the help of this script, all files available on the server are downloadedThe example for the roller blind then looks like this: ``10037585-5.1-TRADFRI-connected-blind-2.2.009.ota.ota.signed'' \\
  
-Es wird allerdings nur der MAIN Bereich des FLASH aktualisiertDie Bereiche USER, LOCK und CHIP ändern sich nicht und sind somit auch nicht online. Will man also ein Modul in eine andere Funktionalität umprogrammierenso muss man es zumindest einmal selber ausgelesen haben um an die Daten für USER, LOCK und CHIP zu kommen.\\+However, only the MAIN area of ​​the FLASH is updatedThe USER, LOCK and CHIP areas do not change and are therefore not online eitherIf you want to reprogram a module with a different functionalityyou have to read it out yourself at least once in order to get to the data for USER, LOCK and CHIP. \\
  
-Die geladenen Daten sind in einem exotischen Format gekapselt mit der Abkürzung NGIS. Hier war auch wieder etwas Arbeit nötig um das Format zu entschlüsseln und die Binärdatei zu extrahierenEine tolle Unterstützung war dabei übrigens das Program [[https://www.synalysis.net|Synalyze it! Pro]]. Das Graph File liegt im Downloadbereich bereit.\\+The loaded data is encapsulated in an exotic format with the abbreviation NGIS. Here again some work was necessary to decrypt the format and extract the binary fileThe program [[https://www.synalysis.net | Synalyze it! Per]]. The graph file is available in the download area. \\
  
 {{:tech:ota_ngis.png?direct | OTA NGIS Graph}} {{:tech:ota_ngis.png?direct | OTA NGIS Graph}}
  
- +For extracting I wrote a Python script that is also in the download areaIn the previous tests, the extracted version was binary identical to the one that was read out. \\
-Zum Extrahieren habe ich ebenfalls ein Python Script geschrieben das auch im Downloadbereich liegtBei den bisherigen Tests war die extrahierte Version binäridentisch zur ausgelesenen.\\ +
  
 ==== Downloads ==== ==== Downloads ====
Line 138: Line 137:
 ==== Donate ==== ==== Donate ====
  
-If you line my articles feel to donate a cappuccino or so...+If you like my articles feel to donate a cappuccino or so...
  
 <html> <html>
en/tech/tradfri_mod.1611140262.txt.gz · Last modified: 2021/01/20 10:57 by bullar