New IT forum
13 August 2022, 11:35:24 am *
Welcome, %1$s. Please login or register.

: MiraBox now in stock.
 
Pages: 1 [2] 3

Author Topic: Debian Squeeze Dreamplug: where is wlan.sh?  (Read 29354 times)

NewITMalcolm

  • Administrator
  • Sr. Member
  • *****
  • Posts: 394
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #15 on: 12 October 2011, 06:56:03 am »

cikub,

could you post an 'lsmod' please

NewITJames
Logged
NewITJames

NewITMalcolm

  • Administrator
  • Sr. Member
  • *****
  • Posts: 394
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #16 on: 12 October 2011, 07:24:02 am »

Logged
NewITJames

cikub

  • Newbie
  • *
  • Posts: 18
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #17 on: 12 October 2011, 08:25:43 pm »

James, as requested:

Code: [Select]
# lsmod
Module                  Size  Used by
sco                     8175  2
bridge                 64366  0
stp                     1290  1 bridge
llc                     3106  2 bridge,stp
bnep                    7660  2
rfcomm                 31963  0
l2cap                  38603  4 bnep,rfcomm
ipv6                  232392  19 bridge
sd8xxx                162368  0
mcypt                   7140  1 sd8xxx
xt_state                 937  2
xt_tcpudp               1953  8
xt_multiport            1504  1
iptable_filter           958  1
iptable_mangle          1078  0
iptable_nat             3157  0
nf_nat                 11228  1 iptable_nat
nf_conntrack_ipv4       8906  5 iptable_nat,nf_nat
nf_conntrack           44681  4 xt_state,iptable_nat,nf_nat,nf_conntrack_ipv4
nf_defrag_ipv4           953  1 nf_conntrack_ipv4
ip_tables               9527  3 iptable_filter,iptable_mangle,iptable_nat
x_tables               11501  7 xt_state,xt_tcpudp,xt_multiport,iptable_filter,iptable_mangle,iptable_nat,ip_tables
snd_usb_audio          67474  0
snd_pcm                59273  1 snd_usb_audio
snd_page_alloc          4543  1 snd_pcm
snd_hwdep               4737  1 snd_usb_audio
snd_usbmidi_lib        15530  1 snd_usb_audio
snd_seq_midi            3834  0
snd_seq_midi_event      4634  1 snd_seq_midi
snd_rawmidi            15659  2 snd_usbmidi_lib,snd_seq_midi
snd_seq                44726  2 snd_seq_midi,snd_seq_midi_event
btmrvl_sdio             7835  0
snd_timer              16610  2 snd_pcm,snd_seq
snd_seq_device          4727  3 snd_seq_midi,snd_rawmidi,snd_seq
btmrvl                 10880  1 btmrvl_sdio
bluetooth              54360  8 sco,bnep,rfcomm,l2cap,btmrvl_sdio,btmrvl
snd                    34422  8 snd_usb_audio,snd_pcm,snd_hwdep,snd_usbmidi_lib,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
sata_mv                23865  0
rfkill                 14484  2 bluetooth
soundcore                694  1 snd
mv_cesa                 9202  0
Logged

cikub

  • Newbie
  • *
  • Posts: 18
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #18 on: 12 October 2011, 09:14:54 pm »

Modules are uploaded here.
http://downloadsnewit.co.uk/v2.6.38.8.wifi/

Thanks James. I ran md5sum against both the two files you provided in the above link and those in /lib/modules/2.6.38.8/kernel/drivers/net/wireless/ and the checksums in each case were identical hence I am now confident that I haven't accidentally replaced those files with ones for 2.6.33.x kernel.

Determination has set in - I will get to the bottom of this (and learn a nice lot more about the innards of Linux in the process).

Using my JTAG I have carefully looked at the console output after a cold boot (shutdown, disconnected and reconnected power) and can see the following errors after the DHCP lookups for eth1:

Code: [Select]
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 14
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
ERROR: Module uap8xxx does not exist in /proc/modules
mcypt: module license 'Marvell Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
wlan_sdio: probe of mmc0:0001:1 failed with error -1
ioctl[SIOCGIFFLAGS]: No such device
Could not get interface 'mlan0' flags
ioctl[SIOCSIWPMKSA]: No such device
ioctl[SIOCSIWMODE]: No such device
Could not configure driver to use managed mode
ioctl[SIOCGIWRANGE]: No such device
ioctl[SIOCGIWMODE]: No such device
ioctl[SIOCSIWAP]: No such device
ioctl[SIOCSIWESSID]: No such device
ioctl[SIOCGIFINDEX]: No such device
ioctl[SIOCSIWENCODEEXT]: No such device
ioctl[SIOCSIWENCODE]: No such device
ioctl[SIOCSIWENCODEEXT]: No such device
ioctl[SIOCSIWENCODE]: No such device
ioctl[SIOCSIWENCODEEXT]: No such device
ioctl[SIOCSIWENCODE]: No such device
ioctl[SIOCSIWENCODEEXT]: No such device
ioctl[SIOCSIWENCODE]: No such device
ioctl[SIOCGIWMODE]: No such device
ioctl[SIOCSIWAP]: No such device
ioctl[SIOCSIWESSID]: No such device
ioctl[SIOCGIFFLAGS]: No such device
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

SIOCSIFADDR: No such device
mlan0: ERROR while getting interface flags: No such device
mlan0: ERROR while getting interface flags: No such device
Bind socket to interface: No such device
Failed to bring up mlan0.
done.

I'm unsure why it is complaining about uap8xxx as I thought I had blacklisted that one. Looking in /etc/modprobe.d/blacklist.conf shows:

blacklist libertas
blacklist libertas_sdio
blacklist uap8xxx

And then I can see wpa_supplicant not playing ball, which just isn't sporting ;)

Here's some relevant files - anything strike anyone as not right?

# cat /etc/network/interfaces
Code: [Select]
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
post-up iptables-restore < /etc/iptables.up.rules

auto eth1
iface eth1 inet dhcp

auto mlan0
iface mlan0 inet dhcp
pre-up /root/wifi_pre.sh
post-up /root/wifi_post.sh
wpa-conf /root/wifi.conf

(the next needs a bit of a tidy ofc)
# cat /root/wifi_pre.sh
Code: [Select]
#!/bin/sh

# GuruPlug wireless client setup script
# Called by the system before bringing up the network

# Copy the firmware files to where they're expected
#cp /root/firmware/helper_sd.bin /lib/firmware/mrvl/
#cp /root/firmware/sd8688.bin /lib/firmware/mrvl/

# Deactivate access point functionality
#rmmod uap8xxx

# Activate the wireless modules
#insmod /root/wifi/mcypt.ko
#insmod /root/wifi/sd8xxx.ko

#modprobe mcypt
#modprobe sd8xxx

insmod /lib/modules/2.6.38.8/kernel/drivers/net/wireless/mcypt.ko
insmod /lib/modules/2.6.38.8/kernel/drivers/net/wireless/sd8xxx.ko

# Delete the firmware files - wifi get screwed up if
# they're there when the plug reboots
#rm /lib/firmware/mrvl/helper_sd.bin
#rm /lib/firmware/mrvl/sd8688.bin

# cat /root/wifi_post.sh
Code: [Select]
#!/bin/sh

# This script is run after bringing wifi online.

# Set LEDs for client mode
echo 0 > `eval ls /sys/class/leds/*plug*\:green\:wmode/brightness`
echo 1 > `eval ls /sys/class/leds/*plug*\:red\:wmode/brightness`

# cat /root/wifi.conf
Code: [Select]
network={

  ssid="XXXXXXXXXXXX"

  # if SSID is hidden, uncomment below
  #scan_ssid=1

  # for secured WPA/WPA2 network
  # proto is WPA or WPA2, key_mgmt is always WPA-PSK
  proto=WPA
  key_mgmt=WPA-PSK
  # enclose in quotes for plaintext, otherwise generate with wpa_passphrase
  psk="XXXXXXXXXXXXXXXXXXX"

  # for open network, comment above and uncomment below
  #key_mgmt=NONE

}
(obviously XXXX masks the SSID and key)
Logged

