WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Can you setup Wifi with a static ip address?  (Read 22487 times)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Can you setup Wifi with a static ip address?
« Reply #15 on: January 30, 2014, 10:38:13 AM »
Core is not a boot and run distro.
It is a toolkit.
wifi.sh is ONE of the tools.
Others have been mentioned already.

You need to learn how to use the tools.
Iwconfig and wpa_supplicant are thoroughly documented on the internet.  Simple instructions are in the .info files.

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: Can you setup Wifi with a static ip address?
« Reply #16 on: January 30, 2014, 10:51:31 AM »
again - did you try to use a static IP address inside the routers range. ?
I am using piCore here on a RaspberryPi and I have it set up DHCP and its address from thr router is 192.168.0.5. Using the Control Panel I changed the yes  from"use DCHP Broadcast?" to NO and inserted the 192.168.0.5 here plus the Gateway and the Broadcast. The Nameservers are still there from the DHCP and I have left them untouched.
Then I rebooted with the static address and the RP was connected using static IP.
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Can you setup Wifi with a static ip address?
« Reply #17 on: January 30, 2014, 10:56:16 AM »
Static configuration is very rarely used with wifi by latter's very nature; e.g. with any network which you do not administrate, you could not know the range of allowed addresses.
Personally I always run udhcpc (or any other dhcp client) explicitely after having associated and possibly authenticated first, so I can't imagine any obstacle to a static configuration instead.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Can you setup Wifi with a static ip address?
« Reply #18 on: January 30, 2014, 10:59:05 AM »
again - did you try to use a static IP address inside the routers range. ?
I am using piCore here on a RaspberryPi and I have it set up DHCP and its address from thr router is 192.168.0.5. Using the Control Panel I changed the yes  from"use DCHP Broadcast?" to NO and inserted the 192.168.0.5 here plus the Gateway and the Broadcast. The Nameservers are still there from the DHCP and I have left them untouched.
Then I rebooted with the static address and the RP was connected using static IP.

Do not uses static address within the DHCP address range. There is a release time in the DHCP server to assign same IP to a MAC within this period which cab be few days tipycally but after that this address will be reassign to another MAC. So be prepared for IP conflict later when router will use 192.168.0.5 for another device.

If you need a fix address, you can set up your DHCP server to assign a specificic IP to a MAC instead of choosing one from the pool. In this case you can use TC as ususally and manage IP centrally.
« Last Edit: January 30, 2014, 11:02:48 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Can you setup Wifi with a static ip address?
« Reply #19 on: January 30, 2014, 11:03:33 AM »
again - did you try to use a static IP address inside the routers range. ?
I am using piCore here on a RaspberryPi and I have it set up DHCP and its address from thr router is 192.168.0.5. Using the Control Panel I changed the yes  from"use DCHP Broadcast?" to NO and inserted the 192.168.0.5 here plus the Gateway and the Broadcast. The Nameservers are still there from the DHCP and I have left them untouched.
Then I rebooted with the static address and the RP was connected using static IP.

Arbitrary use of a static IP without having excluded that it may be within range of dynamic address pool is reckless and could get you in trouble with any netadmin.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Trace

  • Newbie
  • *
  • Posts: 20
Re: Can you setup Wifi with a static ip address?
« Reply #20 on: January 30, 2014, 11:23:14 AM »
The DHCP in my hardware router is off .....

The address I am using is the same one that I use from the same laptop when I am trying different distro's on it.

This static ip address works fine with this laptop and router with : windows, BT5, puppy, etc.

It does not work with tc and slitaz and these both seem to have the same problem of udhcpc always being invoked and so by the process of trial and error and the harware always being the same it is not the address that is at fault.

slitaz also uses wpa_supplicant and wpa_gui for setup and even with that seems impossible to use without udhcpc always starting which is why I am trying to find a working example from someone who has done it.

I get the feeling noone here has actually ever done this?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Can you setup Wifi with a static ip address?
« Reply #21 on: January 30, 2014, 11:34:17 AM »
Once you have the interface associated with your access point, just use ifconfig to assign an IP address.

Offline Trace

  • Newbie
  • *
  • Posts: 20
Re: Can you setup Wifi with a static ip address?
« Reply #22 on: January 30, 2014, 11:44:41 AM »
Yes I can do that but can't connect without using wifi.sh to enter  wpa-psk key which starts udhcpc and so fails to connect.

I am writing this using the same static ip and hardware right now from vista and can reboot and do the same from puppy and various other distro's using the same address.

So it seems it's udhcpc that is the problem and noone knows how to stop it running.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Can you setup Wifi with a static ip address?
« Reply #23 on: January 30, 2014, 11:49:43 AM »
You do NOT need to run wifi.sh
Research iwconfig and wpa_supplicant.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Can you setup Wifi with a static ip address?
« Reply #24 on: January 30, 2014, 11:52:31 AM »
So it seems it's udhcpc that is the problem and noone knows how to stop it running.

You can kill udhcpc with kill command. For process number look around in /var/run

You can disable it with nodhcp boot code, see

http://tinycorelinux.net/faq.html#bootcodes
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Trace

  • Newbie
  • *
  • Posts: 20
Re: Can you setup Wifi with a static ip address?
« Reply #25 on: January 30, 2014, 12:12:21 PM »
I have already set these bootcodes and other combinations as suggested on the 1st page. I have tried various different pkill udhcpc commands.
and have tried wpa_supplicant in slitaz which seems to have the same unstoppable udhcpc.

If it's simple please can someone give me an example script or instructions instead of just suggesting solutions for different stages of connecting via wifi.

I know it's probably right in front of me but I'm so lost in it now I'm confused.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Can you setup Wifi with a static ip address?
« Reply #26 on: January 30, 2014, 12:13:07 PM »
wifi.sh is subject to GPL, if you insist on using a tool that does not meet your needs, you are free to modify it to your liking.

Core is a toolkit, and it is the users responsibility which tools to choose and how to use them.

The only automatic invocation of udhcpc could occur when omitting boot code "nodhcp" as a default which may be convenient for some users (it's not convenient for me, but I don't feel that interferes with my freedom a simple mechanism to deactivate it is provided).
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Can you setup Wifi with a static ip address?
« Reply #27 on: January 30, 2014, 12:19:21 PM »
If it's simple please can someone give me an example script or instructions instead of just suggesting solutions for different stages of connecting via wifi.

I know it's probably right in front of me but I'm so lost in it now I'm confused.

http://wiki.tinycorelinux.net/wiki:setting_up_wifi_at_boot?s[]=wpa&s[]=supplicant
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Trace

  • Newbie
  • *
  • Posts: 20
Re: Can you setup Wifi with a static ip address?
« Reply #28 on: January 30, 2014, 12:30:21 PM »
Those instructions are for connecting at boot using udhcpc.

I don't have a problem connecting using udhcpc.

I do have nodhcp as a default boot code as I said on page 1.

If there is no simple answer, there is no simple answer ..... I'm surprised that I seem to be the only person to want to do this.

« Last Edit: January 30, 2014, 12:31:56 PM by Trace »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Can you setup Wifi with a static ip address?
« Reply #29 on: January 30, 2014, 12:42:37 PM »
You may be happier running Ubuntu or some other boot and run distro.
You do NOT need to use dhcp, and your repeated complaints about it demonstrate
that you are not bothering to learn the tools you have been pointed to.
You need to establish an association with your access point.
For WEP use iwconfig.
For WPA use wpa_supplicant.
Once associated, use ifconfig to assign the IP address.