jdugat
Members-
Posts
18 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
I was looking at one of the examples, and the connector for GPIO40 was. connector.gpio1p40, so I assumed (I know a major screw up) that's how they were mapped. I'm guessing by your reply that is not the case. Here's the code I was looking through for ideas. 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 from pyA20.gpio import connector __author__ = "Stefan Mavrodiev" __copyright__ = "Copyright 2014, Olimex LTD" __credits__ = ["Stefan Mavrodiev"] __license__ = "GPL" __version__ = "2.0" __maintainer__ = __author__ __email__ = "support@olimex.com" button = connector.gpio1p40 gpio.init() gpio.setcfg(led, gpio.OUTPUT) try: print ("Press CTRL+C to exit") while True: gpio.output(led, 1) print "led set 1 \r\n" sleep(2) gpio.output(led, 0) print "led set 0 \r\n" sleep(2) """ gpio.output(led, 1) sleep(0.1) gpio.output(led, 0) sleep(0.1) sleep(0.6) """ except KeyboardInterrupt: print ("Goodbye.")
-
Zador, Thanks for your insights and the map on the gpio pins. I really appreciate the help.
-
okay...I wasn't clear on the GPIO-17 and PA17 naming conventions. So GPIO-19 will be a better starting point for me to test with. In that case I'm going to assume that the connector.gpiolp19 would be GPIO-19?
-
Looks like PA17 is not being used. I guess my next step to is figure out which connector. its assigned to.
-
Please forgive my ignorance, but is there a way to test the availability of a of pin?
-
Yes, sorry for the confusion. What would be a good one that's in the userspace already? Presently, I'm not using any of the pins that the arrow in the image below is pointing to.
-
Sorry, then as per usual I confused everything. All I want to do set a pin high on the GPIO that I can read on the ESP8266 using something like the python code below. I just don't know which of the GPIO pins on the OPiZ I can use. Of course, I'll make sure that the GPIO pin is set to LOW when the OPiZ boots up. 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 from pyA20.gpio import connector __author__ = "Stefan Mavrodiev" __copyright__ = "Copyright 2014, Olimex LTD" __credits__ = ["Stefan Mavrodiev"] __license__ = "GPL" __version__ = "2.0" __maintainer__ = __author__ __email__ = "support@olimex.com" pin15 = connector.LEDp2 # This is the same as port.STATUS_LED gpio.init() gpio.setcfg(pin15, gpio.OUTPUT) sleep(2)
-
From the picture below do I have the correct pin you are talking about (fourth down from the top on the right side of the double pinned row) ?
-
I know most of the posts in this thread have to do with doing more complex things with the GPIO than what I want to do, but thought it would be a good place to ask (I hope) a simple question. I have a OPiZero (with usb expansion board) connected to a web cam using motion. I've got everything working just find, however, every now and again the /dev/video0 or /dev/video1 (probably the usb camera) will decide not to initialize and reboot will not correct the issue. I have an ESP8266 connected to the battery supplying the OPiZero, so I can monitor it to make sure the battery doesn't get to low. The ESP8266 can shut the power off to the OPiZero with a simple relay inline with the usb power cable. What I'd like to be able to do is set a pin to high on the OPiZero and read it on the ESP8266, so it can cycle the power. I think this is possible, but I'm still fairly green on GPIO usage. Can someone tell me which pin I could use to do something like this and would I be able to set the pin to a HIGH status with something as easy as a bash statement like echo out > gpio67/direction ? Any help would be greatly appreciated! Thanks.
-
Orange Pi Zero - wifi adapter wlx20xxxxxxxxxx <SOLVED>
jdugat replied to jdugat's topic in Orange Pi Zero
With ARMBIAN 5.32 user-built Ubuntu 16.04.3 LTS 4.11.5-sun8i, you will need to do the following to change the name of your wifi-dongle adapters: nano /etc/udev/rules.d/70-persistent-net.rules Add the following line (example shows both wlan0 and wlan1) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<put your wifi dongle MAC address here>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<put your wifi dongle MAC address here>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0" if your wifi-dongle MAC address is 78:df:32:3d:0c:af then the line for wlan0 would look exactly like this: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="78:df:32:3d:0c:af", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0" Save the 70-persistent-net.rules file (for nano type ctrl-o, enter key, ctrl-x) and reboot your board. I hope this helps. -
Dmitry, Thanks for your post replacing "extern __inline" with "static __inline" in the include file include/ieee80211.h allowed me to get the 8192cu fixes driver installed. However, now that the driver is installed, wlan0 has disappeared and the wlx74da383b0bcf interface name remains. If I find anything else out on how to get a wifi dongle to work in the Orange Pi Zero with the wlan0, I will post updates here.
-
I have a wifi dongles that aren't showing up with the usual wlan0/1 identifier, below is what I've discovered so far, but if anyone can shed some light on this, I'd be much appreciative. ifconfig -a I get the following: wlx20e816006af8 Link encap:Ethernet HWaddr 20:e8:16:00:6a:f8 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 TX bytes:0 (0.0 if I do iwconfig wlx20e816006af8 essid myhomesid channel 6, I get no errors, however, when I do the iwconfig wlx20e816006af8 commit I get the following error: Error for wireless request "Commit changes" (8B00) : SET failed on device wlx20e816006af8 ; Operation not supported. if I try to to do ifconfig wlx20e816006af8 IP 192.168.1.100, I get unknown host. the only policy rule that I have in the /etc/udev/rules.d directory is as follows: 71-axp-power-button.rules Below are the output from lsusb, lsmod and login info: LSMOD Module Size Used by mt7601u 53248 0 sun8i_codec_analog 24576 0 snd_soc_core 122880 1 sun8i_codec_analog mac80211 335872 1 mt7601u snd_pcm_dmaengine 16384 1 snd_soc_core cfg80211 204800 2 mac80211,mt7601u sun8i_ths 16384 0 snd_pcm 77824 2 snd_pcm_dmaengine,snd_soc_core rfkill 24576 3 cfg80211 thermal_sys 57344 1 sun8i_ths uio_pdrv_genirq 16384 0 uio 16384 1 uio_pdrv_genirq usb_f_acm 16384 1 u_serial 20480 3 usb_f_acm g_serial 16384 0 libcomposite 40960 2 g_serial,usb_f_acm uas 20480 0 LSUSB Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 002: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 002: ID 0781:5571 SanDisk Corp. Cruzer Fit Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Armbian version ___ ____ _ _____ / _ \ _ __ __ _ _ __ __ _ ___ | _ \(_) |__ /___ _ __ ___ | | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | | / // _ \ '__/ _ \ | |_| | | | (_| | | | | (_| | __/ | __/| | / /| __/ | | (_) | \___/|_| \__,_|_| |_|\__, |\___| |_| |_| /____\___|_| \___/ |___/ Welcome to ARMBIAN 5.32 user-built Ubuntu 16.04.3 LTS 4.11.5-sun8i System load: 0.10 0.04 0.01 Up time: 55 min Memory usage: 10 % of 242MB IP: 192.168.1.118 CPU temp: 68°C Usage of /: 9% of 15G [ General system configuration: armbian-config ] Last login: Thu Sep 14 12:42:33 2017 from 192.168.1.135
-
Below is my attempt to compile the RealTek 8192cu driver for my ARMBIAN 5.31 stable Ubuntu 16.04.3 LTS 3.4.113-sun8i image running on my Orange Pi Zero. The BOLD area's below are the commands, I typed, everything else is exactly the way it came across on the console. Any help will be greatly appreciated. -0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0--0-0- root@orangepizero:~# apt-get install --reinstall linux-headers-$(uname -r) linux-headers-generic build-essential dkms git Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'linux-headers-sun8i' instead of 'linux-headers-3.4.113-sun8i' The following additional packages will be installed: linux-headers-4.4.0-93 linux-headers-4.4.0-93-generic The following NEW packages will be installed: linux-headers-4.4.0-93 linux-headers-4.4.0-93-generic linux-headers-generic 0 upgraded, 3 newly installed, 4 reinstalled, 0 to remove and 0 not upgraded. Need to get 10.8 MB/19.3 MB of archives. After this operation, 78.1 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://ports.ubuntu.com xenial-security/main armhf linux-headers-4.4.0-93 all 4.4.0-93.116 [9,981 kB] Get:2 http://ports.ubuntu.com xenial-security/main armhf linux-headers-4.4.0-93-generic armhf 4.4.0-93.116 [822 kB] Get:3 http://ports.ubuntu.com xenial-security/main armhf linux-headers-generic armhf 4.4.0.93.98 [2,276 B] Fetched 10.8 MB in 3s (2,918 kB/s) (Reading database ... 43646 files and directories currently installed.) Preparing to unpack .../build-essential_12.1ubuntu2_armhf.deb ... Unpacking build-essential (12.1ubuntu2) over (12.1ubuntu2) ... Preparing to unpack .../dkms_2.2.0.3-2ubuntu11.3_all.deb ... Unpacking dkms (2.2.0.3-2ubuntu11.3) over (2.2.0.3-2ubuntu11.3) ... Preparing to unpack .../git_1%3a2.7.4-0ubuntu1.2_armhf.deb ... Unpacking git (1:2.7.4-0ubuntu1.2) over (1:2.7.4-0ubuntu1.2) ... Selecting previously unselected package linux-headers-4.4.0-93. Preparing to unpack .../linux-headers-4.4.0-93_4.4.0-93.116_all.deb ... Unpacking linux-headers-4.4.0-93 (4.4.0-93.116) ... Selecting previously unselected package linux-headers-4.4.0-93-generic. Preparing to unpack .../linux-headers-4.4.0-93-generic_4.4.0-93.116_armhf.deb ... Unpacking linux-headers-4.4.0-93-generic (4.4.0-93.116) ... Selecting previously unselected package linux-headers-generic. Preparing to unpack .../linux-headers-generic_4.4.0.93.98_armhf.deb ... Unpacking linux-headers-generic (4.4.0.93.98) ... Preparing to unpack .../linux-headers-sun8i_5.31_armhf.deb ... Unpacking linux-headers-sun8i (5.31) over (5.31) ... Processing triggers for man-db (2.7.5-1) ... Setting up build-essential (12.1ubuntu2) ... Setting up dkms (2.2.0.3-2ubuntu11.3) ... Setting up git (1:2.7.4-0ubuntu1.2) ... Setting up linux-headers-4.4.0-93 (4.4.0-93.116) ... Setting up linux-headers-4.4.0-93-generic (4.4.0-93.116) ... Examining /etc/kernel/header_postinst.d. run-parts: executing /etc/kernel/header_postinst.d/dkms 4.4.0-93-generic /boot/vmlinuz-4.4.0-93-generic : Unable to find an initial ram disk that I know how to handle. Will not try to make an initrd. Setting up linux-headers-generic (4.4.0.93.98) ... Setting up linux-headers-sun8i (5.31) ... Compiling headers - please wait ... root@orangepizero:~# git clone https://github.com/pvaret/rtl8192cu-fixes.git Cloning into 'rtl8192cu-fixes'... remote: Counting objects: 494, done. remote: Total 494 (delta 0), reused 0 (delta 0), pack-reused 494 Receiving objects: 100% (494/494), 1.82 MiB | 554.00 KiB/s, done. Resolving deltas: 100% (257/257), done. Checking connectivity... done. root@orangepizero:~# dkms add ./rtl8192cu-fixes && dkms install 8192cu/1.10 && depmod -a Creating symlink /var/lib/dkms/8192cu/1.10/source -> /usr/src/8192cu-1.10 DKMS: add completed. Kernel preparation unnecessary for this kernel. Skipping... Building module: cleaning build area..... make KERNELRELEASE=3.4.113-sun8i -C /lib/modules/3.4.113-sun8i/build M=/var/lib/dkms/8192cu/1.10/build....................................................................(bad exit status: 2) Error! Bad return status for module build on kernel: 3.4.113-sun8i (armv7l) Consult /var/lib/dkms/8192cu/1.10/build/make.log for more information. root@orangepizero:~# tail /var/lib/dkms/8192cu//1.10/build//make.log rtw_android.c:(.text+0x28): multiple definition of `is_broadcast_mac_addr' /var/lib/dkms/8192cu/1.10/build/core/rtw_cmd.o:rtw_cmd.c:(.text+0x5c): first defined here /var/lib/dkms/8192cu/1.10/build/os_dep/linux/rtw_android.o: In function `is_zero_mac_addr': rtw_android.c:(.text+0xb4): multiple definition of `is_zero_mac_addr' /var/lib/dkms/8192cu/1.10/build/core/rtw_cmd.o:rtw_cmd.c:(.text+0xe8): first defined here scripts/Makefile.build:432: recipe for target '/var/lib/dkms/8192cu/1.10/build/8192cu.o' failed make[1]: *** [/var/lib/dkms/8192cu/1.10/build/8192cu.o] Error 1 Makefile:1368: recipe for target '_module_/var/lib/dkms/8192cu/1.10/build' failed make: *** [_module_/var/lib/dkms/8192cu/1.10/build] Error 2 make: Leaving directory '/usr/src/linux-headers-3.4.113-sun8i' Here's Ifconfig, LSMOD, and LSUSB wlan0 Link encap:Ethernet HWaddr dc:44:6d:f5:cf:0d UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 TX bytes:0 (0.0 wlx74da383b0bcf Link encap:Ethernet HWaddr 74:da:38:3b:0b:cf UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 TX bytes:0 (0.0 root@orangepizero:~# lsmod Module Size Used by pcf8591 3363 0 bmp085 3487 0 rtl8192cu 61143 0 rtlwifi 45784 1 rtl8192cu rtl8192c_common 33420 1 rtl8192cu xradio_wlan 210530 0 g_serial 27617 2 mac80211 358445 4 rtlwifi,xradio_wlan,rtl8192c_common,rtl8192cu btrfs 712409 0 root@orangepizero:~# lsusb Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 002: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
-
I've tried the EDIMax (EW-7811u) on my Orange Pi Zero. I was wondering if there is a another adapter I should be looking at or is there a working driver for the RTL8188CUS? Below is what lsusb gave me for this device. Bus 002 Device 002: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS] Uname Info is as follows: Linux OrangePI 3.4.39 #2 SMP PREEMPT Mon Nov 21 16:23:11 CST 2016 armv7l GNU/Linux Uname Info is as follows: Linux orangepizero 3.4.113-sun8i #16 SMP PREEMPT Tue Jun 13 14:15:57 CEST 2017 armv7l armv7l armv7l GNU/Linux ifconfig -a info: eth0 Link encap:Ethernet HWaddr be:21:a8:e9:0d:bc inet addr:192.168.1.174 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::bc21:a8ff:fee9:dbc/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2320 errors:0 dropped:0 overruns:0 frame:0 TX packets:731 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:166786 (166.7 KB) TX bytes:95062 (95.0 KB) Interrupt:114 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) wlan0 Link encap:Ethernet HWaddr dc:44:6d:f5:cf:0d UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) wlx74da383b0bcf Link encap:Ethernet HWaddr 74:da:38:3b:0b:cf UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Any help would be greatly appreciated!