WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED]start wlan0 dhcp using command  (Read 2044 times)

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
[SOLVED]start wlan0 dhcp using command
« on: March 20, 2014, 07:44:58 AM »
hi , I am trying to write a script to start wifi using http://wiki.tinycorelinux.net/wiki:setting_up_wifi
Which command will have same effect as system-tools>control-panel>network>change interface to wlan0 , use dhcp broadcast > apply
« Last Edit: March 24, 2014, 04:57:59 AM by manit123 »

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: start wlan0 dhcp using command
« Reply #1 on: March 20, 2014, 08:41:42 PM »
My guess would be that
    IF=wlan0 ; sudo udhcpc -x hostname $(hostname) -b -i $IF -p /var/run/udhcpc.${IF}.pid ; unset IF

should do the trick.

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: start wlan0 dhcp using command
« Reply #2 on: March 21, 2014, 09:35:15 AM »
that worked .
What if I don't send hostname in packet ?