leighbb

  • New IT customer
  • Newbie
  • *
  • Posts: 36
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #19 on: 12 October 2011, 09:29:50 pm »

Try as I can I can't get Wifi Client working... hmmm... Idea!

Have you tried using the libertas driver?  It works very well for me.

Assuming the kernel you are using has the libertas modules, create a file called /etc/modprobe.d/dreamplug-client.conf, with the following contents :-

Code: [Select]
blacklist uap8xxx
blacklist sd8xxx
softdep libertas_sdio pre: btmrvl_sdio

Also, make sure sd8688.bin and sd8688_helper.bin are in /lib/firmware/

Perhaps give it a try and see if you get any joy?
Logged

cikub

  • Newbie
  • *
  • Posts: 18
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #20 on: 12 October 2011, 09:33:41 pm »

Thanks leighbb - from reading around the interwebs libertas may not be stable hence I want to avoid it if possible.

Plus I've come so far and am learning a heck of a lot about how this all hangs together that to be honest although it's *very* frustrating not yet having wifi up I'm gaining a lot from the experience!
Logged

Confusticated

  • New IT customer
  • Hero Member
  • *
  • Posts: 663
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #21 on: 13 October 2011, 07:11:06 pm »

Do you still have init_setup.sh hanging around, being called from /etc/rc.local at boot ?
Logged
Advocatus Diaboli - My agenda is not to give you the answer, but to guide your thoughts so you derive it for yourself!

cikub

  • Newbie
  • *
  • Posts: 18
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #22 on: 14 October 2011, 04:00:40 pm »

I do, but it's mostly commented out now:

Code: [Select]

# cat /root/init_setup.sh
#!/bin/sh

# This is called from /etc/rc.local to perform the initial setup.

#SSID=dream-uAP-`ifconfig uap0 | awk -F ":" '/HWaddr/ {print $6$7}'`

#ifconfig uap0 192.168.1.1 up
#/usr/bin/uaputl sys_cfg_ssid $SSID
#/usr/bin/uaputl bss_start

service udhcpd start

# Start bluetooth
#hciconfig hci0 up
#hciconfig hci0 piscan
#/usr/bin/mute-agent &

#blinkled >> /dev/null
# Set leds
#echo 1 > `eval ls /sys/class/leds/guruplug\:green\:wmode/brightness`
#echo 0 > `eval ls /sys/class/leds/guruplug\:red\:wmode/brightness`
Logged

BC2000

  • Newbie
  • *
  • Posts: 5
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #23 on: 05 January 2012, 03:35:50 pm »

Please forgive me for being a newbie here but NewIT_James wrote:

Hi cikub,

give this a try,

Blacklist uap8xxx in  '/etc/modprobe.d/blacklist.conf'

reboot, then

insmod /lib/modules/2.6.38.8/kernel/drivers/net/wireless/mcypt.ko
insmod /lib/modules/2.6.38.8/kernel/drivers/net/wireless/sd8xxx.ko

then 'iwconfig' should give you

Quote
[email protected]:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

pan0      no wireless extensions.

mlan0     MRVL-SD8688  ESSID:"" 
          Mode:Managed  Access Point: Not-Associated   Bit Rate:1 Mb/s   
          Tx-Power=16 dBm   
          Retry limit:9   RTS thr=2347 B   Fragment thr=2346 B   
          Encryption key:off
          Power Management:off
          Link Quality=0/5  Signal level=0 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:1
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


I am sure Confusticated will have a much more elegant way of doing this. See here http://www.newit.co.uk/forum/index.php/topic,2650.msg7470.html#msg7470

NewITJames




I too have no wlan.sh file so i tried running NewIT_James recipe and got the same output ... but what does this mean  :D
I have the Dreamplug multiboot using Debian Squeeze on both cards and want to turn off the AP and turn on the Wireless Client.
How do i progress ?
Logged

NewITMalcolm

  • Administrator
  • Sr. Member
  • *****
  • Posts: 394
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #24 on: 05 January 2012, 10:41:17 pm »

How to convert the Debian Squeeze image from Access Point to a WPA client configuration.

Comment out this line from /etc/rc.local to prevent the startup script from running.
Code: [Select]
#/root/init_setup.sh
in /etc/modprobe.d/blacklist.conf Uncomment the line below to prevent the Access point module loading
Code: [Select]
blacklist uap8xxx
Run depmod to find and allow modprobe on sd8xxx.ko and mcypt.ko
Code: [Select]
depmod -a
in file /etc/modules add a new line to load sd8xxx.ko and mcypt.ko at boot
Code: [Select]
sd8xxx
add to /etc/network/interfaces
Code: [Select]
auto mlan0
iface mlan0 inet dhcp
    wpa-ssid YOUR-ESSID
    wpa-psk "your-password"

you will need wpa supplicant
Code: [Select]
apt-get update
apt-get install wpasupplicant

and you will probably want to remove udhcpd
Code: [Select]
update-rc.d udhcpd remove
Now a nice cold reboot

iwconfig should show the access point connected.
Quote
[email protected]:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

mlan0     MRVL-SD8688  ESSID:"PLDMKT" [2] 
          Mode:Managed  Frequency:2.432 GHz  Access Point: 00:14:7C:B8:AE:F2   
          Bit Rate:54 Mb/s   Tx-Power=13 dBm   
          Retry limit:9   RTS thr=2347 B   Fragment thr=2346 B   
          Encryption key:****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=5/5  Signal level=-45 dBm  Noise level=-90 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:3024
          Tx excessive retries:52  Invalid misc:112   Missed beacon:0

pan0      no wireless extensions.

[email protected]:~#

and ifconfig should now show the interface configured.
Quote
mlan0     Link encap:Ethernet  HWaddr 00:24:23:39:0b:52 
          inet addr:128.1.0.176  Bcast:128.1.0.255  Mask:255.255.255.0
          inet6 addr: fe80::224:23ff:fe39:b52/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:243 errors:0 dropped:0 overruns:0 frame:0
          TX packets:163 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19561 (19.1 KiB)  TX bytes:14092 (13.7 KiB)

[email protected]:~#
Logged
NewITJames

cikub

  • Newbie
  • *
  • Posts: 18
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #25 on: 06 January 2012, 12:07:00 am »

Hi James

Unfortunately I was unable to get this to work with either previous, or your most recent instructions. iwconfig shows:

Code: [Select]

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

pan0      no wireless extensions.

ifconfig also makes no mention of mlan0.

/etc/network/interfaces contains:
Code: [Select]
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
        post-up iptables-restore < /etc/iptables.up.rules

auto eth1
iface eth1 inet dhcp

auto mlan0
iface mlan0 inet dhcp
 wpa-ssid ****
 wpa-psk "****"
(*** obviously replacing my actual values)

wpa supplicant is installed
/etc/rc.local has the init_setup.sh line commented out
udhcp command as provided was run
sp8xxx added
proper cold boot done (shutdown command followed by pulling power cable after the shutdown)
etc

I'm not sure if it is relevant but in Webmin for Network interfaces I can see:
Quote
eth0   Ethernet   From DHCP   From DHCP   Yes
eth1   Ethernet   From DHCP   From DHCP   Yes
lo   Loopback   No address configured   None   Yes
mlan0   Unknown   From DHCP   From DHCP   Yes

ie: mlan0 is Unknown - shouldn't it be Ethernet?

lsmod shows sd8xxx

