Jump to content

nopnop2002

Members
  • Posts

    76
  • Joined

  • Last visited

Recent Profile Visitors

3611 profile views
  1. sudo wget http://goo.gl/vewCLL -O /etc/apt/sources.list.d/rpimonitor.list sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2C0D3C0F sudo apt update sudo armbianmonitor -r sudo rm /etc/apt/sources.list.d/rpimonitor.list
  2. OrangePi PC can enable USB OTG by following the steps below. $ cat /etc/debian_version 12.1 $ uname -a Linux orangepipc 6.1.47-current-sunxi #1 SMP Wed Aug 23 15:52:42 UTC 2023 armv7l GNU/Linux $ sudo sh -c "echo 'g_serial' >> /etc/modules" $ cat /etc/modules # /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. g_serial $ sudo sh -c "echo 'ttyGS0' >> /etc/securetty" $ cat /etc/securetty ttyS0 ttyGS0 $ sudo systemctl enable serial-getty@ttyGS0.service $ sudo shutdown -r now
  3. Install kernel header using armbian-config or these command. sudo apt-get update sudo apt-get -y install linux-headers-$(uname -r)
  4. Do you have terminator register?? It's mine. $ cat /boot/armbianEnv.txt verbosity=1 logo=disabled console=both disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 rootdev=UUID=4c260e6c-6b83-490b-9c33-a1c61c5840a5 rootfstype=ext4 overlays=i2c0 i2c1 i2c2 spi-spidev extraargs=net.ifnames=0 ##param_spidev_spi_bus=0 user_overlays=spi-mcp251x usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u $ dmesg| grep 'can\|mcp\|spi' [ 5.578413] mcp251x spi0.0 can0: MCP2515 successfully initialized. [ 137.204768] can: controller area network core (rev 20170425 abi 9) [ 137.219630] can: raw protocol (rev 20170425) $ lsmod | grep can can_dev 20480 1 mcp251x $ ls /sys/bus/spi/devices/spi0.0 driver modalias net of_node power statistics subsystem uevent $ ls /sys/bus/spi/devices/spi0.0/net can0 $ ls /sys/bus/spi/devices/spi0.0/net/can0 addr_assign_type dev_id link_mode proto_down address dev_port mtu queues addr_len dormant name_assign_type speed broadcast duplex netdev_group statistics carrier flags operstate subsystem carrier_changes gro_flush_timeout phys_port_id tx_queue_len carrier_down_count ifalias phys_port_name type carrier_up_count ifindex phys_switch_id uevent $ sudo ip link set can0 type can bitrate 125000 triple-sampling on $ sudo ifconfig can0 can0: flags=128<NOARP> mtu 16 unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 $ sudo ifconfig can0 up $ sudo ifconfig can0 can0: flags=193<UP,RUNNING,NOARP> mtu 16 unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  5. I tried install spi-mcp251x.dts on my opi-pc. $ uname -a Linux orangepipc 4.19.20-sunxi #5.75 SMP Sat Feb 9 19:02:47 CET 2019 armv7l GNU/Linux $ ls spi-mcp251x.dts spi-mcp251x.dts I added set -x to /usr/sbin/armbian-add-overlay $ sudo armbian-add-overlay ./spi-mcp251x.dts + [[ ! -n ./spi-mcp251x.dts ]] + [[ 0 -ne 0 ]] + [[ ! -f ./spi-mcp251x.dts ]] + [[ ./spi-mcp251x.dts == *.dts ]] ++ basename ./spi-mcp251x.dts .dts + fname=spi-mcp251x + [[ ! -f /etc/armbian-release ]] + [[ ! -f /boot/armbianEnv.txt ]] + . /etc/armbian-release ++ BOARD=orangepipc ++ BOARD_NAME='Orange Pi PC' ++ BOARDFAMILY=sun8i ++ VERSION=5.75 ++ LINUXFAMILY=sunxi ++ BRANCH=next ++ ARCH=arm ++ IMAGE_TYPE=stable ++ BOARD_TYPE=conf ++ INITRD_ARCH=arm ++ KERNEL_IMAGE_TYPE=zImage + [[ sunxi != sunxi ]] + [[ next != next ]] ++ uname -r + [[ -d /lib/modules/4.19.20-sunxi/build/scripts/dtc ]] ++ uname -r + [[ ! -x /lib/modules/4.19.20-sunxi/build/scripts/dtc/dtc ]] + echo 'Error: kernel headers are not installed properly' Error: kernel headers are not installed properly + echo 'Can'\''t find dtc that supports compiling overlays' Can't find dtc that supports compiling overlays ++ uname -r + echo 'Please install the headers package for kernel 4.19.20-sunxi' Please install the headers package for kernel 4.19.20-sunxi + exit -1 $ ls /lib/modules/4.19.20-sunxi/build/scripts/dtc/ checks.c dtc-parser.y fdtput.c livetree.c treesource.c data.c dt_to_config flattree.c Makefile update-dtc-source.sh dtc.c dtx_diff fstree.c Makefile.dtc util.c dtc.h fdtdump.c include-prefixes srcpos.c util.h dtc-lexer.l fdtget.c libfdt srcpos.h version_gen.h Can I have some advice? EDIT: remove kernel header from system update dtc resolved. $ dtc -v Version: DTC 1.4.2 $ wget https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/dtc-1.4.7.tar.gz $ tar xvfz dtc-1.4.7.tar.gz $ cd dtc-1.4.7/ $ make $ sudo cp ./dtc /usr/bin/ $ dtc -v Version: DTC 1.4.7 $ sudo armbian-add-overlay ./spi-mcp251x.dts Compiling the overlay Copying the compiled overlay file to /boot/overlay-user/ Reboot is required to apply the changes
  6. I installed Armbian_5.75_Orangepizeroplus2-h3_Debian_stretch_next_4.19.20. But it can't boot up. These image can boot up. Armbian_5.65_Orangepizeroplus2-h3_Debian_stretch_next_4.14.78 Armbian_5.69_Orangepizeroplus2-h3_Debian_stretch_next_4.19.13
  7. I was wrong. I used USB-TTL converter with a debugg port. When I remove USB-TTL converter,my SG90 work perfect. #!/bin/bash #Export PWM channel for user control. sudo sh -c "echo 0 > /sys/class/pwm/pwmchip0/export" #Select the period of PWM signal. Value is in nanoseconds. sudo sh -c "echo 20000000 > /sys/class/pwm/pwmchip0/pwm0/period" #Change the polarity of the PWM signal. #The polarity can only be changed if the PWM is not enabled. sudo sh -c "echo "normal" > /sys/class/pwm/pwmchip0/pwm0/polarity" #Enable the PWM signal. sudo sh -c "echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable" #Select the duty cycle. Value is in nanoseconds and must be less than the period. #Move to Center sudo sh -c "echo 1450000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle" sleep 2 #Move to Angle +90 sudo sh -c "echo 2350000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle" sleep 2 #Move to Angle -90 sudo sh -c "echo 600000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle" sleep 2 #Move to Center sudo sh -c "echo 1450000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle" sleep 2 #Disable the PWM signal. sudo sh -c "echo 0 > /sys/class/pwm/pwmchip0/pwm0/enable" #UnExport PWM channel for user control. sudo sh -c "echo 0 > /sys/class/pwm/pwmchip0/unexport"
  8. Hello. I added overlays=pwm to /boot/armbianEnv.txt and reboot system. $ cat /boot/armbianEnv.txt verbosity=1 logo=disabled console=both disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 rootdev=UUID=3d863bb3-b616-4229-94e7-8c92ac95501a rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u overlays=pwm Armbian can't boot-up. ** Unable to read "/boot/boot.env" from mmc0:1 ** Failed (-5) In: serial Out: serial Err: serial Net: phy interface0 eth0: ethernet@1c30000 230454 bytes read in 23 ms (9.6 MiB/s) starting USB... USB0: USB EHCI 1.00 USB1: USB OHCI 1.0 USB2: USB EHCI 1.00 USB3: USB OHCI 1.0 USB4: USB EHCI 1.00 USB5: USB OHCI 1.0 scanning bus 0 for devices... 1 USB Device(s) found scanning bus 2 for devices... 1 USB Device(s) found scanning bus 4 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Autoboot in 1 seconds, press <Space> to stop switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot/boot.scr 3708 bytes read in 18 ms (201.2 KiB/s) ## Executing script at 43100000 U-boot loaded from SD Boot script loaded from mmc 214 bytes read in 15 ms (13.7 KiB/s) 5104363 bytes read in 264 ms (18.4 MiB/s) 6985408 bytes read in 359 ms (18.6 MiB/s) Found mainline kernel configuration 32108 bytes read in 60 ms (522.5 KiB/s) 884 bytes read in 130 ms (5.9 KiB/s) Applying kernel provided DT overlay sun8i-h3-pwm.dtbo 4179 bytes read in 127 ms (31.3 KiB/s) Applying kernel provided DT fixup script (sun8i-h3-fixup.scr) ## Executing script at 44000000 Warning: Disabling ttyS0 console due to enabled PWM overlay ## Loading init Ramdisk from Legacy Image at 43300000 ... Image Name: uInitrd Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 5104299 Bytes = 4.9 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 43000000 Booting using the fdt blob at 0x43000000 Loading Ramdisk to 49b21000, end 49fff2ab ... OK reserving fdt memory region: addr=43000000 size=6e000 Loading Device Tree to 49ab0000, end 49b20fff ... OK Starting kernel ... System information $ cat /etc/armbian-release # PLEASE DO NOT EDIT THIS FILE BOARD=orangepipc BOARD_NAME="Orange Pi PC" BOARDFAMILY=sun8i VERSION=5.65 LINUXFAMILY=sunxi BRANCH=next ARCH=arm IMAGE_TYPE=stable BOARD_TYPE=conf INITRD_ARCH=arm KERNEL_IMAGE_TYPE=zImage Can't I use sun8i-h3-pwm.dtbo?
  9. I'm trying to compile 8192EU chip driver. But I can't find linux-headers-4.14.78-sunxi orangepi@orangepipc:~$ uname -r 4.14.78-sunxi orangepi@orangepipc:~$ ls /usr/src linux-headers-4.14.70-sunxi orangepi@orangepipc:~$ uname -a Linux orangepipc 4.14.78-sunxi #412 SMP Fri Oct 26 11:37:04 CEST 2018 armv7l GNU/Linux
  10. Without using WiringPi, address operation of gpio is being performed directly, so NeoUart doesn't work with Opi. I have not tried, but you can probably use this. https://github.com/vanvught/rpidmx512/tree/master/lib-ws28xx
  11. Try this https://github.com/wertyzp/WiringNP It's my environment $ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" $ cat /etc/armbian-release # PLEASE DO NOT EDIT THIS FILE BOARD=nanopineo BOARD_NAME="NanoPi Neo" BOARDFAMILY=sun8i VERSION=5.60 LINUXFAMILY=sunxi BRANCH=next ARCH=arm IMAGE_TYPE=stable BOARD_TYPE=conf INITRD_ARCH=arm KERNEL_IMAGE_TYPE=zImage
  12. try sudo h3disp -m 5 -d and reboot If you get a clear display, you can set the display area to 800x480 later by modifying the script.bin file. [disp_init] disp_init_enable = 1 disp_mode = 0 screen0_output_type = 3 screen0_output_mode = 5 screen1_output_type = 3 screen1_output_mode = 5 fb0_format = 0 fb0_width = 800 fb0_height = 480 fb1_format = 0 fb1_width = 0 fb1_height = 0 hdcp_enable = 1
  13. A method the infrared reception and the infrared transmission for which lirc isn't used by this page is introduced. http://feijoa.jp/laboratory/raspberrypi/infrared/ So I tried whether it work using OrangePi-PC. It work fine. $ cc scanir.c -o scanir -lwiringPi -lpthread $ sudo ./scanir tv_on.ir write file: tv_on.ir scaning pin: 7 (wiringpi) max keep time: 40(ms) Infrared LED scanning start. Pressed Ctrl+C, this program will exit. Scanning has been done. $ ls -l tv_on.ir -rw-r--r-- 1 root root 476 Jun 26 07:56 tv_on.ir $ cc sendir.c -lm -o sendir -lwiringPi -lpthread $ sudo ./sendir tv_on.ir 1 14 read file: tv_on.ir output pin: 14 (wiringpi) unit: 26ms duty:9-17 send infrared signal. send data. done scanir The first argument is file name of output. The second argument is The pin number of Infra red sensor.(The pin number of WiringPi, Default is 7.) The third argument are the biggest duration. When infrared rays didn't light up more than this time, the biggest duration considers a transmission from a remote control to end, ends the reading and extracts a file. sendir The first argument is file name of read. The second argument is repeat counter. The third argument are The pin number of Infra red transmitter.(The pin number of WiringPi) The fourth argument are Frequency of transmit signal. The fifth argument are Molecule compared with duty The sixth argument are denominator compared with duty.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines