leavs's note
leavs's note in study and work.
Toggle navigation
leavs's note
Home
About Me
Archives
Tags
Chipsee Frequently Asked Questions 20250217
2023-10-17 14:49:47
221
0
0
leavs
# 两个相同的嵌入式设备之间可以不经过路由器或交换机直接连接吗? ``` 两个设备网线互联可以通信,但是需要网络为交叉线 即一端为568A标准,一端为568B标准。 正常直联线为两端同为568A或568B。 ``` # Win11 ## Microsoft Egde 提示由组织托管 ``` Win+R 输入regedit 找到HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ 然后删除WebWidgetAllowed ``` # All platform ## How to use Python-CAN ``` # Init CAN os.system('sudo ip link set can0 type can bitrate 50000') os.system('sudo ip link can0 up') or os.system('sudo ifconfig can0 up') # Connect CAN can0 = can.interface.Bus(channel = 'can0', bustyp = 'socketcan_ctypes') for python-can v4.0.0 or later, you should use the following, can0 = can.interface.Bus(channel = 'can0', bustype = 'socketcan') # Create message msg = can.Message(arbitration_id=0x123, data=[0, 1, 2, 3, 4, 5, 6, 7], extended_id=False) for python-can v4.0.0 or later, you should use the following, msg = can.Message(is_extended_id=False, arbitration_id=0x123, data=[0, 1, 2, 3, 4, 5, 6, 7]) # Send message can0.send(msg) # Close CAN os.system('sudo ip link can0 down') or os.system('sudo ifconfig can0 down') # Receive message msg = can0.recv(10.0) other usefull message, https://python-can.readthedocs.io/en/stable/interfaces/socketcan.html ``` ## Farad Capacitor for RTC power. ``` 1. The product PPC-CM4-070-D has RTC inside, and we ahve Farad Capacitor inside which can support it 1 week after power off; 2. This product RTC can support by Lithium battery CR1220 also, and it can support around 3 years after power off. We don't install the lithium battery just because it will make the international air shipment very difficult. 3. As for the product customer has on hand, because PPC-CM4-070-D metal can't be opened by customer So it will be difficult to place CR1220 inside. For customer next order, they can inform us they need CR1220 inside, then we can mount for them. And this will not cause any extra cost, but it will casue the shipment time change longer and not reliable. ``` ## How to develop Android serialport application? ``` We are not good at software/application development. I'm sorry, I can not provide helpful advice for your develop language. If you use Java to develop Android applications, I advise you to use google's serial port API. https://code.google.com/archive/p/android-serialport-api/ and Android Studio Project https://github.com/licheedev/Android-SerialPort-API ``` # 4G Module EC2X ## How to check the signal strength on Quectel EC2X modules? ``` You can try AT+CSQ AT Commands. Example # microcom –s 9600 /dev/ttyUSB2 ATE1 // open echo AT+CSQ //query signal strength +CSQ: 28,99 // Returns that the current signal strength indication is 28 and channel bit error rate is 99 ``` ## How to enable roam service on EC20/EC25 ``` # microcom -s 9600 /dev/ttyUSB2 ATE //Set Command Echo Mode AT+QCFG="roamservice" //Set roam service AUTO mode and take effect immediately AT+QCFG="roamservice",2,1 //Enable roam service and take effect immediately AT+QCFG="roamservice",1,1 //Disable roam service and take effect immediately ``` ## How to use AT command to change 4G dialup mode and connect 4G ``` # CDC Ethernet Device Mode echo -e 'AT+QCFG="usbnet",1\r' > /dev/ttyUSB2 echo -e 'AT+CFUN=1,1\r' > /dev/ttyUSB2 After this operation, you need to wait some minutes for 4G module to reset or you can reboot system to check. if the above command work, you can get an ethX socket with a "192.168.x.x" IP address over `ifconfig` command. # Not working? try to add APN # the 3gnet is one APN name, change it to your APN name # China Telecom ==> ctlte or ctnet # China Unicom ==> 3gnet # China Mobile ==> cmnet echo -e 'AT+CGDCONT=1,"IPV4V6","3gnet"' > /dev/ttyUSB2 echo -e 'AT+CFUN=1,1\r' > /dev/ttyUSB2 if you want to reset the 4G module to the default qmi mode, you can issue the following command, # WWAN/QMI device Mode [default mode] echo -e 'AT+QCFG="usbnet",0\r' > /dev/ttyUSB2 echo -e 'AT+CFUN=1,1\r' > /dev/ttyUSB2 ``` # All Platform ##could you share with me the minimum and maximum ranges of the current supply values of the GPIO input pins? ``` The current supply value is 2.27mA ~ 11mA, the voltage is 5V ~ 24V, if you need a bigger voltage than 24V, you can change the circuit, for CS12800R101P products, you can increase the value of R11,R17,R18.R19 which use 2.2KR default for 5V~24V. ```  # IMX6Q ## IMX6Q-How to backup and restore Yocto Linux Qt system and Ubuntu system? ``` Which system do you use? The Yocto Linux Qt5.5 system and Ubuntu system support backup and restore. Refer to follow to know how to do that, ~~~~~~~~~~~~~ There is one mini system which you can make one bootable TF card. https://chipsee-tmp.s3.amazonaws.com/mksdcardfiles/IMX6Q/Tools/prebuilt-imx6qdl-bootfile-update-20220323.tar.gz Use follow commands to make bootable TF card. #./mksdcard.sh --device /dev/sde --cpu 6Q --display 1024600 //or other 1024768 1280800, please check your display resolution. Change the boot mode to SD ( 1 0 0 0) on PCB, then boot this mini system, you can use it to compress the rootfs in eMMC like follow: Now you are in the mini system, run follow command: # mkdir /mnt/rootfs # mount /dev/mmcblk3p2 /mnt/rootfs // mmcblk3p2 is the second partition of your eMMC # cd /mnt/rootfs/ # tar jcvf rootfs.tar.bz2 * //or tar zcvf rootfs.tar.gz *, you need check your rootfs format in prebuilt-xxx/emmc-flash/ # sync Now you get the rootfs.tar.bz2/rootfs.tar.gz, copy ti to USB storage or TF card. # mkdir /mnt/tf # mount /dev/mmcblk1p2 /mnt/tf # cp /mnt/rootfs/rootfs.tar.bz2 /mnt/tf // or cp /mnt/rootfs/rootfs.tar.gz /mnt/tf # sync Use this rootfs.tar.bz2/rootfs.tar.gz to replace the default one in prebuilt-xxx/emmc-flash/emmc/ (prebuilt-xxx is the our released system package) Use the new prebuilt-xxx to make one bootable SD card and use the SD card to flash other boards. ~~~~~~~~~~~~~ You can only use our released system. Another system is not supported. ``` ## IMX6Q-Yocto Linux Qt5.15-How to diable ilitek touchscreen mouse feature? ``` ### 99-disable-mouse.rules ACTION=="add", SUBSYSTEM=="input", ENV{ID_INPUT_MOUSE}=="1", ATTRS{name}=="*ILITEK*", RUN+="/bin/sh -c 'disable-mouse.sh $DEVPATH'" ### disable-mouse.sh #!/bin/sh LOGF=/var/log/disable-touch-mouse.log echo "Touch mouse device path is: " > $LOGF echo $1 >> $LOGF echo "" DEVPATH=`echo $1 | awk '{print substr($0,1,80)}'` NEEDPATH=`echo /sys${DEVPATH}/authorized` if [ -f ${NEEDPATH} ]; then echo "Try to disable touch mouse" >> $LOGF echo 0 > ${NEEDPATH} echo "touch mouse is disabled" >> $LOGF else echo "touch mouse device path is not right. exit" >> $LOGF fi --------------------------------------------------- Put 99-disable-mouse.rules to /etc/udev/rules.d/ Put disable-mouse.sh to /usr/bin/ Then add permission to disable-mouse.sh # chmod +x /usr/bin/disable-mouse.sh reboot to check ``` ## IMX6Q-Yocto Linux Qt5.15-How to use eglfs on Yocto Linux XWayland ``` systemctl stop weston export QT_QPA_EGLFS_KMS_CONFIG=/etc/eglfs.json export QT_QPA_PLATFORM=eglfs export QT_QPA_EGLFS_INTEGRATION=eglfs_viv export QT_QPA_EGLFS_ALWAYS_SET_MODE=1 ``` eglfs.json文件内容如下 ``` { "device": "/dev/dri/card1", "outputs":[ {"name": "DSI1","mode":"1024x600"} ] } ``` ##IMX6Q-Ubuntu18.04-How to setting static ip? ``` This system use NetworkManager to manage the Network, we can use the following commands to setting static ip # Setting static IP nmcli con add type ethernet con-name "static-ip" ifname eth0 ipv4.method manual ipv4.addresses 192.168.81.102/24 gw4 192.168.81.1 nmcli con up static-ip ifname eth0 # Setting DNS nmcli con mod static-ip ipv4.dns "8.8.8.8 8.8.4.4" # Disable Static IP nmcli con down id "static-ip" ifname eth0 ## Enable Static IP nmcli con up static-ip ifname eth0 ## Remove Static IP configration nmcli con delete static-ip ## Check the status of the network nmcli connection show ``` ##IMX6Q-Android6-How to access USB and TF Card Storage in Android6.0 ``` You can find the External TF card and USB Storage in /mnt/media_rw directory. There is one demo to help you know how to access them: https://github.com/leavs/WRFileDemo.git Check https://github.com/leavs/WRFileDemo/blob/master/README.md to know how to use. for the signatures Tools, please download it from follow: https://chipsee-tmp.s3.amazonaws.com/Tools/imx6_android6.0_security.zip ``` ##IMX6Q-Android6-How to setting static IP address in Android6.0 Just run follow command: ``` // Setting IP address # busybox ifconfig eth0 192.168.6.66 netmask 255.255.255.0 // Setting Gateway # route add default gw 192.168.6.1 dev eth0 // Setting DNS # ndc resolver clearnetdns eth0 # ndc resolver setnetdns eth0 "" 8.8.8.8 4.4.4.4 // Enable normal user to access network # ip rule add from all lookup main pref 99 ``` ##IMX6Q-Ubuntu14-How to change the wallpaper of Ubuntu14.04 lxde system? ``` There are two ways to change the wallpaper: 1.Replace the file in /usr/share/lxde/wallpapers/lxde_blue.jpg to yours (Note: you should rename your file to lxde_blue.jpg) 2.Use follow UI opration: Desktop Menu->Preferences->Desktop Preferences->Appearance ``` ##IMX6Q--Yocto Linux Qt5.5--How to enable DHCP permanently ``` The system use connman service to manage the network, it use DHCP default. ``` ##IMX6Q--Yocto Linux Qt5.5--How to start an application automatically ``` Refer to /usr/share/applications/hardwaretest.desktop to write your own desktop file, then put the hardwaretest.desktop file to /etc/xdg/autostart/ directory. The ICO file located in /usr/share/pixmaps/ ``` ##IMX6Q--Yocto Linux Qt5.5--How to change the logo that appears immediately after the boot logo ``` You can download follow tools to change the splash image, there is one guide to help you how to do that in the package. https://chipsee-tmp.s3.amazonaws.com/mksdcardfiles/IMX6Q/Tools/psplash_imx6.zip ``` # IMX6UL ##IMX6UL--How to use scp to deploy application to target board? ``` Add Custom Process Step by using scp commands to deploy application to board. and remove the default one(Upload files via SFTP).Use follow steps: Projects -> Run -> Add Deploy Step: Command: scp Arguments: %{CurrentProject:Name} root@%{CurrentDevice:HostAddress}:%{CurrentRun:Executable:FilePath} Working directory: %{buildDir} launch Qtcreator from follow command: $ cd ~/Qt5.10.1/Tools/QtCreator/bin $ ./qtcreator.sh If you use ssh to connect target board first time from host build system, From here, you need accept authenticity of target board. ``` ##IMX6UL--How to fix the MAC address. ``` You can use "echo" command in console to flash the MAC address in OTP hardware. For Example: MAC Address: 1e:ed:19:27:1a:b5 # echo 0x1eed > /sys/fsl_otp/HW_OCOTP_MAC1 // high 16 bits of MAC address # echo 0x19271ab5 > /sys/fsl_otp/HW_OCOTP_MAC0 // low 32 bits of MAC address ``` `Attention: this way will fuse the OTP hardware, you can do it only one time, if you write it second time, the result is unknown. but you also can change it from uboot (first way), this only affect the system, don't affect the OTP hardware. ` ##IMX6UL--Debian8.10--How to disable password in command execution automatically. ``` /etc/sudoers.d/010_chipsee-nopasswd chipsee ALL=(ALL) NOPASSWD: ALL ``` ##IMX6UL--Debian8.10--How to boot our Application in Auto Run ``` refer to follow file, add your application at the last line of follow file. don't forget to add "@" at the begin of your commands. .config/lxsession/LXDE/autostart ``` ##IMX6UL--Debian8.10--How to setting up X11 VNC ``` x11vnc -storepasswd add follow line to autostart file #.config/lxsession/LXDE/autostart @x11vnc -display :0 -forever -bg -rfbauth /home/chipsee/.vnc/passwd -rfbport 5900 -o /home/chipsee/.vnc/x11vnc.log ``` ## IMX6UL-How to control the brightness ``` You can use the following file to control the backlight, Get max brightness cat /sys/class/backlight/backlight.8/max_brightness Set brightness echo 2 > /sys/class/backlight/backlight.8/brightness or /sys/class/backlight/*/max_brightness /sys/class/backlight/*/brightness ``` ## IMX6UL-IMX6Q-How to setting static IP on Yocto Linux Qt system? ``` This system use connman to manage the network, you can refer to the following documentation to know more. https://wiki.archlinux.org/title/ConnMan you also can disable connman by using the following commands, mv /etc/rc5.d/S05connman ~/S05connman.bak Then use the Networking service to set static IP. file /etc/network/interfaces auto eth0 iface eth0 inet static address 192.168.0.2 netmask 255.255.255.0 gateway 192.168.0.1 Then restart the system to activate it. ``` ## IMX6UL-IMX6Q-How to autostart Application on Yocto Linux Qt system? ``` replace the following line xinit /etc/X11/Xsession -- `which $XSERVER` $ARGS >/var/log/Xsession.log 2>&1 by using the following one xinit /usr/bin/hardwaretest -- `which $XSERVER` $ARGS >/var/log/Xsession.log 2>&1 in file /etc/init.d/xserver-nodm you can use your application to replace /etc/X11/Xsession, now I use /usr/bin/hardwaretest application. reboot to check another solution, refer to /usr/share/applications/hardwaretest.desktop to write your own desktop file, then put it in /etc/xdg/autostart/ directory. at last, reboot to check. ``` #CM4 ## How to reset 4G module on CS10600RA4070 ``` # init the 4G reset io if [ ! -d /sys/class/gpio/gpio6 ]; then echo 6 > /sys/class/gpio/export echo high > /sys/class/gpio/gpio6/direction fi # reset 4G echo 0 > /sys/class/gpio/gpio6/value sleep 1 echo 1 > /sys/class/gpio/gpio6/value wait until /dev/ttyUSB2 online ``` ## How to use Speaker/Headphone on AIO-CM4-101 with lite system? ``` # Check the following configration in /boot/config.txt file dtparam=audio=off //must be off dtoverlay=i2s-mmap dtparam=i2s=on dtoverlay=seeed-2mic-voicecard # Install software sudo apt-get update sudo apt-get install libasound2-plugins # use alsamixer to control the volume Setting Volume for Speaker/Speaker AC/Speaker DC/Playback ``` ## How to fix Camare in bullseye system on Chipsee Industrial Pi product ``` This will only work again if the following command is excluded. Command: # I2C # if use I2C0, we need enalble follow dtoverlay=i2c0,pins_44_45 ``` ## How to use Camera on PPC-CM4-070D product? ``` #1. Get DTB wget -c https://datasheets.raspberrypi.com/cmio/dt-blob-cam1.dts sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-cam1.dts #2. Modify the /boot/config.txt # comment out the follwoing line # camera_auto_detect=1 # Add the following two line start_x=1 gpu_mem=128 #3. Reboot to test vcgencmd get_camera ffplay -f v4l2 -framerate 60 -video_size hd720 /dev/video0 ``` ##CM4-Debian-How to run zigbee2mqtt on Chipsee Industrial Pi with Zigbee? ``` The Zigbee chip on the PPC-CM4-070 and PPC-CM4-101 is CC2531 which had been flashed the CC2531_DEFAULT_20201127.zip firmware. We use the following guide to do that, you don't need flash it again. https://www.zigbee2mqtt.io/guide/adapters/flashing/flashing_the_cc2531.html We tested run zigbee2mqtt, you can refer to the following guide. https://www.zigbee2mqtt.io/ Chipsee Zigbee + PPC-CM4-070/101 act as Zigbee adapters + Raspberry Pi products. You can use the above website to run zigbee2mqtt on Chipsee PPC-CM4-070/101 products. ``` ##CM4-Debian-How to enable system to enter sleep mode? ``` Use our latest system image, https://github.com/Chipsee/industrial-pi#latest-system-images Use the following guide to enable screen blanking. sudo raspi-config ==> Display Options ==> D4 Screen Blanking ==> Yes ==> OK ==> Finish == Yes or use the following UI to enable screen blanking. Menu==>Preferences==>Raspberry Pi Configuration==>Display==>Screen Blanking After the system enter sleep mode, you can touch the touchscreen or use a keyboard/mouse to wake up the system. ``` ##CM4-Debian-VNC error "Missing or corrupt private keys" ``` Try to use the following command to fix, $ sudo Xvnc -generatekeys force ``` ##CM4-Debian-How to use TF card as as general storage? ``` The SD use same pins with WiFi/Bt on CM4 with WiFi/Bt module, they can't be used at same time. You can disable WiFi/BT and enable SD feature by using follow configuration, /boot/config.txt # SD1 dtoverlay=sdio,poll_once=off #dtparam=ant2 ``` ##CM4-Debian-How to get 4G module IMEI by using commands? ``` $ sudo su # cat /dev/ttyUSB2 & # echo -e "AT+GSN\\r\\n" > /dev/ttyUSB2 ``` ##CM4-Debian-System is upgraded, the touchscreen driver is broken, how to fix it? ``` Solution One(recommend): We will use the upstream goodix touchscreen driver. 1. comment the gt9xx line in /opt/chipsee/chipsee-init.sh $ sudo sed -i "s/^modprobe gt9xx/# modprobe gt9xx/g" /opt/chipsee/chipsee-init.sh The diffrence, 255c255 < modprobe gt9xx --- > # modprobe gt9xx 2. Replace gt9xx dtoverlay by using goodix in /boot/config.txt $ sudo sed -i "s/^dtoverlay=gt9xx/dtoverlay=goodix/g" /boot/config.txt The diffrence, 103c103 < dtoverlay=gt9xx,interrupt=20,reset=21 --- > dtoverlay=goodix,interrupt=20,reset=21 3. reboot to check $ sudo reboot Solution two: We will recompile the Chipsee touchscreen driver. $ git clone --depth=1 --branch 6.1.21 https://github.com/Chipsee/industrial-pi.git $ sudo apt update $ sudo apt install raspberrypi-kernel-headers if your kernel is updated to 64bit from 32bit, the above commands will install armhf version raspberrypi-kernel-headers. as the filesystem is 32bit, you should add "arm_64bit=0" to /boot/config.txt to switch the kernel to 32bit first. then reboot to compile touchscreen driver. you can use "uname -ra" to check the current kernel. $ cd industrial-pi/gt9xx/ $ sudo make $ sudo reboot ``` ##CM4--Does the CAN bus on the chipsee support a maximum bitrate of 1 Mbit/sec (CAN 2.0) and 15 Mbits/sec (CAN FD)? ``` This CAN Bus only works on 0 ~ 666kbit/sec, and don't support CAN FD. ``` ##CM4--How to rotate touchscreen ``` You can use follow config to invert touchscreen, dtoverlay=gt9xx,interrupt=20,reset=21,inverted-x=1,inverted-y=1 and reboot to check. another solution, Run sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf Go to Section with “touchscreen” as the identifier Add in line below Option "TransformationMatrix" "-1 0 1 0 -1 1 0 0 1" Example: #270 left dtoverlay=gt9xx,interrupt=20,reset=21,swapped-x-y=1,inverted-x=1 #90 right dtoverlay=gt9xx,interrupt=20,reset=21,swapped-x-y=1,inverted-y=1 #180 invert dtoverlay=gt9xx,interrupt=20,reset=21,inverted-x=1,inverted-y=1 # 270 left Section "InputClass" Identifier "libinput touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1" Driver "libinput" EndSection # 90 right Section "InputClass" Identifier "libinput touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1" Driver "libinput" EndSection # 180 invert Section "InputClass" Identifier "libinput touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Option "TransformationMatrix" "-1 0 1 0 -1 1 0 0 1" Driver "libinput" EndSection ``` ## CM4-Debian-How to change debug port to common port ``` remove "console=serial0,115200" in /boot/cmdline.txt file ``` # CM5 ## CM5-Debian-How to change debug port to common port ``` remove "console=serial0,115200" in /boot/firmware/cmdline.txt file remove "dtparam=uart0_console=on" in /boot/firmware/config.txt file ``` # RK3399 ##RK3399-Debian-Cannot find EGLConfig, returning null config ``` add the following line in /etc/profile export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/aarch64-linux-gnu reboot to run Qt application again. ``` ##RK3399-Debian-libGL error: unable to load driver: rockchip_dri.so. ``` Don't worry about this issue. The Xorg will use libglx.so which will load the dri library. but the implementation of Xorg 2D acceleration from the Rockchip platform is based on DRM, no use dri library directly. So the error message will be here. There is no effect on the operation of the system and application. ``` ##RK3399-Debian11-What's the password of root user? ``` The default user/password for this system is linaro / linaro. The root user has no password default, you can set it by using the following command, sudo passwd ``` ##RK3399-Debian11-How to set language? ``` # English sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen echo "LANG=en_US.UTF-8" >> /etc/default/locale locale-gen reboot # Chinese sed -i 's/^# *\(zh_CN.UTF-8\)/\1/' /etc/locale.gen echo "LANG=zh_CN.UTF-8" >> /etc/default/locale locale-gen reboot ``` ##RK3399-Debian10-How to install man-db? ``` $ sudo systemctl stop hostapd.service $ sudo systemctl disable hostapd.service $ sudo apt-get update $ sudo apt-get install man-db If you got the following message, Ctrl+Z to ignore it and reboot "man-db.service is a disabled or a static unit, not starting it." $ sudo reboot After reboot, issue the following command $ sudo systemctl disable man-db.timer $ sudo dpkg --configure -a $ sudo systemctl enable man-db.timer ``` ##RK3399-Debian10-7" device, how to get IMEI from the system? ``` $ sudo su # cat /dev/ttyUSB6 & # echo -e "AT+GSN\\r\\n" > /dev/ttyUSB6 if there is no /dev/ttyUSB6, try /dev/ttyUSB2 ``` ##RK3399-Debian10-How to disable LXPanel/Taskbar in Desktop? ``` You can use the command sudo chmod -x /usr/bin/lxpanel to make the lxpanel executable file non-executable. This will prevent lxpanel from running, but it will not delete it from your system. You can reverse this by using sudo chmod +x /usr/bin/lxpanel ``` ##RK3399-Debian10-Android7.1-How to use standby mode? ``` ## Debian10/Android7.1 We can short press POWER button to enter or exit standby mode immediately, we also can issue "pm-suspend" command to enter standby mode on Debian10 system and short press POWER button to wake up. long press will power off board. Warrning, the POWER off feature need remove the jumper cap on the PCB. For PPC-A72-133, it locates at P15 on the back side of PCB. We can use the following ways to enter standby mode after the system is in inactive. # Debian10 Use the Display label of Power Manager package to control the brightness of Display. Menu->Preferences->Power Manager->Display This way can only blank the LCD, the system doesn't enter to standby mode, we can touch the screen or press POWER button to turn on the LCD. Warrning, there is one bugs for blanking the LCD, we should disable the Light Locker in Security label of Power Manager package to fix this. Menu->Preferences->Power Manager->Security->Automatically lock the session->Never Use the System label of Power Manager package to control the sleep mode Menu->Preferences->Power Manager->System->System sleep mode->Suspend Also need to setting the inactive time (minutes). Warrning, if we also setting Display blank, after use POWER button to wake up system from sleep mode, we also need to press touch to turn on LCD or disable LCD blank in Display label of Power Manager package. # Android7.1 Use the sleep time to control Setting->Display->Sleep When the system enter to standby mode, we have no other solution to wake up system but press POWER button. ``` ## RK3399-Debian10-How to manage static IP? ``` sudo apt-get update sudo apt-get install network-manager sudo apt-get remove wicd wicd-gtk wicd-daemon python-wicd sudo reboot Then use network-manager to manage network and setting static ip like follow, # IP and Gateway sudo nmcli con add type ethernet con-name "static-ip" ifname eth0 ipv4.method manual ipv4.addresses 192.168.30.2/24 gw4 192.168.30.1 # DNS sudo nmcli con mod static-ip ipv4.dns "8.8.8.8 8.8.4.4" # enable sudo nmcli con up static-ip ifname eth0 # disable sudo nmcli con down id "static-ip" ifname eth0 or sudo nmcli con down id "static-ip" Use network-manager to manage WiFi network like follow, # Check wifi status nmcli device status # disconnect wifi that already connected sudo nmcli con down id <SSID> # connect new wifi sudo nmcli device wifi connect <SSID> password <password> ``` ##RK3399-Debian10-使用NM来管理网络。 以下命令操作一次即可,无需放启动脚本配置静态IP。 ``` # 安装network-manager,删除wicd sudo apt-get update sudo apt-get install network-manager network-manager-gnome(这个包安装后,可通过桌面右下角来查看网络及连接WIFI) sudo apt-get remove wicd wicd-gtk wicd-daemon python-wicd sudo reboot # 设置以太网静态IP nmcli con add type ethernet con-name "static-ip" ifname eth0 ipv4.method manual ipv4.addresses 192.168.81.102/24 gw4 192.168.81.1 nmcli con up static-ip ifname eth0 # 连接WIFI nmcli device wifi connect <SSID> password <password> # 如果要通过WIFI上外网,还需要删除以太网路由 route del -net 0.0.0.0 gw 192.168.81.1 可以把这条指令放/etc/init.d/chipsee_init.sh脚本最后 # 其它操作 ## 设置以太网DNS nmcli con mod static-ip ipv4.dns "8.8.8.8 8.8.4.4" ## 断开以太网 nmcli con down id "static-ip" ifname eth0 ## 启用以太网 nmcli con up static-ip ifname eth0 ## 删除静态IP配置 nmcli con delete static-ip //static-ip对应上面的con-name名称 ## 查看当前连接信息 nmcli connection show ## 查看当前网络连接 nmcli device status ## 断开WIFI连接 nmcli con down id <SSID> ``` ## RK3399-Debian10-NM安装之后出现“No session for pid xxx” pid值对应的程序可以通过如下命令查看 ``` ps aux | grep xxx ``` 一种解决办法 ``` mv /usr/bin/lxpolkit /usr/bin/lxpolkit.bak ``` ## RK3399-Debian10-How to use WICD to manage static IP? ``` You can use the Wicd GUI (if you don't have it, install wicd-gtk) and go to your selected wireless network and open the Preferences menu. There you can check the Use static IPs option and enter your IP address, subnet mask, gateway, and DNS servers You can also edit the /etc/wicd/wireless-settings.conf file manually and specify the IP settings for each network. ``` ## RK3399-Debian10-how to start chromium after system boot 1.touch one desktop file /etc/xdg/autostart/customerapp.desktop ``` [Desktop Entry] Name=CustomerApp Comment=Customer APP Exec=/usr/local/app.sh Terminal=false Type=Application ``` 2.touch app.sh /usr/local/app.sh ``` chromium --start-fullscreen --kiosk --incognito --disable-pinch --overscroll-history-navigation=0 --app=http://chipsee.com ``` ##RK3399--Buildrot Linux Qt5.14--How would we set an app to run at boot for buildroot linux system? ``` There is one service /etc/init.d/S50launcher Replace All "QLauncher" with your application name in this file, then reboot to check. ``` ## RK3399-Debian10-How to disable the panel? ``` You can use the command sudo chmod -x /usr/bin/lxpanel to make the lxpanel executable file non-executable. This will prevent lxpanel from running, but it will not delete it from your system. You can reverse this by using sudo chmod +x /usr/bin/lxpanel ``` ## RK3399-Debian10-how to rotates the screen and touchscreen? ``` # rotate the screen #####/etc/X11/Xsession.d/40x11-common_xsessionrc xrandr --output DSI-1 --rotate left # rotate the touchscreen #####/etc/X11/xorg.conf.d/40-libinput.conf # 90 left Section "InputClass" Identifier "libinput touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1" Driver "libinput" EndSection # 270 right #Section "InputClass" # Identifier "libinput touchscreen catchall" # MatchIsTouchscreen "on" # MatchDevicePath "/dev/input/event*" # Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1" # Driver "libinput" #EndSection # 180 invert #Section "InputClass" # Identifier "libinput touchscreen catchall" # MatchIsTouchscreen "on" # MatchDevicePath "/dev/input/event*" # Option "TransformationMatrix" "-1 0 1 0 -1 1 0 0 1" # Driver "libinput" #EndSection ``` # AM3354 ## How to backup rootfs on AM335X platform? ``` I advise you to backup the contents in eMMC of one device that installed your application, has your special configuration, and works well. You can use the following tool to make a bootable TF card, and use this TF card to boot into the system located in the TF card(one small system on TF card). https://chipsee-tmp.s3.amazonaws.com/mksdcardfiles/AM3354/eMMC/emmc_boot_flash/prebuilt-som-v3-emmc-boot-flash-20190525.tar.gz This tool is used to update kernel/u-boot which can be located in the boot-flash directory of the first boot partition. if there are no contents in the boot-flash directory, this tool can work as one mini system run in a TF card. Change the boot mode to TF boot on the PCB board and insert this TF card. If everything is ok, you can use the TF card system to mount the eMMC partitions. Then backup the contents in eMMC. Use the serial port to log in by user root which has a blank password. mkdir /mnt/emmc mount /dev/mmcblk1p2 /mnt/emmc/ cd /mnt/ tar zcvf rootfs.tar.gz emmc/* after done, we will get the backup rootfs file rootfs.tar.gz. use the rootfs.tar.gz to replace the one in prebuilt-xxx/emmc-flash/emmc/rootfs.tar.gz Then use the new prebult-xxx package to make new TF card for other units. ``` ## AM3354-LinuxQt4.8-如何设置WIFI的静态IP ``` `注意:不能再使用之前的wpatest.sh来连接WIFI,更换成Network服务来连接WIFI` # 修改Networking的启动顺序 mv /etc/rcS.d/S40networking /etc/rcS.d/S70networking # 修改WIFI的SSID和密码 vi /etc/wpa_supplicant.conf network={ ssid="Chipsee" psk="1234567890" } # 修改WIFI静态IP配置 vi /etc/network/interface # Wireless interfaces auto wlan0 iface wlan0 inet static wireless_mode managed wireless_essid any wpa-driver wext wpa-conf /etc/wpa_supplicant.conf address 192.168.6.200 netmask 255.255.255.0 gateway 192.168.6.1 # 重启测试 # 恢复DHCP /etc/network/interface # Wireless interfaces auto wlan0 iface wlan0 inet dhcp wireless_mode managed wireless_essid any wpa-driver wext wpa-conf /etc/wpa_supplicant.conf ``` ## AM3354-Debian7.4-How to disable or enable buzzer when touch the touchscreen ``` # disable echo 0 > /sys/devices/ocp.3/44e0b000.i2c/i2c-0/0-005d/buzopen # enable echo 1 > /sys/devices/ocp.3/44e0b000.i2c/i2c-0/0-005d/buzopen ``` ## AM3354-Debian8.4-How to rotate display and touchscreen ``` The Debian8.4 System uses fbdev module, which does not support rotation by default. You can editing the /etc/X11/xorg.conf file and add one Rotate Option like the following guide, File: /etc/X11/xorg.conf /////////////////////////////////////////////////////// Section "Device" Identifier "Builtin Default fbdev Device 0" Driver "fbdev" Option "Rotate" "UD" //Rotate 180°, "Rotate" "CW" for Rotate 90°, "Rotate" "CCW" for Rotate 270° EndSection ======================================================== For the touchscreen, you can add InvertX and InvertY Option in /usr/share/X11/xorg.conf.d/10-evdev.conf file. File: /usr/share/X11/xorg.conf.d/10-evdev.conf /////////////////////////////////////////////////////// Section "InputClass" Identifier "evdev touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Option "InvertX" "True" //Invert X Axes Option "InvertY" "True" //Invert Y Axes Driver "evdev" EndSection ### For Rotate 90° Option "SwapAxes" "True" //Swap X Axes and Y Axes Option "InvertY" "True" //Invert Y Axes ### For Rotate 270° Option "SwapAxes" "True" //Swap X Axes and Y Axes Option "InvertX" "True" //Invert X Axes ======================================================== At last, reboot to check. ``` # RK3568 ## How to update boot.img standalone for RK3568 product?   ## Can I update the GLIBC from 2.31(Debian11) to 2.35? ``` Upgrading libc from 2.28 or 2.31 to 2.35 on Debian 10 or Debian 11 is not straightforward and can potentially break your system. Debian strongly recommends against such upgrades, as they can lead to a “FrankenDebian” system that is prone to breaking. ``` ## RK3568-Debian11-How to use dd commands to update boot.img ``` dd if=boot.img of=/dev/mmcblk0p3 conv=fsync ``` ## RK3568-Debian11-How to check the eMMC clk ``` cat /sys/kernel/debug/clk/clk_summary | grep cclk_emmc ``` ## RK3568-Android11-Supports root permission and HTML5? ``` Yes, this Android11 system supports root permission and HTML5, the following link shows the test result of the HTML5. https://html5test.com/s/d890a765c61f913e.html ``` ## RK3568-Debian11-How to install qt sqlite driver plugin and serialbus lib? ``` $ sudo apt-get update $ sudo apt-get install libqt5sql5-sqlite libqt5serialbus5 libqt5serialbus5-bin libqt5serialbus5-dev libqt5serialbus5-plugins ``` ## RK3568-Debian11-Does this system supports NODE-RED? ``` You can install Node-RED, but there is no hardware-dependent libraries are supported. you need to add hardware support for Node-RED for this device by yourself. For example, if you need to control the GPIO, you should install one module called node-red-contrib-libgpiod #node-red-contrib-libgpiod sudo apt-get update sudo apt-get install libgpiod-dev cd ~/.node-red npm install node-red-contrib-libgpiod #node-red-node-serialport npm i node-red-node-serialport ```    ## RK3568-Buildlinux-Qt5-How to start application after system boot up ``` # disable panel sed -i 's/^panel-position=bottom/panel-position=none/g' /etc/xdg/weston/weston.ini.d/02-desktop.ini # Add own application to weston startup script Edit /etc/init.d/S49weston file and add your applcation below the following line, start_weston() { /usr/bin/weston& sleep 1 <YOUR-APPLICATION>& } For example, start_weston() { /usr/bin/weston& sleep 1 /usr/hardwaretest/hardwaretest& } # Reboot to check ``` ## RK3568-Buildroot linux-Qt5-How to disable panel and change background ``` # Disable panel sed -i 's/^panel-position=bottom/panel-position=none/g' /etc/xdg/weston/weston.ini.d/02-desktop.ini # Enable panel sed -i 's/^panel-position=none/panel-position=bottom/g' /etc/xdg/weston/weston.ini.d/02-desktop.ini # Change background #####/etc/xdg/weston/weston.ini.d/02-desktop.ini [shell] background-image=/usr/share/backgrounds/gnome/Aqua.jpg # Background pattern (wallpaper) absolute path background-type=tile # scale|scale-crop|tile background-color=0xff002244 # The color format is ARGB8888, effective when no background pattern is set ``` ## RK3568-Buildroot linux-Qt5-Is it possible to insert an animation during boot instead of a static image? ``` Try to put one mp4 file in /etc/bootanim.d/ directory and reboot to check. ``` ## RK3568-Buildroot-How to connect one WiFi? ``` # wifi_start.sh <SSID> <PASSWORD> # sleep 1 # udhcpc -i wlan0 ``` ## RK3568-Debian-Buildroot-How to change logo? ``` Run the following commands on one X86_64 HOST Ubuntu20.04 system or VMware PC. # Get the kernel source code https://chipsee-tmp.s3.amazonaws.com/SourcesArchives/RK3568/Tools/RK3568_KERNEL_20231023.tar.bz2 # Replace the logo file and build new boot.img file tar jxvf RK3568_KERNEL_20231023.tar.bz2 cp <NEW_LOGO_FILE>.bmp RK3568_KERNEL_20231023/logo.bmp cp <NEW_LOGO_FILE>.bmp RK3568_KERNEL_20231023/logo_kernel.bmp ./build.sh After done, we will get boot.img file in current directory. # Replace boot.img in prebuilt-xxx.img file git clone https://gitee.com/chipsee_admin/rk_pack_tools.git cd rk_pack_tools git checkout r510-rk3568 cp <OLD_PREBUILT_IMG_FILE>.img . ./cs-unpack.sh <OLD_PREBUILT_IMG_FILE>.img cp boot.img Image/boot.img ./cs-pack.sh <NEW_PREBUILT_IMG_FILE>.img Now we get the new prebuilt image file with new logo, then flash this image file to target board. ``` ## RK3568-Debian11-QT application will be tearing. ``` System modification =================== $ sudo su # sed -i "s/none/always/g" /etc/X11/xorg.conf.d/20-modesetting.conf # sed -i "s/exa/glamor/g" /etc/X11/xorg.conf.d/20-modesetting.conf # reboot ``` ## RK3568-Debian11-how to rotates the screen and touchscreen? ``` 1.Fix display tearing issue first. $ sudo su # sed -i "s/none/always/g" /etc/X11/xorg.conf.d/20-modesetting.conf # sed -i "s/exa/glamor/g" /etc/X11/xorg.conf.d/20-modesetting.conf 2.Modify the following option in /etc/X11/xorg.conf.d/20-modesetting.conf to rotate display ### Valid values for rotation are "normal", "left", "right" Section "Monitor" Identifier "Default Monitor" Option "Rotate" "normal" EndSection 3.rotate the touchscreen #####/etc/X11/xorg.conf.d/40-libinput.conf # 90 left Section "InputClass" Identifier "libinput touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1" Driver "libinput" EndSection # 270 right #Section "InputClass" # Identifier "libinput touchscreen catchall" # MatchIsTouchscreen "on" # MatchDevicePath "/dev/input/event*" # Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1" # Driver "libinput" #EndSection # 180 invert #Section "InputClass" # Identifier "libinput touchscreen catchall" # MatchIsTouchscreen "on" # MatchDevicePath "/dev/input/event*" # Option "TransformationMatrix" "-1 0 1 0 -1 1 0 0 1" # Driver "libinput" #EndSection ``` # IMX8MP ## IMX8MP-How to use eglfs on Yocto Linux XWayland ``` systemctl stop weston export QT_QPA_EGLFS_KMS_CONFIG=/etc/eglfs.json export QT_QPA_PLATFORM=eglfs export QT_QPA_EGLFS_INTEGRATION=eglfs_viv export QT_QPA_EGLFS_ALWAYS_SET_MODE=1 ``` eglfs.json文件内容如下 ``` { "device": "/dev/dri/card1", "outputs":[ {"name": "DSI1","mode":"1024x600"} ] } ``` ## IMX8MP-How to setting timezone? ``` # timedatectl set-timezone Asia/Shanghai # hwclock -w 或者 ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ``` ## IMX8MP-Can not open Chipsee hardwaretest app again if you run the hardwaretest app in debug port, you get the following error, ``` xdg_wm_base@18: error 4: xdg_surface geometry (1024 x 571) does not match the configured maximized state (1024 x 568) The Wayland connection experienced a fatal error: Protocol error ``` you can useing the following solution do fix the software bugs. ``` # rm .config/Chipsee/ -rf ``` ## IMX8MP-Is their a way to shutdown the yocto device from the command?Everytime we shutwoun though the terminal it restarts automaticaly. ``` You can issue the following command on Yocto Linux, `shutdown -H now` and the following command on Android system, `reboot -p` ``` # STMP25 ## How to change the splash image ``` It is easy to replace the splash image, you can prepare your splash image to replace the /boot/splash_landscape.bmp file and reboot to check. ``` ## What is the default user, how to use root permission? ``` The default user is weston, for the root permission, you can use "su" command. it is not debian/ubuntu system, you can not use "sudo su". ```
Pre:
IMX8MP测试实例
Next: No Post
0
likes
221
Weibo
Wechat
Tencent Weibo
QQ Zone
RenRen
Submit
Sign in
to leave a comment.
No Leanote account?
Sign up now.
0
comments
More...
Table of content
No Leanote account? Sign up now.