Really stuck still :(
« Last Edit: 06 January 2012, 12:09:21 am by cikub »
Logged

NewITMalcolm

  • Administrator
  • Sr. Member
  • *****
  • Posts: 394
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #26 on: 06 January 2012, 01:21:39 pm »

The instructions were tested over a fresh Squeeze install. It may be easiest to start there and try again.

http://downloadsnewit.co.uk/SD-images/Dreamplug/NewIT-Dreamplug-Debian-Squeeze/NewIT-Dreamplug-Debian-Squeeze-4Gb-30Aug11.img.gz

Logged
NewITJames

cikub

  • Newbie
  • *
  • Posts: 18
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #27 on: 06 January 2012, 10:31:02 pm »

Thanks James

I read this post: http://www.newit.co.uk/forum/index.php/topic,2741.0.html - could the issues relating to firmware, kernel, etc there-in be affecting me? How can I tell?
Logged

NewITMalcolm

  • Administrator
  • Sr. Member
  • *****
  • Posts: 394
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #28 on: 06 January 2012, 11:25:50 pm »

Quote
could the issues relating to firmware, kernel, etc there-in be affecting me? How can I tell?
If your serial no. starts DS2-1139 or above then yes. None of the plugs sold by us are affected.

 
Logged
NewITJames

mandm

  • Newbie
  • *
  • Posts: 15
Re: Debian Squeeze Dreamplug: where is wlan.sh?
« Reply #29 on: 24 January 2012, 07:39:25 am »

hi James,
i am also having the same issues as cikub, when i  upgraded my brand new guru plug to squeeze it would not load the module for Wireless access point, at this point i am stuff on how to rebuild my guru plug, i was successfully able to connect jtag to the plug and so at least i can get in, the plug can connect to internet too, but just cannot let any device to connect to its wifi as the uap module is corrupt,
how do i rebuild my plug?
# df -h
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 251M     0  251M   0% /lib/init/rw
udev                   10M  124K  9.9M   2% /dev
tmpfs                 251M  4.0K  251M   1% /dev/shm
rootfs                463M  409M   54M  89% /
tmpfs                 251M   27M  224M  11% /var/cache/apt

# free -m
             total       used       free     shared    buffers     cached
Mem:           501        496          5          0         28        427
-/+ buffers/cache:         40        460
Swap:            0          0          0

# uname -a
Linux sheevaplug-debian 2.6.32-00007-g56678ec #1 PREEMPT Mon Feb 8 03:49:55 PST 2010 armv5tel GNU/Linux

# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11b/g  ESSID:"" 
          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated   
          Bit Rate:0 kb/s   Tx-Power=16 dBm   
          Retry short limit:8   RTS thr=2347 B   Fragment thr=2346 B   
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


# ifconfig
eth0      Link encap:Ethernet  HWaddr f0:ad:4e:00:cf:7c 
          inet addr:192.168.1.9  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::f2ad:4eff:fe00:cf7c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:107953 errors:0 dropped:0 overruns:0 frame:0
          TX packets:53189 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:163198324 (155.6 MiB)  TX bytes:3635389 (3.4 MiB)
          Interrupt:11

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)



# more /etc/network/interfaces
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto mlan0
iface mlan0 inet dhcp
    wpa-ssid guru
    wpa-psk "dream"

installing wpasupplicant gives this error
# apt-get install wpasupplicant

Reading package lists... Done
Building dependency tree                  more /var/lib/dpkg/info/libpcsclite1.po
Reading state information... Done
Suggested packages:
  wpagui libengine-pkcs11-openssl
The following NEW packages will be installed:zip NewIT-Dreamplug-Debian-Squeeze-4                                         ls -lhrt
  wpasupplicant
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.computer.org/405/us
1 not fully installed or removed.
Need to get 0 B/346 kB of archives.
After this operation, 844 kB of additional disk space will be used.
(Reading database ... 26700 files and directories currently installed.)
Unpacking wpasupplicant (from .../wpasupplicant_0.6.10-2.1_armel.deb) ...
dpkg (subprocess): unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst): Permission denied
dpkg: error processing /var/cache/apt/archives/wpasupplicant_0.6.10-2.1_armel.deb (--unpack):
 subprocess new pre-installation script returned error exit status 2
configured to not write apport reports
                                      Errors were encountered while processing:
 /var/cache/apt/archives/wpasupplicant_0.6.10-2.1_armel.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Please let me know
Logged
Pages: 1 [2] 3
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!