• Content Count

  • Joined

  • Last visited

About FergusL

  • Rank

Recent Profile Visitors

334 profile views
  1. FergusL

    NanoPi Duo (plus Mini Shield)

    That page says Neo Core is H2+, though both are very similar! http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO_Core/zh I'd have loved to get I2S available on that one but heh, still an awesome idea to produce modules ! Oh wait, that's Nanopi Duo thread! Form factor is also similar to Chip Pro, though Chip has 4 time less processor cores (and so far makers like us are still forced to either request a sale to get ONE of the advertised $16 board or accept to pay $50 for the devboard) Also very similar to Seeed's Linkit Smart though also again much more power in the same physical size.
  2. FergusL

    NanoPi Neo Air Access Point

    That's super fine, thanks for the mention and I'm glad to see it adopted that quickly! I in fact made these script for a projet as well, I'm working on low latency audio software running on the NanoPi. The only thing that has to be double checked in these scripts is the compatibility with other services running with systemd. Yeah please tell me how it works when you've tested it!
  3. FergusL

    NanoPi Neo Air Access Point

    Hello! Posting here as it's both the most recent and most precise topic about that issue. I've managed to make two shell scripts to switch between Access Point and client mode for wifi. I hope I haven't forgotten any other settings I've tweaked elsewhere on the system. I'm not using nmcli/tui for creating the AccessPoint since the load option of the module makes this a bit tricky. Instead this is standard hostapd for AP settings + dnsmasq for serving DHCP. As stated in the files, this needs testing as well as checking regarding how to deal exactly with systemd services. Save as stamode.sh, chmod +x stamode.sh and ./stamode #! /bin/sh # Switch from Access Point mode to station mode (client mode to a wifi network) for AP6212. #TODO: Help, review and testers needed, especially for dealing with stopping/killing systemd services and process. # Stop running process for the AP /bin/systemctl stop hostapd kill $(cat /var/run/dnsmasq.pid) # Remove and re-add the wifi module, that time in station mode. rmmod dhd modprobe dhd # Update symlinks for interfaces rm /etc/network/interfaces ln -s interfaces.network-manager /etc/network/interfaces # Start normal network services provided by NM. /bin/systemctl start networking.service /bin/systemctl enable NetworkManager /bin/systemctl start NetworkManager # NM needs to be told to use that interface again /usr/bin/nmcli d set wlan0 managed yes # Wait for wifi to come up and show a list of networks in range sleep 8 /usr/bin/nmcli device wifi list Save as apmode.sh, chmod +x apmode.sh and ./stamode #! /bin/sh # Switch from station mode (client mode to a wifi network) to Acess Point mode for AP6212. # Configuration of hostapd is found in /etc/hostapd/hostapd.conf or wherever the line "DAEMON_CONF" in /etc/default/hostapd points to. # Do not forget to uncomment the line mentioned above in /etc/default/hostapd # Edit /etc/network/interfaces with static IP for wlan0, example conf: # auto wlan0 # iface wlan0 inet static # address # netmask # dns-nameservers # Configuration for DHCP server (using dnsmasq) is found in /etc/dnsmasq.conf, example conf: # dhcp-range=,,72h #TODO: Help, review and testers needed, especially for dealing with stopping/killing systemd services and process. # Stop and disable nm. If it's enabled it locks at boot for 5 minutes. # The dnsmasq processes aren't killed when nm stops and keep dhcp from working, kill them! /bin/systemctl stop NetworkManager /bin/systemctl disable NetworkManager kill $(cat /var/run/NetworkManager/dnsmasq.pid) kill $(cat /run/dnsmasq.br0.pid) # Remove and re-add the wifi module, that time in AP mode rmmod dhd modprobe dhd op_mode=2 # Update symlinks for interfaces rm /etc/network/interfaces ln -s interfaces.hostapd /etc/network/interfaces # Start using systemd and manually. Hostapd manages the interface, auth etc. and dnsmasq serves a DHCP server for clients connecting to the AP. /bin/systemctl start hostapd /usr/sbin/dnsmasq
  4. I can confirm the same as of now with version 5.26, option 4 works and option 5 fails. This is on NanoPi Air (makes no difference anyway). The rt patch has changed meanwhile and the file to enable is now: lib/patch/kernel/sun8i-default/30-real-time143-full-plus-rt-fixes.patch.disabled
  5. I received NanoPi NEO and NEO Air boards along with the NanoHat PCM5102a that FriendlyArm is selling: http://www.friendlyarm.com/index.php?route=product/product&product_id=169 It's a good quality audio stereo out addon board compatible with NEO and NEO Air. I got it working with Armbian on NEO Air! I adapted commits from FA's repo to match Armbian's tree and get that DAC working, (original commits here: https://github.com/friendlyarm/h3_lichee/search?utf8=%E2%9C%93&q=pcm5102a+&type=Commits). Add these to 'userpatches/kernel/sun8i-default`: https://gist.github.com/Simon-L/c8c119c86d7d3fe4316387c3ae818379 Add this config to 'userpatches' to have the driver built-in: https://gist.github.com/Simon-L/56bf6a3ec423e37973ee0da0bc16979f Then run './compile.sh' The fex file also needs to be modified, you can use this one: https://gist.github.com/Simon-L/f0c88190814f0f482773e81512e56553 This should be all that's needed! Test it with 'aplay /usr/share/sounds/alsa/Noise.wav' and install madplay if you want to try with mp3 files. Can I safely share the content of the /boot folder and expect it to work for user copy-pasting it to the /boot folder on their sdcard? It has the kernel and the fex which are the only files the process has modified. Obviously you'd still have to trust me I'm trying to turn this into a more straightforward way. Do I need to commit to modify defconfig and .fex file or is it supported in userpatches/ folder as well? There is one issue reported in syslog that doesn't seem to prevent it from working, here's the relevant part of the log: [ 1.598532] pcm5102a_probe [ 1.607823] asoc: snddaudio <-> pri_dai mapping ok [ 1.610531] ------------[ cut here ]------------ [ 1.610583] WARNING: at fs/sysfs/dir.c:508 sysfs_add_one+0x8c/0xac() [ 1.610604] sysfs: cannot create duplicate filename '/devices/platform/snddaudio' [ 1.610625] Modules linked in: [ 1.610694] [<c0016a20>] (unwind_backtrace+0x0/0xe8) from [<c0617cc0>] (dump_stack+0x20/0x24) [ 1.610742] [<c0617cc0>] (dump_stack+0x20/0x24) from [<c0029750>] (warn_slowpath_common+0x5c/0x74) [ 1.610788] [<c0029750>] (warn_slowpath_common+0x5c/0x74) from [<c00297a8>] (warn_slowpath_fmt+0x40/0x48) [ 1.610833] [<c00297a8>] (warn_slowpath_fmt+0x40/0x48) from [<c017aab8>] (sysfs_add_one+0x8c/0xac) [ 1.610877] [<c017aab8>] (sysfs_add_one+0x8c/0xac) from [<c017acb8>] (create_dir+0x70/0xc4) [ 1.610917] [<c017acb8>] (create_dir+0x70/0xc4) from [<c017b0bc>] (sysfs_create_dir+0xc4/0xe4) [ 1.610965] [<c017b0bc>] (sysfs_create_dir+0xc4/0xe4) from [<c0306bf0>] (kobject_add_internal+0xdc/0x1d0) [ 1.611013] [<c0306bf0>] (kobject_add_internal+0xdc/0x1d0) from [<c0306ef8>] (kobject_add+0x78/0x90) [ 1.611064] [<c0306ef8>] (kobject_add+0x78/0x90) from [<c03b0078>] (device_add+0xf8/0x578) [ 1.611114] [<c03b0078>] (device_add+0xf8/0x578) from [<c03b4208>] (platform_device_add+0x110/0x16c) [ 1.611161] [<c03b4208>] (platform_device_add+0x110/0x16c) from [<c03b47a4>] (platform_device_register+0x30/0x34) [ 1.611214] [<c03b47a4>] (platform_device_register+0x30/0x34) from [<c08f6f94>] (sunxi_snddaudio0_init+0x54/0xa4) [ 1.611263] [<c08f6f94>] (sunxi_snddaudio0_init+0x54/0xa4) from [<c000867c>] (do_one_initcall+0xa8/0x164) [ 1.611313] [<c000867c>] (do_one_initcall+0xa8/0x164) from [<c08d1a74>] (kernel_init+0x168/0x254) [ 1.611364] [<c08d1a74>] (kernel_init+0x168/0x254) from [<c000f1b0>] (kernel_thread_exit+0x0/0x8) [ 1.611455] ---[ end trace bd16a9742f20e8dd ]--- [ 1.611481] ------------[ cut here ]------------ [ 1.611509] WARNING: at lib/kobject.c:198 kobject_add_internal+0x180/0x1d0() [ 1.611533] kobject_add_internal failed for snddaudio with -EEXIST, don't try to register things with the same name in the same directory. [ 1.611560] Modules linked in: [ 1.611601] [<c0016a20>] (unwind_backtrace+0x0/0xe8) from [<c0617cc0>] (dump_stack+0x20/0x24) [ 1.611644] [<c0617cc0>] (dump_stack+0x20/0x24) from [<c0029750>] (warn_slowpath_common+0x5c/0x74) [ 1.611686] [<c0029750>] (warn_slowpath_common+0x5c/0x74) from [<c00297a8>] (warn_slowpath_fmt+0x40/0x48) [ 1.611732] [<c00297a8>] (warn_slowpath_fmt+0x40/0x48) from [<c0306c94>] (kobject_add_internal+0x180/0x1d0) [ 1.611778] [<c0306c94>] (kobject_add_internal+0x180/0x1d0) from [<c0306ef8>] (kobject_add+0x78/0x90) [ 1.611825] [<c0306ef8>] (kobject_add+0x78/0x90) from [<c03b0078>] (device_add+0xf8/0x578) [ 1.611870] [<c03b0078>] (device_add+0xf8/0x578) from [<c03b4208>] (platform_device_add+0x110/0x16c) [ 1.611915] [<c03b4208>] (platform_device_add+0x110/0x16c) from [<c03b47a4>] (platform_device_register+0x30/0x34) [ 1.611962] [<c03b47a4>] (platform_device_register+0x30/0x34) from [<c08f6f94>] (sunxi_snddaudio0_init+0x54/0xa4) [ 1.612007] [<c08f6f94>] (sunxi_snddaudio0_init+0x54/0xa4) from [<c000867c>] (do_one_initcall+0xa8/0x164) [ 1.612052] [<c000867c>] (do_one_initcall+0xa8/0x164) from [<c08d1a74>] (kernel_init+0x168/0x254) [ 1.612098] [<c08d1a74>] (kernel_init+0x168/0x254) from [<c000f1b0>] (kernel_thread_exit+0x0/0x8) [ 1.612125] ---[ end trace bd16a9742f20e8de ]--- Any hint? The codec still works fine. There is no control in alsamixer. Thanks to @tkaiser and @Igor for their help on IRC.