1 2 Previous Next 15 Replies Latest reply on Feb 13, 2015 10:33 AM by UserMod777

    Failed to start Hostapd on boot

    arjdan

      Hi,

      I use an Edison with a mini-breakout board.

       

      I add to boot start hostapd, with command

      "systemctl enable hostapd"

       

      I reboot but hostapd service fails. If I check status I obtain:

       

      Jan 12 13:37:08 wiicom_edison systemd[1]: Unit hostapd.service entered failed state.

      Jan 12 13:37:10 wiicom_edison hostapd[257]: Configuration file: /etc/hostapd/hostapd.conf

      Jan 12 13:37:10 wiicom_edison hostapd[257]: Could not set channel for kernel driver

      Jan 12 13:37:10 wiicom_edison hostapd[257]: wlan0: Unable to setup interface.

      Jan 12 13:37:10 wiicom_edison hostapd[257]: wlan0: Could not connect to kernel driver

      Jan 12 13:37:10 wiicom_edison hostapd[257]: hostapd_free_hapd_data: Interface wlan0 wasn't started

       

       

      Can you help me?

      Thanks

        • 1. Re: Failed to start Hostapd on boot
          JPMontero_Intel

          Hi arjdan,

           

          I used the command systemctl enable hostapd. Then to display the status of the hostapd, I used systemctl status hostapd.service and everything seems to be ok. Which image are you using?

           

          Regards,

          JPMontero_Intel

          • 2. Re: Failed to start Hostapd on boot
            arjdan

            Hi, I used last image.

            First I have configured a wi-fi network with configure_edison --wifi. Then I try systemctl enable hostapd then I reboot. After reboot hostapd is not running.

            • 3. Re: Failed to start Hostapd on boot
              JPMontero_Intel

              What message are you getting when you reboot the board and type systemctl status hostapd.service?

               

              Regards,
              JPMontero_Intel

              • 4. Re: Failed to start Hostapd on boot
                arjdan

                After reboot, the status for hostapd.service, is that written in the first post.

                It seems that the interface is not ready yet when the system launch hostapd.

                 

                Note that if I start manually the service, with systemclt start hostapd, it works.

                • 5. Re: Failed to start Hostapd on boot
                  arjdan

                  Hi,

                  can you say me how to restore default wi-fi configuration?

                  I configure Wi-Fi with configure_edison --wifi and now I've a fixed configuration and I can't disable this. Where is located???

                   

                  Thanks

                  • 6. Re: Failed to start Hostapd on boot
                    Andre.M

                    you could take a look into the configure_edison script to understand how it works and which config files it changes

                     

                    yocto use systemd and the command to control systemd is systemctl

                     

                    the mean question would be what you are trying to achieve, to use edison as ap or to use edison as wifi client, both at the same time is only possible with an additional nif

                    • 7. Re: Failed to start Hostapd on boot
                      arjdan

                      I want to use edison as AP with hostapd. I notice that on a fresh install, if I add hostapd at boot with "systemctl enable hostapd", it works fine.

                      In my installation, I've some configurations maybe I've some conflict, then if I add hostapd at boot with "systemctl enable hostapd", when I reboot it doesn't work.

                       

                      I have:

                      [  OK  ] Started Network Name Resolution.

                      [  OK  ] Started Hostap daemon service.

                      [  OK  ] Started Login Service.

                      [  OK  ] Found device /sys/subsystem/net/devices/wlan0.

                               Starting WPA supplicant service...

                               Starting Load/Save RF Kill Switch Status of rfkill3...

                               Starting Load/Save RF Kill Switch Status of rfkill4...

                               Starting udhcpd daemon for hostapd...

                      [  OK  ] Started Load/Save RF Kill Switch Status of rfkill3.

                      [  OK  ] Started Load/Save RF Kill Switch Status of rfkill4.

                               Starting Daemon to receive the wpa_supplicant event...

                      [  OK  ] Started Daemon to receive the wpa_supplicant event.

                      [  OK  ] Started WPA supplicant service.

                      [  OK  ] Started udhcpd daemon for hostapd.

                               Stopping udhcpd daemon for hostapd...

                      [  OK  ] Stopped udhcpd daemon for hostapd.

                               Stopping Hostap daemon service...

                               Stopping Daemon to receive the wpa_supplicant event...

                      [  OK  ] Stopped Daemon to receive the wpa_supplicant event.

                               Starting Load/Save RF Kill Switch Status of rfkill6...

                      [  OK  ] Stopped Hostap daemon service.

                      [  OK  ] Started Load/Save RF Kill Switch Status of rfkill6.

                               Starting Load/Save RF Kill Switch Status of rfkill5...

                               Expecting device /sys/subsystem/net/devices/wlan0...

                      [  OK  ] Started Load/Save RF Kill Switch Status of rfkill5.

                      [  OK  ] Found device /sys/subsystem/net/devices/wlan0.

                               Starting Daemon to receive the wpa_supplicant event...

                      [  OK  ] Started Daemon to receive the wpa_supplicant event.

                       

                       

                      If I type "systemctl status hostapd" the result is:

                      ● hostapd.service - Hostap daemon service

                         Loaded: loaded (/lib/systemd/system/hostapd.service; enabled)

                         Active: failed (Result: exit-code) since Wed 2015-01-14 15:43:09 UTC; 18s ago

                        Process: 272 ExecStopPost=/sbin/modprobe bcm4334x (code=exited, status=0/SUCCESS)

                        Process: 265 ExecStopPost=/sbin/modprobe -r bcm4334x (code=exited, status=0/SUCCESS)

                        Process: 246 ExecStart=/usr/sbin/hostapd /etc/hostapd/hostapd.conf (code=exited, status=1/FAILURE)

                        Process: 224 ExecStartPre=/sbin/modprobe bcm4334x op_mode=2 (code=exited, status=0/SUCCESS)

                        Process: 199 ExecStartPre=/sbin/modprobe -r bcm4334x (code=exited, status=0/SUCCESS)

                      Main PID: 246 (code=exited, status=1/FAILURE)

                       

                       

                      Jan 14 15:43:06 wiicom_edison systemd[1]: Started Hostap daemon service.

                      Jan 14 15:43:08 wiicom_edison systemd[1]: hostapd.service: main process exited, code=exited, status=1/FAILURE

                      Jan 14 15:43:08 wiicom_edison systemd[1]: Stopping Hostap daemon service...

                      Jan 14 15:43:08 wiicom_edison hostapd[246]: Configuration file: /etc/hostapd/hostapd.conf

                      Jan 14 15:43:08 wiicom_edison hostapd[246]: Could not set channel for kernel driver

                      Jan 14 15:43:08 wiicom_edison hostapd[246]: wlan0: Unable to setup interface.

                      Jan 14 15:43:08 wiicom_edison hostapd[246]: wlan0: Could not connect to kernel driver

                      Jan 14 15:43:08 wiicom_edison hostapd[246]: hostapd_free_hapd_data: Interface wlan0 wasn't started

                      Jan 14 15:43:09 wiicom_edison systemd[1]: Stopped Hostap daemon service.

                      Jan 14 15:43:09 wiicom_edison systemd[1]: Unit hostapd.service entered failed state.

                       

                       

                      I don't know where can be te problem....

                      • 8. Re: Failed to start Hostapd on boot
                        Andre.M

                        disable the wpa supplicant service

                        • 9. Re: Failed to start Hostapd on boot
                          arjdan

                          Hi, thanks.

                          I see with "systemctl status wpa_supplicant" that the process is active.

                          But I can't disable it with "systemctl disable wpa_supplicant"

                           

                          How to disable this?

                          • 10. Re: Failed to start Hostapd on boot
                            Andre.M

                            systemctl disable wpa_supplicant.service

                            • 11. Re: Failed to start Hostapd on boot
                              arjdan

                              I try as I said. Doesn't work, after reboot wpa_supplicant start again.

                              Do you know why? Is it called by other services?

                              • 12. Re: Failed to start Hostapd on boot
                                Andre.M

                                not on my system

                                call systemctl status wpa_supplicant

                                call systemctl disable wpa_supplicant.service

                                call again systemctl status wpa_supplicant

                                 

                                and post the output of the 3 commands

                                • 13. Re: Failed to start Hostapd on boot
                                  CMata_Intel

                                  Hi arjdan

                                   

                                  Do you still have problems with this or you were able to find a solution?

                                   

                                  Regards;

                                  CMata

                                  • 14. Re: Failed to start Hostapd on boot
                                    arjdan

                                    yeah,

                                    I solved this problem. I disable wpa-supplicant and other services that blocked hostapd

                                    1 2 Previous Next