Jump to content

sgjava

Members
  • Posts

    411
  • Joined

  • Last visited

Everything posted by sgjava

  1. @TonyMac32 Let me know if I can test something else like a new build.
  2. @TonyMac32 I loaded that module and: lsmod | grep spi spi_meson_spifc 16384 0 spi_bitbang 16384 0 spidev 20480 0 But still no /dev/spi*
  3. @nik-ii OK, I had some time to play around with my C2 which already had Armbian Stretch installed: Linux hostname 4.18.8-odroidc2 #264 SMP PREEMPT Wed Sep 19 12:35:18 CEST 2018 aarch64 GNU/Linux armbian-config has no Hardware menu, but it looks like GPIO and I2C are already enabled: ls /dev/gpio* /dev/i2c* /dev/spi* ls: cannot access '/dev/spi*': No such file or directory /dev/gpiochip0 /dev/gpiochip1 /dev/i2c-0 /dev/i2c-1 If you go to the Odroid C2 wiki you can follow the steps to enable SPI: sudo su - modprobe spidev modprobe spi_gpio modprobe: FATAL: Module spi_gpio not found in directory /lib/modules/4.18.8-odroidc2 modprobe spi_bitbang lsmod | grep spi spi_bitbang 16384 0 spidev 20480 0 ls /dev/spi* ls: cannot access '/dev/spi*': No such file or directory I'm not sure what's going on here because this works with the HardKernel OS images. I'm actually using my C2 as a Jenkins CI server, but I did play around and made sure gpio, i2c and spi worked. I believe that was a 3.x kernel though @Igor may be able to point you in a better direction to get SPI cranking. There are other drivers, but I'm not sure which one to use: ls /lib/modules/4.18.8-odroidc2/kernel/drivers/spi spi-bitbang.ko spi-butterfly.ko spidev.ko spi-lm70llp.ko spi-meson-spifc.ko
  4. @nik-ii I actually have a C2 and I think I just loaded mainline on it a few weeks ago. I'll check tonight, but if your SBC is using mainline then it should work. With armbian-config you need to enable SPI, I2C, etc. I'll reply back here later with C2 specific info. Note from your pic that GPIO is showing up.
  5. @Srini If you look at my script I just create an include dir for artifacts missing in the compile path: # Add header file missing from Linux user space includes mkdir -p $curdir/include/linux >> $logfile 2>&1 cp /usr/src/linux-headers-$kerver/include/linux/compiler_types.h $curdir/include/linux/. >> $logfile 2>&1 log "Running autogen" export PYTHON_VERSION=3 ./autogen.sh --enable-tools=yes --enable-bindings-python --prefix=/usr/local CFLAGS="-I/usr/src/linux-headers-$kerver/include/uapi -I$curdir/include" >> $logfile 2>&1 I've talked to the author of libgpiod and whatever distro he's using it builds without doing any of this, but the various ARM based distros need some tweaking.
  6. @Srini gpio.h should be in the downloaded kernel headers. You can sudo find / -name gpio.h to see where it is. https://github.com/sgjava/userspaceio/blob/master/libgpiod/install.sh#L38 is where the kernel header logic is. I tested this with the latest stable release for NanoPi Duo and it worked fine. It also worked on the FriendlyElec image, but I had to manually install the headers.
  7. @Igor, thanks again. I used armbian-config to set up the wifi via serial. Do you have an idea when you'll have the dev kernel working? The only reason I'm asking is >= 4.16 allows PWM in user space. Linux nanopiduo 4.14.70-sunxi #240 SMP Mon Sep 17 13:32:31 CEST 2018 armv7l armv7l armv7l GNU/Linux
  8. Cool, thanks @Igor I'll check out the new build tonight when I get home and report results here.
  9. @Igor It worked with beta using 4.17 kernel (Linux nanopiduo 4.17.3-sunxi #28 SMP Sat Jun 30 21:45:31 UTC 2018 armv7l armv7l armv7l GNU/Linux). Don't remember what version it came with or if I updated the kernel.
  10. @Igor Is there a way to tell the difference between the beta (xradio works) and stable?
  11. @fehernyul The Armbian mainline beta worked fine with wifi using 4.17 kernel. I'm not sure why the xradio stuff was stripped out of the stable release. If you do not have a mini shield then the only way to access the Duo is through the serial port (USB when plugged into PC powers Duo and allows serial access) or build your own Ethernet port. In any event the stable release is worthless for stand alone Duos which most of my usage scenarios require. I was lucky to have 3 mini shields, so I was able to get Ethernet working to play around with configuring wifi. For now I have been using the FriendlyElec image since xradio works fine, but I'd really like to use Armbian again.
  12. @ag123 I'll try that this weekend. There are no nightly images for Duo, but I'll try to update armbian-config over Ethernet connection. The dtb looks like it has the right settings, so it's a matter of getting the modules, etc. that were working in the Beta release. Good thing I bought the mini shield or I wouldn't have Ethernet to do this
  13. I think when I built it for Python/Java stuff I made it use a SO since that's the only way to wrap the C lib.
  14. @Igor I fixed this by using armbian-config, clearing interfaces and using /etc/network/interfaces. Now I can reboot with a static address. With NanoPi Duo I had to remove netplan and use ifupdown for eth0, but the xradio wifi stuff seems to be missing from the kernel (modules, etc.). But in essence they exhibited the same issue with eth0.
  15. It seems the networking in Armbian 5.59 is messed up. It creates a eth0 adapter (disabled) and Wired network 1 adapter. You can delete these in nmtui, but they always return. I had the same issue with NanoPi Duo using mainline Stable. I can get it to work a bit using armbian-config, removing all interfaces and configuring IP, but it gets screwed up again. I cannot trust to run 5.59 headless because I have no way to get into the SBC without hooking video back up.
  16. @martinayotte @Igor Both of those sections are in the dtb. I found vcc-wifi: disabling in dmesg, but no xradio stuff. The Duo with beta has xradio dmesg and more files, so it looks like files are missing in Stable release, not just DT problem. Beta: [ 13.746635] xradio_wlan mmc1:0001:1: no mac address provided, using random [ 14.100561] xradio_wlan mmc1:0001:1: missed interrupt [ 14.100717] xradio_wlan mmc1:0001:1: Input buffers: 30 x 1632 bytes [ 14.100724] xradio_wlan mmc1:0001:1: Firmware Label:XR_C01.08.0043 Jun 6 2016 20:41:04 Beta: sudo find / -name xradio* /sys/devices/platform/xradio_pm.0 /sys/bus/platform/devices/xradio_pm.0 /sys/bus/platform/drivers/xradio_pm /sys/bus/platform/drivers/xradio_pm/xradio_pm.0 /sys/bus/sdio/drivers/xradio_wlan /sys/module/mac80211/holders/xradio_wlan /sys/module/xradio_wlan /sys/module/cfg80211/holders/xradio_wlan /lib/modules/4.17.3-sunxi/kernel/drivers/net/wireless/xradio /lib/modules/4.17.3-sunxi/kernel/drivers/net/wireless/xradio/xradio_wlan.ko /proc/irq/104/xradio Stable: /lib/modules/4.14.65-sunxi/kernel/drivers/net/wireless/xradio /lib/modules/4.14.65-sunxi/kernel/drivers/net/wireless/xradio/xradio_wlan.ko
  17. @martinayotte OK, I have static eth0 config working with the Mini Shield and no more dynamically creating adapters on reboot. I still have the original issue of no wifi device. I assume I need to get the XR819 device working. It used to work fine in beta Linux nanopiduo 4.17.3-sunxi #28 SMP Sat Jun 30 21:45:31 UTC 2018 armv7l armv7l armv7l GNU/Linux which has xradio_wlan. Seems to be missing from stable mainline release (only /lib/modules/4.14.65-sunxi/kernel/drivers/net/wireless/xradio/xradio_wlan.ko is present). uname -a Linux nanopiduo 4.14.65-sunxi #12 SMP Tue Aug 21 10:46:54 CEST 2018 armv7l armv7l armv7l GNU/Linux lsmod Module Size Used by lz4 16384 20 lz4_compress 53248 1 lz4 zram 24576 5 sun8i_codec_analog 24576 0 snd_soc_core 118784 1 sun8i_codec_analog snd_pcm_dmaengine 16384 1 snd_soc_core snd_pcm 65536 2 snd_pcm_dmaengine,snd_soc_core snd_timer 24576 1 snd_pcm snd 45056 3 snd_timer,snd_soc_core,snd_pcm soundcore 16384 1 snd sun4i_gpadc_iio 16384 0 uio_pdrv_genirq 16384 0 uio 16384 1 uio_pdrv_genirq sch_fq_codel 20480 2 usb_f_acm 16384 1 u_serial 20480 3 usb_f_acm g_serial 16384 0 libcomposite 40960 2 g_serial,usb_f_acm ip_tables 20480 0 x_tables 20480 1 ip_tables pwrseq_simple 16384 1 uas 20480 0 sudo lshw -C network *-network description: Ethernet interface physical id: 7 logical name: eth0 serial: ee:ee:ee:ee:ee:ee size: 100Mbit/s capacity: 100Mbit/s capabilities: ethernet physical tp aui bnc mii fibre 10bt 10bt-fd 100bt 100bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=st_mac100 driverversion=Jan_2016 duplex=full ip=192.168.1.69 link=yes multicast=yes port=MII speed=100Mbit/s nano /etc/network/interfaces auto eth0 iface eth0 inet static address 192.168.1.69 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 192.168.1.1 Remove netplan, etc. systemctl stop networkd-dispatcher systemctl disable networkd-dispatcher systemctl mask networkd-dispatcher apt-get purge nplan netplan.io
  18. @martinayotte I have a build VM now, so If there's something I can try build wise to get wifi working I'll try it. I was able to get eth0 working using the Mini Shield, but normally I do not use the Mini Shield. If I try to make eth0 static it creates another wired connection, weird.
  19. I noticed the build tool mentioned Ethernet in the description for Duo. I'm going to fiddle with the kernel options and see what happens, but when I build an image it exhibits the same behavior.
  20. The previous dev mainline release (maybe from a month or two ago) worked with 4.17 kernel. I'm seeing the same issue using the FriendlyElec dtb, so something is off.
  21. @martinayotte that's what I tried to explained above. If I put the Duo in the Mini Shield it will show two Ethernet connections. It appears to detect the onboard wifi as Ethernet or it's not detecting the wifi at all. You did give me an idea though. I can get the dtb from the FriendlyElec image and try it on Armbian. I had to do this to get the OTG working correctly on a Duo v1.1 with Armbian.
  22. I just flashed https://dl.armbian.com/nanopiduo/Ubuntu_bionic_next.7z and it doesn't appear to detect the onboard wifi. ip a only shows lo and eth0. I'm going to try the expansion board with Ethernet onboard and see what shows up. OK, just tried this on a adapter board with Ethernet and now there's an eth0 and Wired Connection 1. It appears the eth0 is really the wifi adapter, but nmtui treats it like an Ethernet connection. Same issue with https://dl.armbian.com/nanopiduo/Debian_stretch_next.7z Wifi not detected, but eth0 is detected instead of wlan0.
  23. @lsmod you need the latest mainline kernel to use User Space IO and PWM as non-root user. That's probably another difference is that User Space IO doesn't require root user for GPIO, SPI, I2C, PWM and MMIO. Not all libraries support this.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines