• Content Count

  • Joined

  • Last visited

About Matthai

  • Rank
    Advanced Member

Recent Profile Visitors

864 profile views
  1. If I say sudo apt update, I got this error: Hit:2 bionic InRelease Hit:3 bionic-security InRelease Hit:4 bionic-updates InRelease Hit:5 bionic-backports InRelease Ign:1 bionic InRelease Err:6 bionic Release Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 443] Reading package lists... Error! W: No system certificates available. Try installing ca-certificates. W: No system certificates available. Try installing ca-certificates. E: The repository ' bionic Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/ports.ubuntu.com_dists_bionic_main_binary-armhf_Packages.lz4 E: The package lists or status file could not be parsed or opened. However, if I open on my computer, TLS connection is just fine. But on a Armbian (Ubuntu 18.04.2 LTS), I got this: curl curl: (77) error setting certificate verify locations: CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs Any idea why this happened?
  2. OK, just an information for others, how I solved this: 1. Install Armbian (on OrangePi Zero H2+) 2. Install Python: sudo apt install python python-pip python-setuptools python-dev 3. Install pyA20: sudo pip install pyA20 4. Install GPIO: git clone cd orangepi_zero_gpio/ sudo python install cd .. 5. Create new Python app: nano With the content: #!/usr/bin/env python import os import sys if not os.getegid() == 0: sys.exit('Script must be run as root') from time import sleep from pyA20.gpio import gpio from pyA20.gpio import port button = port.PA10 gpio.init() gpio.setcfg(button, gpio.INPUT) """Enable pullup resistor""" gpio.pullup(button, gpio.PULLUP) #gpio.pullup(button, gpio.PULLDOWN) # Optionally you can use pull-down resistor try: print ("Press CTRL+C to exit") while True: state = gpio.input(button) # Read button state if (state == 1): print ("The door is OPENED.") else: print ("The door is CLOSED.") sleep(0.5) except KeyboardInterrupt: print ("Goodbye.") 6. Connect reed switch: - one wire to GND - the other wire to GPIO 26 (PA10) 7. Run the app: sudo python The output: The door is OPENED. The door is OPENED. The door is OPENED. The door is OPENED. The door is OPENED. The door is CLOSED. The door is CLOSED. The door is CLOSED. The door is CLOSED. The door is OPENED. The door is OPENED. Now... the web app. But this is another story.
  3. OK, I see. So I connect reed switch to GND and GPIO pin and enable internal resistor: gpio.setcfg(button, gpio.INPUT) gpio.pullup(button, gpio.PULLUP) # enable internal pullup resistor I am confident, but what is happening when device is booting? Is it possible, that device goes to some weird state and GPIO pin set to output during device init? By low value you mean 1k, more, less?
  4. OK, I see. I just got confused by gpio1p40 notation. Thanks for clarification. I assume I can connect switch to 3.3V or GND, it will just read the different state (once open, the other closed). But what about resistor? 4.7 kOhm together with internal pullup resistor seems OK? I mean, it is not necessary, but if GPIO pin is accidentally set to output, then I assume it will protect the board from frying? Or I am wrong?
  5. Sorry, I do not understand. As I understand, this: button = connector.gpio1p40 #CHOW This means, that button is connected to gpio1p40. In your link, I cannot find which pin that would be. I mean physically, where to connect reed switch, on which pins exactly?
  6. I would like to connect reed switch to OrangePi Zero with H2 processor. Can I use this? Under examples, there are two examples I think I could use: - - I have two questions. 1. Where is the pinout? has this code: led = connector.gpio0p0 # This is the same as port.PH2 button = connector.gpio3p40 has this code: led = connector.gpio1p38 # This is the same as port.PH2 button = connector.gpio1p40 #CHOW Which pins are which, where to get the picture of GPIO pins? (And why LED's connector ID's are different in the above examples)? Here is one example of pinouts, but the names are different: 2. Where to connect reed switch? One is one of the GPIO pins, and other? GND, 5V, 3.3V? And - I assume I do not to use a resistor? Or I am wrong?
  7. Thanks for advices. BTW, is there any search engine among these devices? I mean among development boards. That you are able to select how many USB's does it have, does it have HDMI, eMMC,...
  8. Basically a 5V device (powered by micro USB) would be great. I want it to be small and cheap, I intend to use it for a little bit special router/firewall (so it should run Linux). I do not need great network speed (100Mbps is enough). There is also no need for very high performance. No HDMI. USB I need for Yubikey and maybe to connect some other device like printer, webcam...
  9. Hi, I am looking for a device, which has the following hardware: - 2x wifi adapter - 2x ethernet adapter - CSI connector for camera - 2x USB port or 1x USB and 1x USB-C port I know it would be very hard to find such a device, but an option would be to use one USB port and WiFi dongle instead second build-in WiFi and another USB to connect ethernet dogle into it. And for USB-C I can use use an USB-C-to-USB adapter... So at least I would like to find a device with: - 1x wifi adapter - 1x ethernet adapter - CSI connector for camera - 2x or 3x USB port Any ideas?
  10. The idea is to have WifiAP, which connects to VPN. Software on a SD card would be generic, but VPN keys/paswords would be written on a SPI flash.
  11. OrangePi Zero has (according to specifications) 2Mb SPI flash. Sorry for my newbie question, but how is it possible to write there some file and read it later? Or at least some data (string)?
  12. I have OrangePi Zero 512 with Armbian Bionic. I hav econnected LED diode to GPIO PA12 pin. When I (re)boot the device, LED is automatically on. I have to switch it off then manually (with Python script). Is there any config file in Armbian to define which GPIO ports should be switched off?
  13. In this file, you mean in /etc/dnsmasq.conf?
  14. Of course, I am doing IP forwarding: sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" And this: sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT