Cubox i4pro - a comment and question

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

Cubox i4pro - a comment and question

Postby mcloaked » Thu Oct 16, 2014 4:26 pm

I have just started using archlinuxarm for the first time with a cubox i4pro which must say is an amazing little machine. The arch linux arm wiki for installation was spot on and I had the box running just over 10 minutes from putting a microsd card into my main machine to prepare it with the arch files.

The main use for this box was to run a minidlna server as a starting project to learn how the arm version differs from arch running on typical desktop or laptop machines. The system ran fine and I could start up the minidlna daemon using systemd. However it took me a little while to understand that once the service was enabled that it tried to start before the network was up. The solution was the following in case anyone else comes upon the same problem:

1) Start and enable the following service:

$this->bbcode_second_pass_code('', '
# systemctl start systemd-networkd-wait-online
# systemctl enable systemd-networkd-wait-online
')

Then change the service file (/etc/systemd/system/multi-user.target.wants/minidlna.service) for the minidlna server to have:

$this->bbcode_second_pass_code('', '
[Unit]
Description=minidlna server
After=network.target
After=systemd-networkd-wait-online.service

[Service]
Type=forking
ExecStart=/usr/bin/minidlnad -P /run/minidlna/minidlna.pid
PIDFile=/run/minidlna/minidlna.pid

[Install]
WantedBy=multi-user.target
')

i.e. adding the one line in the unit section to wait for the systemd-networkd-wait-online service.

Then rebooted the server - and everything starts up properly.

I have not yet tried to get the built in wireless running but the question I have is whether I need to start a different network service than the default to get wireless running or if simply installing the relevant driver is enough?

The arm repos are brilliant and I am really pleased with this new little arch box.
mcloaked
 
Posts: 83
Joined: Thu Oct 16, 2014 4:16 pm

Re: Cubox i4pro - a comment and question

Postby WarheadsSE » Thu Oct 16, 2014 5:07 pm

systemd-networkd was never intended for use with wireless. For that you'd better to be triggering on network-online.target.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Cubox i4pro - a comment and question

Postby mcloaked » Thu Oct 16, 2014 8:56 pm

The details I posted above were for wired network on eth0, but do you also suggest that using
$this->bbcode_second_pass_code('', '
After=network-online.target
')

instead of
$this->bbcode_second_pass_code('', '
After=systemd-networkd-wait-online.service
')

would be better when using systemd-networkd for the wired connection on eth0 to ensure that the minidlna service starts up with the network already up?

Wireless is a separate issue, though I have been doing more searching this evening and found that there is some work on using the same systemd-networkd service for a wireless connection on wlan0, but adding in an additional file to work with wpa_supplicant. I looked at https://bbs.archlinux.org/viewtopic.php?pid=1393759 and wondered if that might work for the cubox too? In my case the server is running really nicely on the ethernet only, but if I did want to move to a location where there is no easy wired ethernet socket nearby then it would be nice to know if wireless could be switched on ahead of such a move since my only connection into this server at present is via ssh as it is not connected to a monitor or keyboard. Hence being able to continue working with the wired connection and still test wireless would be very useful.
mcloaked
 
Posts: 83
Joined: Thu Oct 16, 2014 4:16 pm

Re: Cubox i4pro - a comment and question

Postby WarheadsSE » Fri Oct 17, 2014 3:00 am

It might, but I have not tested it in any way :)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Cubox i4pro - a comment and question

Postby Geoff » Fri Oct 17, 2014 8:58 pm

I find that netctl-ifplug@eth0 and netctl-auto@wlan0 work fine together on the Cubox-i4pro. I'm using static IP for eth0 and DHCP for wlan0. I use "SkipNoCarrier=yes" in the eth0 netctl profile, just in case it might otherwise cause boot-up to hang with the ethernet cable disconnected. On the other hand, I find that while systemd-networkd works fine for eth0, it fails for wlan0. I believe the problem I have with wlan0 is that there's a race condition between wpa_supplicant and dhcpcd, when they are coordinated using systemd-networkd.
Geoff
 
Posts: 231
Joined: Wed Mar 09, 2011 5:14 pm


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 24 guests