[1] Open certificate viewer in Google Chrome[2] Export certificate
Only need to use extract CA’s certificate. Export it with file extension named .pem
Please take a note that, update-ca-trust determines certificate format using file header which locates in very first bytes in the binary file. Eventhough you save certificates with .crt , .cer, it’s still .pem.
To determine file format, you shoule use command file, for example $ file file_name.
To illustrate this point. I’ll give an example.
####### List all file, take a look at the file extension, .crt and .pem$ ls-l'Default Trust_DigiCert Global Root CA.crt''Default Trust_DigiCert Global Root CA.pem'####### Determine file format with command named `file`$ file *
Default Trust_DigiCert Global Root CA.crt: PEM certificate
Default Trust_DigiCert Global Root CA.pem: PEM certificate
Step 2. Copy certificate authority’s certificate to /etc/pki/ca-trust/source/anchors
Step 3. Update /etc/ssl/certs/ca-certificates.crt
$ sudo update-ca-trust extract
You can check this file /etc/ssl/certs/ca-certificates.crt to ensure that it is updated.
Solution: Add connection parameter named :read_timeout in repo config. In the follow example, I change :read_timeout to 5 minutes, see line 11.
Besides, I add :timeout to :infinity, see line 10.
Realms
A realm manages a set of users, credentials, roles, and groups. A user belongs to and logs into a realm. Realms are isolated from one another and can only manage and authenticate the users that they control.
Realms (Tiếng Việt): cõi, địa hạt, vương quốc, vùng
Một realm quản lý một tập hợp user, thông tin xác thực - credential, role và group. Một user sẽ thuộc một realm, một realm sẽ có nhiều user, user sẽ đăng nhập vào reaml mà nó thuộc về. Một server KeyCloak tạo được rất nhiều realm, và chúng bị cô lập với nhau. Những realm này chỉ có thể quản lý và cho đăng nhập những user mà chúng quản lý.
As the definition of realm , this step is only used for testing only, normaly, if your KeyCloak did create a realm, you can skip this step and go to step 2.
[1] Add a new realm.
Step 2: Create new reaml’s client & configure it
[2] Create realm's client
In new client form, I would like to input the following parameters, then submit.
In the saml response that Redash expected to received, it requires
First Name (original), this attibute name is FirstName
Last Name (original), this attribute name is LastName
However, in the KeyCloak, the attribute names are different from what Redash expected, as a consequence, we need to configure client’s mappers
For first name and last name, use Add Builtin feature.
[5] First name and last name mappers[6] First name and last name mapper detail
X500 Surname
Property: lastName
Friendly Name: LastName
SAML Attribute Name: LastName
X500 GivenName
Property: firstName
Friendly Name: FirstName
SAML Attribute Name: FirstName
II. Redash SAML Configuration
After login using admin credential, go to Settings → General → Saml
Trong bài hướng dẫn này, chúng ta sẽ tìm cách nâng cấp firmware cho máy in 3D Creality Ender-3 Pro. Trước khi đi vào chi tiết, đây là thông số máy in 3D của tôi trước khi nâng cấp.
CPU: ATMEGA1284P
Motherboard: Creality3D V1.1.4
Version: Melzi 1.1.6.2
Cá nhân tôi khi bắt đầu mò mẫm cài đặt firmware mới, tôi cảm giác mình đang đi vào một cái lỗ thỏ. Đây là những phần việc chính mà chúng ta sẽ làm
Cài đặt bootloader cho Creality Ender-3 Pro
Cài đặt firmware Marlin cho Creality Ender-3 Pro
Đây là cách các phần cứng nối với nhau.
I. Cài đặt bootloader cho Creality Ender-3 Pro
Ở bước này, tôi sẽ dụng Arduino UNO như một công cụ trung gian để rồi cài đặt bootloader cho máy in 3D.
Để tránh nhầm lẫn, chỉ cắm Arduino UNO vào máy tính, chúng ta chưa kết nối thứ gì vào máy in 3D.
[1] Hardware Links
Sau khi cắm Arduino UNO vào máy tính, mở phần mềm Arduino IDE, chọn File > Example > 11. ArduinoISP > ArduinoISP.
[2] ArduinoISP
Ở mục Tools > Programmer hãy chọn AVRISP mkII . Sau đó, hãy verify và upload sketch này lên Arduino UNO.
Lưu ý là vẫn giữ kết nối giữa máy tính và Arduino sau khi upload thành công.
Bây giờ là lúc cắm Arduino UNO vào máy in 3D Creality Ender-3 Pro thông qua cổng ISP. Các linh kiện sẽ kết nối như thế này.
[3] Hardware links
Đây là mạch của máy in 3D.
[4] Creality3D v1.1.4 & ISP jacks
Còn đây là mạch Arduino UNO. Khi nối dây, lưu ý là socket số 10 của Arduino sẽ nối vào chân số 3 trên mạch máy in 3D.
Các chân còn lại 1, 2, 4, 5, 6 nối như bình thường.
[5] Arduino UNO & ISP jacks
Sau khi kết nối mạch máy in 3D vào Arduino UNO, mặc dù chúng ta không cấp nguồn cho mạch máy in 3D, màn hình vẫn sẽ sáng vì nó lấy điện thông qua Arduino.
Giờ chúng ta quay trở lại với chương trình Arduino IDE để burn bootloader vào mạch máy in 3D thông qua Arduino UNO. Thao tác như sau
Tools > Board , chọn Sanguino,
Tools > Port, vẫn giữ port cũ, cái mà đang kết nối với Arduino.
Tools → Processor, chọn ATmega1284 or ATmega1284P (16MHz)
Tools → Programmer, chọn Arduino as ISP (quan trọng)
Sau đó, ấn nút Tools → Burn Bootloader . Lúc này bootloader sẽ được cài vào mạch máy in 3D thông qua Arduino UNO.
Màn hình của máy in 3D sẽ có màu xanh, không có chữ gì cả. Đừng lo lắng. Bootloader đã cài đặt thành công rồi.
Bây giờ hãy tháo Arduino UNO và cable ISP, vai trò của Arduino UNO đã kết thúc.
Từ bây giờ, tôi sẽ gọi thư mục sau khi giải nén MarlinFirmware.zip là thư mục MarlinFirmware, còn thư mục sau khi giải nén MarlinConfiguration.zip là MarlinConfiguration.
Trong thư mục MarlinFirmware, sẽ có một thư mục con tên là Marlin hãy copy những file sau từ MarlinConfiguration/config/examples/Creality/Ender-3 Pro/CrealityV1, vào thư mục này:
_Bootscreen.h
Configuration.h
Configuration_adv.h
_Statusscreen.h
Trong thư mục MarlinFirmware , Edit file platformio.ini , thay đổi default_envs = melzi_optimized
Tôi sẽ giả định rằng bạn đã cài đặt xong phần mềm python và platformio. Trong thư mục MarlinFirmware, hãy chạy lệnh sau
để compile firmware mới, ở thời điểm tôi viết bài này, phiên bản marlin là 2.0.9.6
$ platformio run
--------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/sanguino_atmega1284p.html
PLATFORM: Atmel AVR (3.4.0)> Sanguino ATmega1284p (16MHz)
HARDWARE: ATMEGA1284P 16MHz, 16KB RAM, 124KB Flash
DEBUG: Current (simavr) On-board (simavr)
PACKAGES:
- framework-arduino-avr @ 5.1.0
- toolchain-atmelavr @ 1.70300.191015 (7.3.0)
Converting Marlin.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 6 compatible libraries
Scanning dependencies...
Dependency Graph
|-- U8glib-HAL @ 0.5.2
|-- SPI @ 1.0
|-- Wire @ 1.0
Building in release mode
Compiling .pio/build/melzi_optimized/src/src/inc/Warnings.cpp.o
Linking .pio/build/melzi_optimized/firmware.elf
Checking size .pio/build/melzi_optimized/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [===] 29.4% (used 4820 bytes from 16384 bytes)
Flash: [==========] 99.6% (used 126450 bytes from 126976 bytes)======================================================================================
Environment Status Duration
-----------------------------------
melzi_optimized SUCCESS 00:00:07.384
Firmware đã được build xong, nó nằm ở .pio/build/melzi_optimized/firmware.hex
Bây giờ chúng ta sẽ nối máy tính với máy in 3D thông qua cổng mini USB và upload firmware.
platformio run --target upload -v
Tôi sử dụng -v (verbose), nó sẽ hiển thị chính xác command mà platformio sử dụng để upload firmware lên mạch máy in 3D.
Command đó nằm ở dòng thứ 6.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
AVAILABLE: arduino
CURRENT: upload_protocol = arduino
BeforeUpload(["upload"], [".pio/build/melzi_optimized/firmware.hex"])
Auto-detected: /dev/ttyUSB0
avrdude -v -p atmega1284p -C /home/nguyenvinhlinh/.platformio/packages/tool-avrdude/avrdude.conf -c arduino -b 57600 -D -P /dev/ttyUSB1 -U flash:w:.pio/build/melzi_optimized/firmware.hex:i
avrdude: Version 6.3, compiled on Sep 12 2016 at 15:21:49
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/home/nguyenvinhlinh/.platformio/packages/tool-avrdude/avrdude.conf"
User configuration file is "/home/nguyenvinhlinh/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyUSB0
Using Programmer : arduino
Overriding Baud Rate : 57600
Khả năng rất cao là chạy lệnh platformio run --target upload -v không thành công, nó chí build xong firmware chứ ko có upload được. Error log như sau:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xdb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xdb
Lý do bị lỗi này là vì baud rate -b 57600 không chính xác , Để khắc phục lỗi này, bạn chỉnh sửa -b 115200 sau đó chạy lại trên terminal.
Command sẽ trông như sau.
Đến đây là đã kết thúc quá trình upload firmware mới lên máy in 3D Creality Ender-3 Pro. Trên máy in 3D, nó sẽ yêu cầu bạn initialize lại EPROOM,
bạn hãy đồng ý. Nếu không hãy làm như sau Configuration > Advanced Settings > Initialize EPROOM. Sau đó, hãy kiểm tra version
About Printer > Printer Info , nó sẽ là 2.0.9.6.