edupv

Members
  • Content Count

    25
  • Joined

  • Last visited

About edupv

  • Rank
    Member

Recent Profile Visitors

429 profile views
  1. edupv

    NanoPI M4

    May be yes, I don't know. Anyway, I have tested all the above mentioned pins for output mode with a led (with a resistor in series, of course). The scripts is attached : heartbeat.sh
  2. edupv

    NanoPI M4

    I think the correct formula for the port number is (32p + 8q + r) , whe´╗┐re p, q, r are from the pin name GPIOp_qr. q is ABCD corresponding to 0123. For example, pin# 8, GPIO4_C1, port number = (32x4 + 8x2 + 1) = 145. All the port number of the 40 pins GPIO header with names GPIOp_qr : PIN# Assignment Port number PIN# Assignment Port number ==== ========== =========== ==== ========== =========== 7 GPIO1_A0 32 8 GPIO4_C1 145 11 GPIO1_A1 33 10 GPIO4_C0 144 13 GPIO1_A3 35 12 GPIO1_C2 50 15 GPIO1_A4 36 16 GPIO1_C6 54 18 GPIO1_C7 55 22 GPIO1_D0 56 26 GPIO4_C5 149 I tested all the above pins for output mode with a led.
  3. edupv

    NanoPI M4

    I just checked the GPIO port numbers calculated by the above formula by using a led, only GPIO1_A0/1/3/4 are correct, other pins are all incorrect. Therefore, by the above formula, I know four port numbers only : PIN# Assignment Port number ==== ========== =========== 7 GPIO1_A0 32 11 GPIO1_A1 33 13 GPIO1_A3 35 15 GPIO1_A4 36
  4. edupv

    NanoPI M4

    From here, you can check the pin names : http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M4#Diagram.2C_Layout_and_Dimension. I read somewhere, the formula of the port number is (32p + q + r) , where p, q, r are from the pin name GPIOp_qr. q is ABCD corresponding to 0123. For example, the name of pin 7 is GPIO1_A0, the port number is 32 x 1 + 0 + 0 = 32. Sorry, the above formula is incorrect, please read the following 2 posts.
  5. edupv

    NanoPI M4

    If you are developing applications yourselves, you can consider the following generic gpio libraries : python : https://github.com/derekstavis/python-sysfs-gpio golang : https://github.com/brian-armstrong/gpio They can be used in all the boards. From one board to another board needs only changing the gpio port numbers. (e.g. Physical pin 7 of gpio header, OrangePi port number is 6, you have to change the port number to 32 for a Nanopi-M4).
  6. edupv

    NanoPI M4

    Actually, it is a raid. https://www.unitek-products.com/product/usb-storage?view=product&id=197. I power it by using a micro-usb cable plugged into the DC IN socket of the enclosure, the other end of the cable plugged into a 5V USB PSU. When the board is off, plugging the usb cable of the raid to the usb port of board (while type-c power supply cable unplugged) will not turn the board on. However, when the board is powered on with both of the cables plugged in, unplugging the type-c power cable will not turn it off, it is still powered by the usb cable of the raid.
  7. edupv

    NanoPI M4

    The USB port can keep the board running by supplying power ? I have an external powered USB hard disk connected to my Nanopi-M4. Today, I did something wrong and I cannot connect to the board (as a headless server) through SSH, so I pulled the power cable to power down the board. However, the board kept running, and the green led kept flashing. It was powered down when I also unplugged the USB cable.
  8. If your OPi PC can respond to ping, then it is not freeze and watchdog will not reset it normally. I think you have to check (for example) if the sshd is listening to the correct port/interface, the firewall rules etc. If your OPi PC is not directly connected to the internet, then you should also check the port forwarding rule of your router etc....
  9. I think it is working fine. However, watchdog will only function when system hangs, it does not function normally. Therefore, I said "I think".
  10. Thanks for your explanation.
  11. CONFIG_BTRFS_FS_CHECK_INTEGRITY is not enabled in config. When I tried to enable it in the armbian build system, I saw the word "DANGEROUS". Is this an unstable (or dangerous) feature ? Should I enabled it and use it ? if not, how to ensure data integrity ?
  12. edupv

    Hardware line is missing on /proc/cpuinfo

    A dirty hack to make it working in orangepi PC2 immediately : Edit the file WiringOP/wiringPi/wiringPi.c (https://github.com/tumugin/WiringOP), change the function isH5(void) to : int isH5(void) { return 1; } then "sudo ./build". I don't know C language, so there is no better way for me. Edit : I have verified the following is working, other pins/functions are not tested : ## Tested with LED + resistor across physical pin 1 (3.3V) and pin 7 PORT=7 gpio mode $PORT out gpio write $PORT 0; ## LED on gpio write $PORT 1; ## LED off
  13. Yes, you can run these commands in /etc/rc.local. Moreover, the above may not be the best values for up_threshold/sampling_rate. You can test different values yourself.
  14. You can adjust these 2 parameters, for example : echo 65 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate Then CPU clock will go to 408MHz when idle.
  15. Thanks for your reply. I don't know C language, so I seldom check the source code. After reading your reply, I tested the timeout with a script. Yes, it is really 16 seconds. Thanks again for your help.