WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: hostapd - wifi AP daemon  (Read 7247 times)

Offline aris

  • WikiUser
  • *
  • Posts: 38
Re: hostapd - wifi AP daemon
« Reply #15 on: December 27, 2017, 06:10:29 PM »
Hi Poliko and Rich
here it is..still no luck
Code: [Select]
tc@box:~$ ps | grep hostapd
 1011 tc       grep hostapd
tc@box:~$ cat /opt/bootlocal.sh
!/bin/sh
# put other system startup commands here
 #busybox httpd
#/usr/local/httpd/sbin/httpd -p 80 -h /mnt/sda1/wwwsite
 #apache2mod
#rm -rf /usr/local/apache2/htdocs
#ln -s /opt/apache2/htdocs /usr/local/apache2/htdocs
#ln -sf /opt/apache2/httpd.conf /usr/local/apache2/conf/
#apachectl start
 #eth0 205
/opt/eth0.sh
/opt/wlan0.sh
#hostapd -B /usr/local/etc/config/hostapd.conf 2>&1 | tee /tmp/hostapd.log
/usr/local/bin/hostapd -B /usr/local/etc/config/hostapd.conf 2>&1 | tee /tmp/hostapd.log
/usr/local/etc/init.d/openssh start &
tc@box:~$ cat /tmp/hostapd.log


and yes I add the /usr/local/etc/config/ folder in  /opt/.filetool.lst and backup

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 5892
Re: hostapd - wifi AP daemon
« Reply #16 on: December 27, 2017, 06:29:50 PM »
Hi aris
Poliko was correct. I was mistaken, the correct syntax is:
Code: [Select]
#!/bin/sh

Offline aris

  • WikiUser
  • *
  • Posts: 38
Re: hostapd - wifi AP daemon
« Reply #17 on: December 28, 2017, 06:30:37 PM »
I tried with
#!/bin/sh and also with !/bin/sh..same thing..no log on /tmp/hostapd.log (file exist but no content)
and hostapd is not start.


Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 5892
Re: hostapd - wifi AP daemon
« Reply #18 on: December 28, 2017, 09:07:04 PM »
Hi aris
It definitely has to be:
Code: [Select]
#!/bin/sh so make sure you've changed it back. I suspect the  hostapd  command is not being executed. Use the  ps  command and
see if any of the following are still running:

bootlocal.sh
eth0.sh
wlan0.sh

If  eth0.sh  or  wlan0.sh  are still running, post their contents.

Offline polikuo

  • Sr. Member
  • ****
  • Posts: 348
Re: hostapd - wifi AP daemon
« Reply #19 on: December 28, 2017, 11:10:46 PM »
see if any of the following are still running:

bootlocal.sh
eth0.sh
wlan0.sh

If  eth0.sh  or  wlan0.sh  are still running, post their contents.

I don't think they'd still be running, however "openssh" most likely would be.

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 5892
Re: hostapd - wifi AP daemon
« Reply #20 on: December 29, 2017, 06:01:53 AM »
Hi polikuo
I don't think they'd still be running, however "openssh" most likely would be.
They shouldn't still be running, however,  eth0.sh  and  wlan0.sh  are run synchronously from  bootlocal.sh.  If one of them fails to
complete for some reason then the  hostapd  command will never execute and  bootlocal.sh  won't complete. The machine itself
will still finish coming up since  bootlocal.sh  is launched asynchronously  from  bootsync.sh.

Offline aris

  • WikiUser
  • *
  • Posts: 38
Re: hostapd - wifi AP daemon
« Reply #21 on: December 30, 2017, 01:15:17 AM »
Hi Rich
I dont understand it..openssh is running (my alix board doesnt have monitor outpur so if ssh is the only way to access it), ip config from eth0.sh is running wlan0.sh is not, dhcpd is running ..
here is
Code: [Select]
ps
PID   USER     COMMAND
    1 root     init
    2 root     [kthreadd]
    3 root     [ksoftirqd/0]
    4 root     [kworker/0:0]
    5 root     [kworker/0:0H]
    6 root     [kworker/u2:0]
    7 root     [rcu_sched]
    8 root     [rcu_bh]
    9 root     [migration/0]
   10 root     [khelper]
   11 root     [netns]
   12 root     [perf]
   13 root     [writeback]
   14 root     [ksmd]
   15 root     [crypto]
   16 root     [kintegrityd]
   17 root     [bioset]
   18 root     [kblockd]
   19 root     [kworker/0:1]
   20 root     [ata_sff]
   21 root     [devfreq_wq]
   22 root     [rpciod]
   24 root     [kswapd0]
   25 root     [fsnotify_mark]
   26 root     [nfsiod]
   44 root     [kworker/u2:1]
   45 root     [nvme]
   46 root     [scsi_eh_0]
   47 root     [scsi_tmf_0]
   48 root     [scsi_eh_1]
   49 root     [scsi_tmf_1]
   50 root     [kworker/u2:2]
   51 root     [kworker/u2:3]
   52 root     [kpsmoused]
   53 root     [deferwq]
   54 root     [kworker/u2:4]
   55 root     [kworker/u2:5]
   87 root     /sbin/udevd --daemon
  156 root     /sbin/syslogd
  161 root     /sbin/klogd
  340 root     [kworker/u3:0]
  341 root     [kloopd0]
  342 root     [kworker/u3:1]
  365 root     [kloopd1]
  378 root     [kloopd2]
  391 root     [kloopd3]
  404 root     [kloopd4]
  405 root     [kworker/0:1H]
  418 root     [kloopd5]
  431 root     [kloopd6]
  444 root     [kloopd7]
  457 root     [kloopd8]
  458 root     [kworker/u3:2]
  471 root     [kloopd9]
  484 root     [kloopd10]
  497 root     [kloopd11]
  510 root     [kloopd12]
  523 root     [kloopd13]
  536 root     [kloopd14]
  549 root     [kloopd15]
  561 root     [kloopd16]
  574 root     [kloopd17]
  587 root     [kloopd18]
  600 root     [kloopd19]
  613 root     [kloopd20]
  626 root     [kloopd21]
  640 root     [kloopd22]
  653 root     [kloopd23]
  666 root     [kloopd24]
  679 root     [kloopd25]
  692 root     [kloopd26]
  705 root     [kloopd27]
  718 root     [kloopd28]
  731 root     [kloopd29]
  787 root     /sbin/udevd --daemon
  803 root     /sbin/udevd --daemon
  856 root     [cfg80211]
  870 tc       -sh
  926 root     udhcpd -f /etc/udhcpd.conf
  962 root     /usr/local/sbin/sshd
  967 root     /sbin/udhcpc -b -i eth1 -x hostname box -p /var/run/udhcpc.eth1.
  978 root     sshd: tc@pts/0
  982 tc       -sh
 1010 tc       ps

Hi polikuo
I don't think they'd still be running, however "openssh" most likely would be.
They shouldn't still be running, however,  eth0.sh  and  wlan0.sh  are run synchronously from  bootlocal.sh.  If one of them fails to
complete for some reason then the  hostapd  command will never execute and  bootlocal.sh  won't complete. The machine itself
will still finish coming up since  bootlocal.sh  is launched asynchronously  from  bootsync.sh.