My hostapd is running happily and my devices can connect to the AP, but don’t get assigned an IP address.
isc-dhcp-server has the following error:
osmc@osmc:~$ sudo service isc-dhcp-server status
● isc-dhcp-server.service - LSB: DHCP server
Loaded: loaded (/etc/init.d/isc-dhcp-server)
Active: failed (Result: exit-code) since Tue 2015-04-28 05:20:01 UTC; 3min 46s ago
Process: 242 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)
Apr 28 05:19:59 osmc dhcpd[293]:
Apr 28 05:19:59 osmc dhcpd[293]: No subnet declaration for wlan0 (no IPv4 addresses).
Apr 28 05:19:59 osmc dhcpd[293]: ** Ignoring requests on wlan0. If this is not what
Apr 28 05:19:59 osmc dhcpd[293]: you want, please write a subnet declaration
Apr 28 05:19:59 osmc dhcpd[293]: in your dhcpd.conf file for the network segment
Apr 28 05:20:01 osmc isc-dhcp-server[242]: Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. .....iled!
Apr 28 05:20:01 osmc isc-dhcp-server[242]: failed!
Apr 28 05:20:01 osmc systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Apr 28 05:20:01 osmc systemd[1]: Failed to start LSB: DHCP server.
Apr 28 05:20:01 osmc systemd[1]: Unit isc-dhcp-server.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
Can someone help me assign a static IP for wlan0 please? I’ve tried running connmanctl interactively, but it looks like it only allows me to configure IP addresses once I’ve joined a WiFi network. (Which I don’t want, since my Pi will act as an AP.)
Hi @mk01, thanks for the reply. I’ve definitely added that
From reading online I have interpreted the isc-dhcp-server error to mean that my wlan0 interface has
No subnet declaration for wlan0 (no IPv4 addresses).
I think the important part is the “no IPv4 addresses” part:
When I do ifconfig -a I see that only my eth0 has an IPv4 address, but wlan0 has only an IPv6 address. I figured this is because I couldn’t follow the /etc/network/interfaces part of the guide and I need a ConnMan specific solution to assign a static IP address to wlan0 without connecting it to some network.
I’m just wondering why dhcp insist on having segment address - dhcp queries and answers are completely independent.
I use hostapd too and although all howtos configure wlan0 with static ip, it has no meaning (if you are bridging with lan (eth0 for instance)).
So if you do the bridging, move the dhcp server to any other network adapter in the bridge (having actual IP address).
Or if you have already dhcp server on network, don’t install isc-dhcp-server at all and just take care you bridge ALL traffic, not just tcp / udp packets.
Hi,
I understand that the plan is to eventually allow people to Tether. Still it would be nice if somebody knowledgeable could provide hints on how to replace the “Interface” file until the tethering mode is enabled. Anyway, I will bring this question to the Raspberry PI forum.
If I cannot progress, I will revert to a previous version of Raspbmc and re-install OSMC when I am back from vacations.
for me the equation is simple:
(IPAD+NPLAYER) && (AP/OSMC/SAMBA/USBHARDRIVE)= (More sleep in the morning)
when at the rented cottage…
You are replying to a 3 month old post. Tethering was implemented some time ago however not all wireless adapters support wifi tethering - it depends on the individual wifi driver. All drivers should support Ethernet tethering.
The problem is connman only supports the more modern nl80211 interface for enabling Host AP mode, while many of the realtek drivers only support the rtl871xdrv interface, which is both specific to realtek and now obsolete and no longer actively supported.
Hostapd supports both, which is why those drives might work with Hostapd. The only real solution is for Realtek to update their drivers to support nl80211 like most other vendors, as it’s very unlikely connman will ever be updated to add support for the obsolete driver interface.