• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: guruplug plus arrived and no ip address when connected  (Read 4461 times)
ubertekton
Newbie
*

Karma: 0
Posts: 10


View Profile
« on: May 19, 2010, 06:29:51 PM »

Guruplug arrived yesterday, I connected the power and the ethernet cable today and checked my router: no address given.  Has anyone experienced this?  I am connecting to a netgear router.
Logged

celandir
Newbie
*

Karma: 0
Posts: 8



View Profile
« Reply #1 on: May 20, 2010, 12:58:39 AM »

I had this problem, too. In my case the subnet for the Guru-WLAN is 192.168.1.x which is the same network that my router was configured for. So I reconfigured my router to another network (192.168.5.x). Then I had to remove the /var/lib/dhcp3/*.leases, because my plug pretended on reusing the old network leases. (If you can't reconfigure your local network, you must change the ip of the Guru-WLAN interface in /root/init_setup.sh and the configuration of the DHCP server in /etc/udhcpd.conf.)

Next I had a look at the network configuration of the GuruPlug in general and found that it sucks. The /root/init_setup.sh is only a quick hack and needs to be replaced by proper init-scripts. Shutdown-scripts need to be written, too, to shut down WLAN if the plug is halted. Also dhclient is directly called from /etc/ifplugd/ifplugd.action and not from ifup. If you put eth0 in /etc/network/interfaces, dhclient is called twice.

I will post the scripts and a guide when I'm done with the rework, but it could take some time.
Logged

flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #2 on: May 20, 2010, 01:17:08 AM »

I removed everything from /etc/rc.local (that points to this fishy init_setup.sh script) as well as the stuff in /etc/ifplug/ifplug.action. Actually, the latter was being replaced by a "good" version by dist-upgrading to Debian squeeze. Then I setup the interfaces file the debian way and everything works. I've come up with a working setup script for the wifi (as access point). See here: http://oinkzwurgl.org/guruplug_debian
Logged

GPS+ Debian Squeeze AP router firewall dhcpd named NAS Squeezebox OpenVPN All running fine.

celandir
Newbie
*

Karma: 0
Posts: 8



View Profile
« Reply #3 on: May 20, 2010, 01:46:55 AM »

Thanks for the link. No need to think by myself anymore ... ;-)
Logged

celandir
Newbie
*

Karma: 0
Posts: 8



View Profile
« Reply #4 on: May 20, 2010, 04:49:49 AM »

I tried the instructions from flipflip but now my wlan doesn't come up properly during boot. If I use ifup to bring up uap0 after boot has finished, everything works fine. But if uap0 is brought up automatically during boot, the wlan doesn't show up. I found no errors in syslog or dmesg and the output of guruplug-wl-conf.sh says everything is fine. Any ideas?

Edit: It is even sufficient to issue uaputl bss_stop; uaputl bss_start after boot completed to succesfully activate the wlan ...
« Last Edit: May 20, 2010, 04:58:34 AM by celandir » Logged

ubertekton
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #5 on: May 20, 2010, 05:35:37 AM »

Thanks Karma.  I cannot reconfigure the network without disrupting homeschool activities for wife and children.  I will reconfigure a spare router and then try to connect; or connect via terminal.
Logged

flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #6 on: May 20, 2010, 06:54:10 AM »

Did you disable (blacklist) the client modules?
You need one reboot to clear out the client firmware; I think it's not enough to just rmmod those.
Did the uap8xxx module load (at boot)?
Have you used my kernel or the shipped one?
Logged

GPS+ Debian Squeeze AP router firewall dhcpd named NAS Squeezebox OpenVPN All running fine.

celandir
Newbie
*

Karma: 0
Posts: 8



View Profile
« Reply #7 on: May 20, 2010, 07:13:34 AM »

Did you disable (blacklist) the client modules?
You need one reboot to clear out the client firmware; I think it's not enough to just rmmod those.
Did the uap8xxx module load (at boot)?

I disabled the client modules and I think the uap8xxx module loads at boot time. At least uap8xxx shows up in lsmod after boot before I issue any other command. Also, as far as I understand the manpage of ifup, it will not bring up the interface if the pre-up command fails. And ifconfig pretends that uap0 is up and running.

Have you used my kernel or the shipped one?

I am still at debian-stable with the shipped kernel. I didn't do much to the plug despite of debugging the network setup.

I really have no idea how to investigate this issue further.
Logged

flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #8 on: May 20, 2010, 08:38:08 AM »

I am still at debian-stable with the shipped kernel. I didn't do much to the plug despite of debugging the network setup.

I really have no idea how to investigate this issue further.

I've pretty soon got rid of the initial setup but what I've see is this:

The /etc/rc.local script is the last script called when booting. And this script calls the /root/init_setup.sh, which then loads the uap8xxx.ko kernel module that is located in /root. I.e. it's not located where it should be (somewhere in /lib/<kernel-version>/.... So it might be that the modprobe call in ifup fails because it cannot find the module. And this (/etc/init.d/network) is called earlier than the init_setup.sh. But you'd login after that and hence would see a loaded uap8xxx.ko.

You could copy the module to the right location (I think you need to call "depmod -a" after this to build up some index or so).

Or you could replace the modprobe command in the interfaces file with "insmod /root/uap8xxx.ko". Also check that the firmware files are present in /lib/firmware/mrvl. Or maybe also "modprobe -v /root/uap8xxx.ko" works.

The you could set VERBOSE=yes in /etc/default/rcS and watch the serial console while booting. You should see ifup being called.
Logged

GPS+ Debian Squeeze AP router firewall dhcpd named NAS Squeezebox OpenVPN All running fine.

celandir
Newbie
*

Karma: 0
Posts: 8



View Profile
« Reply #9 on: May 20, 2010, 03:41:58 PM »

The /etc/rc.local script is the last script called when booting. And this script calls the /root/init_setup.sh, which then loads the uap8xxx.ko kernel module that is located in /root. I.e. it's not located where it should be (somewhere in /lib/<kernel-version>/.... So it might be that the modprobe call in ifup fails because it cannot find the module. And this (/etc/init.d/network) is called earlier than the init_setup.sh. But you'd login after that and hence would see a loaded uap8xxx.ko.

You could copy the module to the right location (I think you need to call "depmod -a" after this to build up some index or so).

I already copied uap8xxx.ko to /lib/modules/... and called depmod. I also removed the init_setup.sh from rc.local so this isn't it. (I should have mentioned it earlier.)

The you could set VERBOSE=yes in /etc/default/rcS and watch the serial console while booting. You should see ifup being called.

I did this. I also modified /etc/init.d/networking to call ifup with the --verbose option, but still I can't find any errors. Here an excerpt from my boot messages:

Code:
Setting up networking....
Configuring network interfaces...Configuring interface lo=lo (inet)run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
ifconfig lo 127.0.0.1 up
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openssh-serverConfiguring interface uap0=uap0 (inet)
modprobe uap8xxx
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools

ifconfig uap0 192.168.37.1 netmask 255.255.255.0                up

/etc/network/guruplug-wl-conf.sh start
+ uaputl sys_cfg_radio_ctl 0
Radio setting successful
+ uaputl sys_cfg_channel 0 1
Channel setting successful
+ uaputl sys_cfg_ssid Guru
SSID setting successful
+ uaputl sys_cfg_protocol 32
protocol setting successful
+ uaputl sys_cfg_cipher 8 8
cipher setting successful
+ uaputl sys_cfg_wpa_passphrase 'topsecret'
WPA passphrase setting successful
+ uaputl bss_start 
BSS started!
+ echo 1
++ eval ls /sys/class/leds/plug2l:green:wmode/brightness
+++ ls /sys/class/leds/plug2l:green:wmode/brightness
+ set +x
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openssh-server
done.
Starting portmap daemon....
NET: Registered protocol family 10
ADDRCONF(NETDEV_UP): uap0: link is not ready
Setting console screen modes and fonts.
cannot (un)set powersave mode
Setting up ALSA...done (none loaded).
Initializing random number generator...done.
Setting up X server socket directory /tmp/.X11-unix....
Setting up ICE socket directory /tmp/.ICE-unix....
INIT: Entering runlevel: 2

Interesting might be the line "ADDRCONF(NETDEV_UP): uap0: link is not ready", but I get this message even if I issue "ifup uap0" after the boot completed. And then the WLAN AP shows up. I get the message "ADDRCONF(NETDEV_CHANGE): uap0: link becomes ready" as soon as another computer establishes a connection with the AP.

Logged

ubertekton
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #10 on: May 20, 2010, 04:33:43 PM »

Got the unit working.  Set up a spare router and logged in.  I disabled init_setup.sh and the wifi (blacklisted the modules.  Rearranged eth0 so it works off /etc/network/interfaces.  Now I need to disable dnsmasq and bluetooth (found them in init.d but not in the runlevel directories.  Also, any one know where is the name mywifiplug specified; that is the name showing up in my router.

Now to let it cook for several days and then buy a sata drive...

Celandir, just noticed your user name, sorry; thanks again for your help.
Logged

celandir
Newbie
*

Karma: 0
Posts: 8



View Profile
« Reply #11 on: May 20, 2010, 11:06:18 PM »

Got the unit working.  Set up a spare router and logged in.  I disabled init_setup.sh and the wifi (blacklisted the modules.  Rearranged eth0 so it works off /etc/network/interfaces.

Does the WLAN come up correctly?

Now I need to disable dnsmasq and bluetooth (found them in init.d but not in the runlevel directories. 

dnsmasq was started by the init_setup.sh. I added it to the runlevels 2-5 and assume it isn't runnig on your plug right now. bluetooth was also in the init_setup.sh, but I did not look at this.

Also, any one know where is the name mywifiplug specified; that is the name showing up in my router.

It's in /etc/samba/smb.conf.

BTW: Don't forget to change your samba passwords (smbpasswd). They are not synced with /etc/passwd and probably still at nosoup4u!
Logged

celandir
Newbie
*

Karma: 0
Posts: 8



View Profile
« Reply #12 on: May 21, 2010, 12:10:03 AM »

Well, I solved my problem :-)

After removing the line

    uaputl sys_cfg_radio_ctl 0              # radio on

from flipflip's script (guruplug-wl-conf.sh), my wlan comes up perfectly during boot. It's probably a timing problem with the hardware, but I don't really know what this command does ... anyway, it works (TM)

Thanks for your support!

Logged

ubertekton
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #13 on: May 21, 2010, 06:40:04 AM »

I do not need the wifi for my lan, neither do I need dnsmasq so I commented out the script reference in rc.local.  I would like to make sure that the wifi and bluetooth do not even turn on to aviod the heat so I am checking into that; don't know if it is the modules that would fire up the electronics for transmissions.  eth0 is dhcp and the home router will always give it the same ip based on the hardware id.

I removed samba entirely; I also removed two packages for bluetooth (bluez on of them), but bluetooth process still shows up.  I did load nfs; user version because the lenny kernel is incompatible with the kernel version.
Logged

two9er
Jr. Member
**

Karma: 10
Posts: 51


View Profile
« Reply #14 on: May 21, 2010, 07:58:43 AM »

ubertekton, See this post:
http://plugcomputer.org/plugforum/index.php?topic=1673.msg10263#msg10263

/etc/modprobe.d/blacklist is the file you want. I have theese entries in mine:

blacklist visor
blacklist ipv6
blacklist btmrvl
blacklist btmrvl_sdio
blacklist bluetooth
blacklist libertas
blacklist libertas_sdio

HTH, Jim
« Last Edit: May 21, 2010, 10:50:15 AM by two9er » Logged

Just plugging away! GuruPlug Server Plus, 1TB esata hd, 8GB microSD (rfs)

Pages: [1]
Print
Jump to: