Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
inbox:toh:d-link:dap-x1860 [2023/05/10 19:12] – Added Serial connections parameter, missing rights to upload picture with connection pins. aburabainbox:toh:d-link:dap-x1860 [2023/11/03 11:19] – add tables maurerle
Line 19: Line 19:
  
 Openwrt is up and running. Openwrt is up and running.
 +
 +===== Supported Versions =====
 +
 +---- datatable ----
 +cols    : Brand, Model, Versions, Supported Current Rel, OEM device homepage URL_url, OWrt Forum Topic URL_url, Device Techdata_pageid
 +headers : Brand, Model, Version, Current Release, OEM Info, Forum Topic, Technical Data
 +align   : c,c,c,c,c,c,c
 +filter  : Brand=D-Link
 +filter  : Model=DAP-X1860
 +----
 +
 +---- datatable ----
 +cols    : Unsupported Functions_unsupporteds
 +filter  : Brand=D-Link
 +filter  : Model=DAP-X1860
 +----
  
 ==== Supported since commit: ==== ==== Supported since commit: ====
Line 29: Line 45:
  
 ==== How to flash OpenWrt to this device ==== ==== How to flash OpenWrt to this device ====
 +
 +---- datatable ----
 +cols    : Model, Versions, Supported Current Rel, Firmware OpenWrt Install URL_url, Firmware OpenWrt Upgrade URL_url, Firmware OEM Stock URL_url
 +headers : Model, Version, Current Release, Firmware OpenWrt Install, Firmware OpenWrt Upgrade, Firmware OEM Stock
 +align   : c,c,c
 +filter  : Brand=D-Link
 +filter  : Model=DAP-X1860
 +----
  
 Steps: Steps:
Line 47: Line 71:
  
  
-/*** if info available: uncomment and fill in +===== Hardware Highlights ===== 
-===== Experimental firmware ===== +---- datatable ---- 
- +cols    : Model, Versions, CPU, CPU MHz, Flash MB_mbflashs, RAM MB_mbram, WLAN Hardware, WLAN 2.4GHz, WLAN 5.0GHz, Ethernet 100M ports_, Ethernet Gbit ports_, Modem, USB ports_ 
-//List experimental firmware download links here.// +header  : Model, Version,SoC,CPU MHz,Flash MB,RAM MB,WLAN Hardware,WLAN2.4,WLAN5.0,100M ports,Gbit ports,Modem,USB 
- +align   : c,c,c,c,c,c,c,c,c,c,c,c,c 
-//None at this time.// +filter  : Brand=D-Link 
- +filter  : Model=DAP-X1860 
-  * External image (add link) +----
-  * trunk image (add link) +
-  * ... +
-***/ +
- +
- +
-===== Hardware highlights ===== +
-^ CPU              ^ Ram       ^ Flash     ^ Network    ^ WLAN       ^ USB  ^ Serial  ^ JTag  ^ +
-| MT7621A @880Mhz  |  256 MiB  |  128 MiB  |  1x 1Gbit  |  abgnacax  |    |  Yes    |  ?    |+
  
  
Line 181: Line 197:
 **Insert photo of backside label** **Insert photo of backside label**
  
 +Main PCB, top: \\
 +{{:media:dlink:dap-x1860-a1_pcb_main_top.jpg?400|}} \\
 +Power supply unit, top: \\
 +{{:media:dlink:dap-x1860-a1_pcb_psu_top.jpg?400|}} \\
 **Insert photo of PCB** **Insert photo of PCB**
- 
 ==== Opening the case ==== ==== Opening the case ====
  
Line 193: Line 212:
  
 How to connect to the Serial Port of this specific device:\\ How to connect to the Serial Port of this specific device:\\
 +{{:media:dlink:dap-x1860-a1_serial_connection.jpg?400|}}\\
 1: Tx, 2: GND, 3: Rx, 4: Vcc \\ 1: Tx, 2: GND, 3: Rx, 4: Vcc \\
-**Insert photo of PCB with markings for serial port** 
  
 ^ Serial connection parameters\\ for D-Link DAP-X1860 A1 | 115200, 8N1, 3.3V | ^ Serial connection parameters\\ for D-Link DAP-X1860 A1 | 115200, 8N1, 3.3V |
Line 203: Line 222:
 How to connect to the JTAG Port of this specific device:\\ How to connect to the JTAG Port of this specific device:\\
 **Insert photo of PCB with markings for JTAG port** **Insert photo of PCB with markings for JTAG port**
 +
 +===== Factory image encryption / decryption =====
 +
 +The bootloader recovery system (pressing reset button during plug-in) requires flashing an unencrypted ELX image,
 +however it will accept and flash just anything. If you accidentally bricked your device by uploading a D-Link stock firmware,
 +you need to decrypt the stock firmware first and re-upload the decrypted ''kernel_DAP-X1860.bin''.
 +
 +To install OpenWrt, either a recovery image can be flashed via bootloader (which only works in some Chromium-based browsers)
 +or an encrypted and signed image can be uploaded via the regular web interface (also wirelessly, e.g. using a phone).
 +
 +The web interface is at ''192.168.0.50'', login with ''admin'' / ''password''
 +
 +If login does not work even after resetting config, try a different browser.
 +Skip the nag wizard by directly accessing http://192.168.0.50/UpdateFirmware_Simple.html
 +
 +
 +==== Image encryption ====
 +
 +The input file is assumed to be ''kernel_DAP-X1860.bin'' here. Note the misspelling of ''signauture''.
 +Within the device firmware, an outdated version of ''openssl'' is found, using the md5 digest for AES-CBC by default.
 +For current versions of openssl, the parameter ''-md md5'' needs to be given explicitly.
 +
 +Download and unpack the GPL Code for DAP-X1860 from https://tsd.dlink.com.tw/GPL.asp
 +
 + # retrieve image signing key
 + strings DAP-X1860_GPL/boards/D-LINK-RE-7476DRX/add_header | grep "BEGIN RSA PRIVATE KEY" -A 50 > key.pem 
 +
 + # digest stage 1
 + openssl dgst -sha512 -out FW.sha512.ds.st1 kernel_DAP-X1860.bin
 +
 + # sign digest -> stage 1 signature
 + openssl rsautl -sign -inkey key.pem -in FW.sha512.ds.st1 -pkcs -out FW.signauture.st1
 +
 + # tar stage 1
 + tar cf FWImage.st1 kernel_DAP-X1860.bin FW.signauture.st1
 +
 + # encrypt stage 1 -> stage 2
 + openssl enc -md md5 -aes-256-cbc -salt -in FWImage.st1 -out FWImage.st2 -k MB0dBx62oXJXDvt12lETWQ==
 +
 + # digest stage 2
 + openssl dgst -sha512 -out FW.sha512.ds.st2 FWImage.st2
 +
 + # sign digest -> stage 2 signature
 + openssl rsautl -inkey key.pem -sign -in FW.sha512.ds.st2 -out FW.signauture.st2
 +
 + # tar stage 2
 + tar cf kernel_DAP-X1860-encrypt.bin FWImage.st2 FW.signauture.st2
 +
 +
 +==== Image decryption ====
 +
 +To revert the device to D-Link OEM Firmware, it needs to be decrypted as stated in the commit message:
 +
 + # untar stage 2
 + tar -xvf DAP-X1860_RevA_Firmware_101b94.bin
 +
 + # decrypt stage 2 -> stage 1
 + openssl enc -d -md md5 -aes-256-cbc -in FWImage.st2 -out FWImage.st1 -k MB0dBx62oXJXDvt12lETWQ==
 +
 + # untar stage 1
 + tar -xvf FWImage.st1
 +
 +You may also verify the signatures using ''openssl rsautl --verify'' with ''DAP-X1860_GPL/add_files/dlink_tw/public.pem''
  
 ===== Bootlogs ===== ===== Bootlogs =====
  • Last modified: 2024/02/12 08:58
  • by 127.0.0.1