System Configuration
1. Luckfox-config Configuration
Luckfox-config is a system configuration tool that comes with the official Core3566 image. To open the configuration tool, enter the following command in the terminal:
sudo luckfox-config
Basic operations: Use the up and down keys on the keyboard to select menu items, press Enter to enter, use the left and right keys to select buttons such as OK, Select, and Cancel, and press Esc to cancel and return. Press the spacebar to select or deselect an option. Finally, select Finish to exit. There might be a reboot, and any changes will take effect after the system restarts.
1.1 Option List
- System Options
- Password: Set or modify the login password.
- Hostname: Modify the hostname of your device.
- Interface Options: In this submenu, you can enable/disable various interfaces such as SPI, I2C, UART, and PWM.
- Localisation Options
- L1 Locale: Language and regional settings.
- L2 Timezone: Set the timezone.
- L3 WLAN Country: Set the country code.
- Update: It updates the local database that stores the list of available remote repositories before installing or upgrading packages.
- About luckfox-config: Information about the luckfox-config tool.
1.2 Language Setting
Open the luckfox-config tool and select Localisation Options -> locale.
Select zh_CN.UTF-8 and press the spacebar to check it, then press Enter to confirm.
After setting it, reboot Core3566 for the changes to take effect,After a successful boot, the system will be in Chinese.:
sudo reboot
1.3 Time Correction
Open the luckfox-config tool and select Localisation Options -> Timezone.
For example, if you are in China, select Asia -> Shanghai.
After setting it, use the
date
command to check the date and time, the date and time should now be correctly set according to the chosen timezone.:linaro@linaro-alip:~$ date
2023年 06月 12日 星期一 17:04:28 CST
2. Screen Rotation
2.1 Rotation
Open the configuration file using the following command and change "normal" to "left" or "right". After restarting, the screen will rotate accordingly:
sudo nano /etc/X11/xorg.conf.d/20-modesetting.conf
### Valid values for rotation are "normal", "left", "right"
Section "Monitor"
Identifier "Default Monitor"
Option "Rotate" "normal"
EndSection
2.1 Touchscreen Calibration
After rotating the display, the touchscreen might not be calibrated to match the new screen orientation. Therefore, adjustments need to be made to the touchscreen settings.
Copy the file "40-libinput.conf" to the /etc/X11/xorg.conf.d/ directory:
sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
Edit the file:
sudo nano /etc/X11/xorg.conf.d/40-libinput.conf
Find the section for the touchscreen and add the following lines inside it. Save the file after making the changes:
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1" #right
Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1" #left
![](https://files.luckfox.com/wiki/Core3566/RK3566/Core3566-turn-touch.png)
3. Auto-Start Configuration
In this section, we'll use the example of auto-starting the "OLED_1in5_test.py" program, which has an absolute path of "/home/linaro/OLED_1in5/OLED_1in5_spi.py". Please adjust the file and path according to your specific requirements. (The "OLED_1in5_spi.py" program uses the SPI interface for external device connectivity.)
3.1 Desktop Auto-Start
First, create a "startup.sh" file using the following command (Core3566 default directory is /home/linaro):
sudo touch startup.sh
Open the "startup.sh" script file and add the following content:
#!/bin/sh
sudo python3 OLED_1in5/OLED_1in5_spi.pyGive executable permission to the "startup.sh" script file:
sudo chmod 777 startup.sh
Create an auto-start file:
cd .config && mkdir autostart
cd autostart && sudo nano start.desktopAdd the following content:
[Desktop Entry]
Type=Application
Exec=/home/linaro/startup.shReboot:
sudo reboot
3.2 Adding Auto-Start in rc.local Script
Open the /etc/rc.local script and add the following line before "exit 0":
sudo python3 /home/linaro/OLED_1in5/OLED_1in5_spi.py &
Reboot Core3566:
sudo reboot
3.3 Auto-Start Configuration with System Manager
Create a configuration file for the auto-start service in /etc/systemd/system/OLED_1in5_test.service and add the following content:
[Unit]
Description=start oled
[Service]
Type=simple
Restart=always
RestartSec=5
ExecStart=/home/linaro/OLED_1in5/OLED_1in5_spi.py
[Install]
WantedBy=multi-user.targetEnable a service to automatically start during system boot:
sudo systemctl enable OLED_1in5_test.service
Restart:
sudo systemctl restart OLED_1in5_test.service
Reboot Core3566:
sudo reboot
If you want to disable a service and prevent it from starting automatically during system boot:
sudo systemctl disable OLED_1in5_test.service
4. Samba File Sharing
To transfer files between Windows and Core3566, you can use Samba to set up file sharing. This allows easy access to Core3566's file system from Windows' Network Neighborhood.
Start by updating the sources with the following command:
sudo apt-get update
Install Samba by running the following command:
sudo apt install samba samba-common-bin -y
.After the installation is complete, modify the configuration file /etc/samba/smb.conf:
sudo nano /etc/samba/smb.conf
将 homes 下的 read only = yes 改成 read only = noRestart the Samba service:
sudo /etc/init.d/samba-ad-dc restart
Add the default user "linaro" to Samba by setting a password:
sudo smbpasswd -a linaro
Access Core3566 from Windows by entering the following in the Windows File Explorer address bar (replace the IP address with your actual IP address):
\\192.168.15.102\linaro
Enter the username "linaro" and the password you set earlier to access Core3566's directory.