Jump to content

Levent Erenler

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by Levent Erenler

  1. hi @FeiJi i dont have a bpi m64, so i dont have a chance to test it but i will try on pine64 with 5.10 kernel. A few months ago, I have a similar problem because of broken camera. Everything were looking normal but i was getting error from driver when i checked dmesg. I change cam and it works. Do you have chance to try different camera.
  2. Sorry @@lex for late reply, i did not see any notification until last message. Thank you usb camera formats are; ioctl: VIDIOC_ENUM_FMT Type: Video Capture [0]: 'MJPG' (Motion-JPEG, compressed) [1]: 'YUYV' (YUYV 4:2:2)
  3. Thanks for your support, I prefer 640*480 cause opencv face or tag recognition consume lots of cpu power, 640*480@30 is acceptable. I try a few more resolution and its getting worst [fmt:JPEG_1X8/1280x720] %100 cpu usage limited 15 FPS, could not reach more fps, cpu usage at single core that means not multithreaded [fmt:UYVY8_2X8/1280x720] // %190 cpu usage @30 fps ,multi threaded [fmt:UYVY8_2X8/1980x1080] // could not handle 30fps ,%200 cpu usage at 15FPS UPDATE: my best scenario is fmt:UYVY8_2X8 and opencv CV_CAP_PROP_FOURCC property is CV_FOURCC('Y', 'U', '1', '2') Cpu usage ~%52
  4. yes, u are right that means there is no conversion. The app is very simple; open camera with opencv videocapturer and grap image with opencv(v3.4.10) and calculate fps (no display). Setup Pine64+ 1GB A64 Kernel 5.9.3 with HBV1318 ov5640 usb camera cpu usage is %6-8 at each core and total cpu usage %25 -31 ( 640*480*30FPS) device listed as doccamera: doccamera (usb-1c1a000.usb-1): /dev/video4 /dev/video5
  5. Thank you @@lex i got my new OV5640 camera and working with 5.9.x Cpu usage around %70 with opencv V4l2 capture fmt:UYVY8_2X8/640x480@30FPS and %60 with JPEG_1X8/640x480@30FPS. It is higher than i expect. i thought csi camera uses GPU to grab image. Usb ov5640 cpu usage around %25 with similar settings. is it normal? Do you have any idea. Thank you.
  6. Thanks @guidol I am testing with pine64+ A64 kernel 5.9.5 i have same warnings in original dtb. I try many things but i could not figure whats wrong! I try to compare my dts file with yours.Do you have source, i mean dts files before compiled(easy to read) or is that https://github.com/megous/linux/tree/orange-pi-5.9 Thank you i try to gave more information UPDATE: I found a solution
  7. Hi, do you have a chance to test it? I could not get sound from audio jack. Could you share your dts if the analog audio working? Thank you
  8. yes sensor is ov5640 and not reversed maybe there was a hardware issue, i dont know, i ordered a new one. Btw i have a reversed one (BP camera). I double check everything but no luck. May i ask is ov5640 works without any issue with a64 (pine64) or could you advise any camera ? i need 30 fps 640x480 to process with opencv. Thank you
  9. Thanks for fast reply,First I changed them according to schematic and i checked, gpios are correct, if there was an issue on my camera or not connectted, could i see device wiith "v4l2-ctl --list-devices" ? Maybe there is a problem on camera hardware. Thank you
  10. Hi, I am working more than 4 days but no luck, could you share your dts and config file. I dont understand whats wrong. i get "ov5640 1-004c: ov5640_init_slave_id: failed with -6" error Thank you root@pine64:~# dmesg |grep ov5640 [ 5.692745] sun6i-csi 1cb0000.csi: creating ov5640 1-004c:0 -> sun6i-csi:0 link [ 5.966763] ov5640 1-004c: ov5640_init_slave_id: failed with -6 [ 595.120402] ov5640 1-004c: ov5640_init_slave_id: failed with -6 root@pine64:~# v4l2-ctl --list-devices cedrus (platform:cedrus): /dev/video0 root@pine64:~# lsmod | grep ov ov5640 32768 1 v4l2_fwnode 28672 2 ov5640,sun6i_csi videodev 258048 7 sunxi_cedrus,v4l2_fwnode,ov5640,videobuf2_v4l2,sun6i_csi,videobuf2_common,v4l2_mem2mem mc 57344 7 sunxi_cedrus,videodev,ov5640,videobuf2_v4l2,sun6i_csi,videobuf2_common,v4l2_mem2mem
  11. Actually i am working on pine64 a64+ , i try to enable ov5640. i thought, i could fix with pinetab csi settings as you mention at above.
  12. Yes i did it, unfortunatelly stuck editing dts file. could you give me a start point to use customized dts. I found dtb file under "/build/cache/sources/linux-mainline/orange-pi-5.8/arch/arm64/boot/dts/allwinner/ " but how could i customize dts before compile the kernel, i dont understand. I mean, how to attach customized dts. Thanks for your help.
  13. I try to enable CSI Camera for pine64 A64+ Mainline Kernel (5.8x) config "CONFIG_VIDEO_SUN6I_CSI=m" NOT located in the kernel config file. And I try to add this line to /build/userpatches/linux-sunxi64-current.config and recompile. Unfortunately my compiled konfig file doesnt contain CONFIG_VIDEO_SUN6I_CSI, i try to find it in KKonfig menu but i coult not locate in the menu. Could anyone help? thank you.
  14. there was an issue about mac address when i was working on it. I dont have a setup to test with current kernel sorry
  15. Thanks for your answer, i checked ArmbianIO, it is based on sysfs. pyGPIO is based on dev/mem, this is what i am looking unfortunatelly it does not support interrupts. I could not find a way to get gpio int from memory. thank you.
  16. Hi,I am a developing a c++ application with OPI 0+2 (h5 + mainline kernel), controls a motor with an encoder and a driver. I did it , but it consume to much cpu power (%8) . I could access with using sysfs and character device. Both of them works like open->read->close .Actually it works very well with polling. Unfortunately consume to much cpu. Interrupt freq around 6600hz (150 us) . Is there anyway to control interrupt with dev mem? Or could anyone give me a startup point to access (c++) gpio interrupts efficiently. Btw i tyied libgpiod based on character device. Thank you.
  17. Bluetooth init success with Orange pi zero plus 2 Mainline kernel 5.4.28 i solve problem with these steps: 1) install bluetooth support from armbian-config 2) install devmem2 and compile if not installed wget http://free-electrons.com/pub/mirror/devmem2.c gcc ./devmem2.c mv ./a.out /usr/local/bin/devmem2 3) add modules bluetooth and hci_uart to /etc/modules 4) remove bluetooth service (we will add new script) update-rc.d bluetooth remove 5) remove blutooth init script (editing not worked for me) rm /etc/init.d/bluetooth 6) copy modified bluetooth init script file(ap6212) to /etc/init.d/ 7) edit permissions chmod +x /etc/init.d/ap6212 8) enable service script systemctl enable ap6212 9) reboot after reboot probably you will see your service succefully running systemctl status ap6212 ● ap6212.service - LSB: Start bluetooth daemons Loaded: loaded (/etc/init.d/ap6212; generated) Active: active (running) since Tue 2020-04-28 23:31:54 UTC; 38s ago Docs: man:systemd-sysv-generator(8) Process: 735 ExecStart=/etc/init.d/ap6212 start (code=exited, status=0/SUCCESS) Tasks: 1 (limit: 371) Memory: 4.2M CGroup: /system.slice/ap6212.service └─1071 /usr/sbin/bluetoothd Apr 28 23:31:51 orangepizeroplus2-h5 systemd[1]: Starting LSB: Start bluetooth daemons... Apr 28 23:31:54 orangepizeroplus2-h5 ap6212[735]: Starting Patch ap6212:/dev/mem opened. Apr 28 23:31:54 orangepizeroplus2-h5 ap6212[735]: Memory mapped at address 0xffff87107000. Apr 28 23:31:54 orangepizeroplus2-h5 ap6212[735]: Value at address 0x1F00060 (0xffff87107060): 0x0 Apr 28 23:31:54 orangepizeroplus2-h5 ap6212[735]: Written 0x1; readback 0x1 Apr 28 23:31:54 orangepizeroplus2-h5 ap6212[735]: Starting ap6212: bluetoothd. Apr 28 23:31:54 orangepizeroplus2-h5 systemd[1]: Started LSB: Start bluetooth daemons. Apr 28 23:31:54 orangepizeroplus2-h5 bluetoothd[1071]: Bluetooth daemon 5.50 Apr 28 23:31:54 orangepizeroplus2-h5 bluetoothd[1071]: Starting SDP server Apr 28 23:31:54 orangepizeroplus2-h5 bluetoothd[1071]: Bluetooth management interface 1.14 initialized Q: what is difference between ap6212 and bluetooth service init? A: added gpio controls Now you can attach uart with sucess hciattach /dev/ttyS1 any 115200 flow bdaddr 00:90:4c:c5:12:38 hciconfig hci0 up i could not change mac adress device always setup with AA:AA:AA:AA:AA:AA if you can please let me know. Thanks Save as ap6212 and copy to /etc/init.d/ #! /bin/sh ### BEGIN INIT INFO # Provides: ap6212 # Required-Start: $local_fs $syslog $remote_fs dbus # Required-Stop: $local_fs $syslog $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start bluetooth daemons ### END INIT INFO # # bluez Bluetooth subsystem starting and stopping # # originally from bluez's scripts/bluetooth.init # # Edd Dumbill <ejad@debian.org> # LSB 3.0 compilance and enhancements by Filippo Giunchedi <filippo@debian.org> # # Updated for bluez 4.7 by Mario Limonciello <mario_limonciello@dell.com> # Updated for bluez 5.5 by Nobuhiro Iwamatsu <iwamatsu@debian.org> # # Note: older daemons like dund pand hidd are now shipped inside the # bluez-compat package PATH=/sbin:/bin:/usr/sbin:/usr/bin DESC=ap6212 DAEMON=/usr/sbin/bluetoothd HCIATTACH=/usr/bin/hciattach HID2HCI_ENABLED=1 HID2HCI_UNDO=1 SDPTOOL=/usr/bin/sdptool # If you want to be ignore error of "org.freedesktop.hostname1", # please enable NOPLUGIN_OPTION. # NOPLUGIN_OPTION="--noplugin=hostname" NOPLUGIN_OPTION="" SSD_OPTIONS="--oknodo --quiet --exec $DAEMON -- $NOPLUGIN_OPTION" test -f $DAEMON || exit 0 # FIXME: any of the sourced files may fail if/with syntax errors test -f /etc/default/bluetooth && . /etc/default/bluetooth test -f /etc/default/rcS && . /etc/default/rcS . /lib/lsb/init-functions set -e # FIXME: this function is possibly a no-op run_sdptool() { # declaring IFS local in this function, removes the need to # save/restore it local IFS o test -x $SDPTOOL || return 1 # FIXME: where does SDPTOOL_OPTIONS come from? if ! test -z "$SDPTOOL_OPTIONS" ; then IFS=";" for o in $SDPTOOL_OPTIONS ; do #echo "execing $SDPTOOL $o" IFS=" " if [ "$VERBOSE" != no ]; then $SDPTOOL $o else $SDPTOOL $o >/dev/null 2>&1 fi done fi } hci_input() { log_progress_msg "switching to HID/HCI no longer done in init script, see /usr/share/doc/bluez/NEWS.Debian.gz" || : } fixstart() { log_daemon_msg "Starting Patch $DESC" /usr/local/bin/devmem2 0x1f00060 b 1 echo 10 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio10/direction echo 0 > /sys/class/gpio/gpio10/value echo 1 > /sys/class/gpio/gpio10/value sleep 0.1 } fixstop() { # disable gpio pin, if not wifi not active on soft restart / reboot log_daemon_msg "Disable Patch $DESC" /usr/local/bin/devmem2 0x1f00060 b 0 echo 10 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio10/direction echo 0 > /sys/class/gpio/gpio10/value sleep 0.1 echo 10 > /sys/class/gpio/unexport sleep 0.1 } alias enable_hci_input=hci_input alias disable_hci_input=hci_input alias enable_fix=fixstart alias disable_fix=fixstop case $1 in start) enable_fix log_daemon_msg "Starting $DESC" if test "$BLUETOOTH_ENABLED" = 0; then log_progress_msg "disabled. see /etc/default/bluetooth" log_end_msg 0 exit 0 fi start-stop-daemon --start --background $SSD_OPTIONS log_progress_msg "${DAEMON##*/}" run_sdptool || : if test "$HID2HCI_ENABLED" = 1; then enable_hci_input fi log_end_msg 0 ;; stop) disable_fix log_daemon_msg "Stopping $DESC" if test "$BLUETOOTH_ENABLED" = 0; then log_progress_msg "disabled." log_end_msg 0 exit 0 fi if test "$HID2HCI_UNDO" = 1; then disable_hci_input fi start-stop-daemon --stop $SSD_OPTIONS log_progress_msg "${DAEMON}" log_end_msg 0 ;; restart|force-reload) $0 stop sleep 1 $0 start ;; status) status_of_proc "$DAEMON" "$DESC" && exit 0 || exit $? ;; *) N=/etc/init.d/ap6212 echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 exit 1 ;; esac exit 0 # vim:noet
  18. Hi , i have a same problem with opiz+2 Mainline kernel 5.4.2x i could not find ap6212-bluetooth file (i did it before on legacy kernel), now i have only bluetooth file. I try to edit this file but nothing change. Could you a bit clear how to success with bluetooth. Thanks
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines