Jump to content

nedoskiv

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by nedoskiv

  1. Hello, this is not a big problem, but for me makes a board useless I use orange pi to control ralays thru GPIOs it works flawless on Orange PI PC, PC+, One so I decided to buy Orange PI Lite and I discovered that all gpio are set to high for half a second and then back to low, while unit power up or restarts. Just like an internet router It do that even without a SD card, that points this is coded into U-Boot. Any idea how to fix that?
  2. rc14_one:/sys/bus/w1/devices/28-0115832712ff/driver# echo 12 > 28-0115831d2eff/w1_slave -bash: 28-0115831d2eff/w1_slave: Permission denied setting manual write permission to w1_slave rc14_one:/sys/bus/w1/devices/28-0115832712ff/driver/28-0315826d08ff# echo 12 > w1_slave -bash: echo: write error: Input/output error I was using latest armbian debian jessie. How can I implement that to it?
  3. Main problem is that one sensor uses 10m cable, other uses 50 and they cannot work with same pull up resistor, that is why I need to use second w1 bus Feb 21 21:23:05 localhost kernel: [13093.443868] w1_slave_driver 28-0315826d0aff: 18S20 doesn't respond to CONVERT_TEMP. Feb 21 21:23:06 localhost Temperature-Trigger2: Executing command off for relay 1 Feb 21 21:23:13 localhost kernel: [13101.284256] w1_slave_driver 28-0315826d0aff: 18S20 doesn't respond to CONVERT_TEMP. there may be a way, but i do not have big knowledge of electronics. So far it works with all sensors, with same cable length. and still above error show in log.
  4. It is very usefull, but still do not fix my problem, I need to initialize another W1 bus
  5. Hello, I decided to monitor some temperature stuff at home and used few ds18b20 w1 sensors and they work, but due to some cable limitation and number of the sensors at same point they failed. I decided to test with 10 meters CAT5 FTP cable, changed pull up resistor to 4KO and 3 ds18b20 work at 10m cable on 3.3V, If I add one more they all fail. I switched volatage to 5V and all good, but I wondering is it possible to initialize w1 bus on another GPIO? After I google that and so some reading, people achieve that on raspberry but they patched the kernel somehow. Any idea how can that be done on armbian?
  6. Sorry to write again in this topic, but I just downloaded Armbian_5.24_Orangepipcplus_Ubuntu_xenial_3.4.113 and boot bug persist, but it was a little changed. Assuming I have debian release on EMMC and Ubuntu on external SD card I start the system it, boot from SD. I use reboot command, after that it boots from EMMC, I use reboot command again, and it boots from SD card and so on ............. restarting the system from AC adapter, result always booting from SD card.
  7. Hello, my goal is to use two RC522 RFID readers on orange pi. In order to do that I will need help. Let me first explained how I made one work (googled it read, test and it work) GUIDE HOW TO USE SINGLE RC522 on Orange PI PC hardware connection: MOSI ——————————> pin 19 MISO ——————————-> pin 21 SCLK ——————————-> pin 23 SDA ——————————–> pin 24 RST ———————————> pin 22 IRQ ———————————-> NONE that is all about hardware connection, let look at software part, on Armbian some stuff are out of the box, so we need to install few things only: Install python dev apt-get install python-dev Install orangepi_PC_gpio_pyH3 Library git clone https://github.com/duxingkei33/orangepi_PC_gpio_pyH3.git cd orangepi_PC_gpio_pyH3 python setup.py install Install SPI-Py Library git clone https://github.com/lthiery/SPI-Py.git cd SPI-Py python setup.py install Install MFRC522-python git clone https://github.com/rasplay/MFRC522-python.git tricky part is that MFRC522-python was made to work with Raspberry. In order to work on OPI we need to edit MFRC522.py a little: replace : (it is at beggining at the file) import RPi.GPIO as GPIO with import pyA20.gpio as GPIO comment some lines around (110-115) as shown below: def __init__(self,spd=1000000): spi.openSPI(speed=spd) # GPIO.setcfg(GPIO.BOARD, 1) # GPIO.setup(22, GPIO.OUT) # GPIO.output(self.NRSTPD, 1) self.MFRC522_Init()^M also (around line 355) def MFRC522_Init(self): # GPIO.output(self.NRSTPD, 1) self.MFRC522_Reset(); you are good to go: (try to read a card) python read.py root@orangepione:~/MFRC522-python# python read.py Card read UID: 193,11,21,149,74 Here is the place where single RC522 guided ends and I can ask for a help. I was reading and googling about how to make 2 of those works, there are some solutions maded for Raspberry. I got no skills/knowledge to make them work on orange PI. (example: https://github.com/erivandoramos/TwoRC522RPi) connecting 2 RC522 use common (shared pins) only difference is SDA signal of second rc522 must go to pin 26. MFRC522.py need to be modified, to use SDA to select from which reader it reading data. Reading further, points that same line that we comment in order to run it on OPI are responsible for that. I try to uncomment them but scripts fails, looks like in pyA20.gpio are not present those (or are different) functions that are responsible to control that signal. I got not much python knowledge and cannot solve that. Can someone please help?
  8. I can confirm that, image you pointed at works without any issues (on OPI PC+). Thank you. It was not u-boot bug after all?
  9. by any change you got some time to fix that?
  10. figured it out thanks to you, by pin number they do not means pin number on the connector. so PG6 becomes : G (7) - 1 = 6 6*32 = 192 and then we add number from the name (PG6) 192 + 6 = 198
  11. Hello I'm using OPI PC+ and tried to figure out some free gpio to play with it. Taking a look at forums/etc there are formula to calculate current GPIO number according to this https://linux-sunxi.org/GPIO and some posts here, there is a formula: (position of letter in alphabet - 1) * 32 + pin number so can someone explain me how pin 38 (PG6) becomes GPIO 198? calculation back from the formula point letter F
  12. All right I made it, also discover a bug and open different topic for it. (howto post edited)
  13. Hello I'm using OPI PC + with 8GB external SD card. I detected a strange bug. I was using nand_sata_install.sh script to install Armbian to emmc card. So far so good, I was messed with configuration and decided to start over. Wrote fresh image into SD card and power up. So far so good until I rebooted. System boot up from EMMC instead from external SD card. When reboot again it start from SD card. I was wondering WTF is happening. Thinking about system is somehow confused so I delete emmc card partition. Now even with fresh install it boots one time from SD card, on second reboot it fail too boot (because I erased emmc), when restart again it boot from SD .............. Though that may be problem with my SD card and because got no other card at the moment, decided to go with Loboris image for OPI PC installed debian_jessie_mini and there is no problem. Conclusion is that must be a armbian bug. Can someone else confirm that and suggest how to fix it. I really like armbian, but cannot use it. EDIT: Digging further - problem occurs only when system is rebooted properly - using reboot command for example, if power it off and then on. It boots from proper place.
  14. that is as far as I can go for now my raid 1 boot just once, after that it becomes readonly, system boot up from it again only if I make any change to it filesystem (copy file etc) or make it writeable using MDADM, I deleted whole array and partition, created them again, copy rootfs into it. - no success. Try to read about that into google, nothing found. Guess until that somehow is solved, gonna check that btrfs mirror.
  15. ok I made it, gonna describe now, (some stuff unclear how works). In order to understand me you have to do a software raid1 before, I do not explain how to do it in general. To make in clear, when I say EMMC - it is integrated card, when I say SD card it is external memory card. Let name this INCOMPLETE HOWto - Raid 1 on Orance PI PC + I'm using SD card 8GB and integrated EMMC is also 8GB First thing is to download and copy Armbian image on your external SD card. After that you can configure your network interfaces etc. and install MDADM - when it ask for which array to search enter "all" - it is default When you are done what you have done, use nand-sata-install to install whole distribution to your EMMC. when your system is running from SD card, mount EMMC open /boot/boot.cmd, there is one "setenv bootarg". Inside it is root=UUID........ copy that, now open boot.cmd from your SD card and replace it. This gonna make OPI boot from SD card but mount EMMC card as root file system. Do not forget after editing boot.cmd to execute : mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr reboot, you should be running from EMMC now. run fdisk on /dev/mmcblk0 (this should be SD card). Change partition type from linux natifve to linux raid autodetect (code FD) in order raid1 to work, make sure SD card parition is smaller or equal in size with the patition on EMMC, here is the place to correct that problem, use fdisk to shrink it if needed. (google it to find how) let create the array: mdadm --create /dev/md0 --level 1 --metadata=0.90 --raid-devices=2 /dev/mmcblk0p1 missing execute and fix errors: e2fsck /dev/md0 execute : resize2fs /dev/md0 execute and fix errors: e2fsck /dev/md0 you should be able to mount /dev/md0 now, do it and edit boot/boot.cmd - replace root=UID ....... with root=/dev/md0 (do not forget to execute mkimage with proper paths) edit etc/fstab (change /dev/mmcbl........ with /dev/md0) reboot you should be running frrom SD card not using raid 1 as rootfs, checkit with mount command, search for a line like this: /dev/md0 on / type ext4 (rw,noatime,nodiratime,errors=remount-ro,commit=600) now is the time to run fdisk and modify emmc partition to linux raid autodetect, after that : mdadm --manage /dev/md0 --add /dev/mmcblk1p1 now array need to resync, you can view progress with: cat /proc/mdstat -------------------------- bug ---------------------------- here is the place to mention about a bug in armbian on orange PI PC plus I opened a new topic for it, but keep in mind when you reboot the system properly (using reboot command for example) it will resync the array on startup. That not happen if you unplug from the power for example. https://forum.armbian.com/index.php/topic/2945-boot-bug-on-opi-pc-plus/
  16. Thanks for your replay for me is important to have kind of physical data storage security. I never checked my raid1 disk health, I just check if some of them is kicked out of the array, if so, just replace it. On orange pi it will be impossible for me to replace integrated emmc, but the fact that one mmc is kicked out of raid array will trigger my attention to save the data on it. You also are right about decreasing performance, but that is little price for me to pay for data security. So far I'm stuck during to out of knowledge. For a start I decided to make a test, looked into boot directory and found boot.cmd and boot.scr, inside them is set variable defining rootfs. I decided to convert existing partition to raid array and try to boot it. First step was to install mdadm. After it was installed something draw my attention: Unpacking mdadm (3.3.2-5+deb8u1) ... Processing triggers for systemd (215-17+deb8u4) ... Processing triggers for man-db (2.7.0.2-5) ... Setting up mdadm (3.3.2-5+deb8u1) ... update-initramfs: deferring update (trigger activated) update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults Processing triggers for initramfs-tools (0.120+deb8u2) ... update-initramfs: /boot/initrd.img-3.4.112-sun8i has been altered. update-initramfs: Cannot update. Override with -t option. ............ When I see it mess with initrd, decided to reboot the system to see how it works and it failed to boot. when I restorore /boot/initrd.img-3.4.112-sun8i it boots successful. anyone idea what happen?
  17. I get you point, but gonna dig it further, if you know where I can tell Armbian from what partition to boot will be much helpful
  18. Hello I was wondering how can make possible usage of software raid1, using integrated emmc and another card placed into the slot. So far I have used that on Slackware x86 without any issue, but there I tells the Lilo to boot from /dev/md0 for example. Wonder where I should make adjustments here (in Armbian(. Can someone point me at the right direction?
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines