• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Dreamplug Adventures  (Read 11564 times)
spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« on: June 04, 2011, 09:06:56 PM »

I decided to start with a Dreamplug running a recent stable kernel (2.6.38.7) and Debian Wheezy. I am using the supplied uBoot. The rfs I used is from /http:/spinifex.net/plugs/downloads/dreamplug/wheezy_20110531_rootfs.tar.gz
I have slowly been working my way through the hardware and thought I would post some preliminary results and points of interest. The hope is that it will be useful to someone else.

uSD and SD Boot
I setup a multi boot to first try the SD, if this fails it trys the uSD. This works well.
I used kernel parameters of console=ttyS0,115200 root=/dev/sdb2 rootwait panic=10, the rootwait seems to be better than the rootdelay.
The only partition options that worked for me was to have the uImage partition as type 6 (FAT16) and formatted  (from a Sheevaplug) as mkfs.vfat -n 'dp-uImage' /dev/mmcblk0p1. I tried a few other options and none of them worked.

Peripherals
I replaced the uSD with a 4GB Integral uSD, this is straightforward to do (I also tried 8GB and this works as well).
The uSD is always mapped to /dev/sda.
The SDHC drive is always mapped to /dev/sdb.
The 2 USB ports and the eSata get mapped to  /dev/sdc thru /dev/sde.
Note that eth1 is the ethernet nearest the end of the Dreamplug.

The good news -
 the uSD and SD deliver ~20MB/sec read speed (as measured by dd). They are only marginally slower than a Sheevaplug.
 the eSata interface just works (fast), no hassles at all.
I have plugged every USB device that I can find into the Dreamplug and I have had no panics.

wifi AP mode
Debian does most of the work for you. I added

Code:
root@debian:~# cat /etc/modprobe.d/dpwifi.conf
# dreamplug wireless client modules
blacklist libertas
blacklist libertas_sdio
root@debian:~#

I copied /lib/firmware/mrvl from the orginal uSD as supplied by Globalscale. I tried other firmware, but this is the only one I found to be stable for AP mode. I am using the kernel provided uap8xxx module.

The uaputl sources were downloaded and compiled from http://plugcomputer.org/plugforum/index.php?topic=2196.msg13114#msg13114. The result of the compile is available from /http:/spinifex.net/plugs/downloads/dreamplug/uaputl.zip

Then
Code:
apt-get install dnsmasq
Configure dnsmasq to handle DNS and DHCP (I can post the config if someone asks for it)

To start the AP
Code:
        ifconfig uap0 up
        uaputl sys_config ./uaputl.conf
        uaputl sys_cfg_radio_ctl 0
        uaputl bss_start

To stop the AP
Code:
        uaputl bss_stop
        uaputl sys_reset
        ifconfig uap0 down

You can play with parameters in uaputl.conf. The conf file seems a more convenient way to configure the AP.

I have performed a lot of testing on this Dreamplug AP mode and (so far) I cannot fault it.


In progress

  • wifi client - Not sure that I will ever get this stable. I have tried most of the options and I am beginning to think that the easy way to do client wifi is to use a USB wifi dongle (which means a Dreamplug with both AP and client wifi).
  • bluetooth - todo
  • optical port - todo
  • microphone - todo
  • audio - todo

* uaputl.zip (50.6 KB - downloaded 175 times.)
Logged

piratebab
Newbie
*

Karma: 0
Posts: 1


View Profile
« Reply #1 on: June 17, 2011, 01:36:50 PM »

Thanks for sharing your experience.
If also installed debian wheezy , with the latest kernel. It works great. I use the dreamplug as a car computer, so need wifi client to connect using ssh.
I have not succeeded yet to install it. iwconfig returns nothing.
Do you succed ?
 
Logged

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #2 on: June 18, 2011, 01:07:38 AM »

Quote
wifi client ... Do you succed ?

Not yet, I am in the process if compiling modules.
 
Logged

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #3 on: June 19, 2011, 04:06:43 PM »

I have given up on client wifi with Debian and recent kernels.
The quickest solution is to aquire a wifi USB dongle.
Logged

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #4 on: June 21, 2011, 03:49:08 AM »

(continued)

wifi
-----

Repeating our config is Debian Wheezy 2.6.38.8 (using cxbikers wonderful kernel builds)  at http://plugapps.com/mirror/with-linux

1) Get the kernel source and dream-2.6.38.8.config  from the above link
2) set the kernel build to use dream-2.6.38.8.config the easiest way to do this is via
#  make menuconfig
3) Get the wlan client drivers from http://www.plugcomputer.org/plugwiki/images/0/05/SD_WLAN.tar.gz
4) Apply the attached patch (this patch allows builds on later kernels). It was sourced from  https://gist.github.com/961478

5) Compile the modules (I did it on a sheevaplug)

# cd  SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/
# make KERNELDIR= <kernel src dir>/2.6.38.8/src/linux-2.6.38.8-plug CROSS_COMPILE='' ARCH=arm INSTALLDIR=..

This produces mcypt.ko and sd8xxx.ko. Copy these to the /root of the Dreamplug. You will also need the files from /lib/firmware/mrvl from the orginal uSD as supplied by Globalscale. These are the same files that we used for the AP wifi mode in the earlier post.  I have put the compiled modules and /lib/firmware/mrvl files at http://spinifex.net/plugs/downloads/dreamplug/clwifi_modules_2_6_38_8.zip .

6) Blacklist the other wifi modules

# vi /etc/modprobe.d/dpwifi.conf

# dreamplug wireless  modules
blacklist libertas
blacklist libertas_sdio
blacklist uap8xxx


7) Set up the wifi network

# vi /etc/network/interfaces

auto mlan0
iface mlan0 inet dhcp
        pre-up { echo 2 > /proc/uap/uap0/hwstatus; } 2>/dev/null || true
        pre-up modprobe -r uap8xxx.ko 2>/dev/null || true
        pre-up insmod /root/mcypt.ko
        pre-up insmod /root/sd8xxx.ko
        wireless-essid myssid
        wireless-mode Managed
        wireless-key restricted 1 XXXXXXXXXXXXXXXXXXXXXXXXXXX
        wireless-defaultkey 1
        post-down iwpriv mlan0 softreset
        post-down rmmod /root/sd8xxx.ko
        post-down rmmod /root/mcypt.ko


Cool Shutdown the dreamplug and switch the power off. It needs a COLD boot. Then power on.

This all works for me and so far is very stable. All those who are interested in this should lobby(beg) cxbiker to make the client modules wifi part of the Dreamplug kernel downloads.

Addenum:

# iwconfig mlan0
mlan0     MRVL-SD8688  ESSID:"myssid"
          Mode:Managed  Frequency:2.452 GHz  Access Point: xx:xx:xx:xx:xx:xx
          Bit Rate:54 Mb/s   Tx-Power=13 dBm
          Retry limit:9   RTS thr=2347 B   Fragment thr=2346 B
          Encryption key:****-****-****-****-****-****-**   Security mode:restricted
          Power Management:off
          Link Quality=3/5  Signal level=-66 dBm  Noise level=-88 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:233
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

# iwpriv mlan0
mlan0     Available private ioctls :
          extscan          (8BFA) : set   0 int   & get   2 char
          hostcmd          (8BE4) : set 2047 byte  & get 2047 byte
          arpfilter        (8BE6) : set 2047 byte  & get 2047 byte
          regrdwr          (8BE3) : set 256 char  & get 256 char
          sdcmd52rw        (8BFE) : set   7 byte  & get   7 byte
          sdcmd53rw        (8BFF) : set   0 char  & get   0 char
          setgetconf       (8BEA) : set 2000 byte  & get 2000 byte
          getcis           (8BE1) : set   0       & get 512 byte
          scantype         (8BEB) : set   8 char  & get   8 char
          deauth           (0001) : set   1 addr  & get   0
          getNF            (0001) : set   1 int   & get   1 int
          getRSSI          (0002) : set   1 int   & get   1 int
          bgscan           (0004) : set   1 int   & get   1 int
          enable11d        (0005) : set   1 int   & get   1 int
          adhocgrate       (0006) : set   1 int   & get   1 int
          sdioclock        (0007) : set   1 int   & get   1 int
          wmm              (0008) : set   1 int   & get   1 int
          uapsdnullgen     (000A) : set   1 int   & get   1 int
          setcoalescing    (000B) : set   1 int   & get   1 int
          adhocgprot       (000C) : set   1 int   & get   1 int
          disable_chsw     (000F) : set   1 int   & get   1 int
          setpowercons     (0001) : set   1 int   & get   1 int
          wmm_qosinfo      (0002) : set   1 int   & get   1 int
          lolisteninter    (0003) : set   1 int   & get   1 int
          psnullinterval   (0005) : set   1 int   & get   1 int
          bcnmisto         (0006) : set   1 int   & get   1 int
          adhocawakepd     (0007) : set   1 int   & get   1 int
          ldocfg           (0008) : set   1 int   & get   1 int
          rtsctsctrl       (000F) : set   1 int   & get   1 int
          moduletype       (000B) : set   1 int   & get   1 int
          autodeepsleep    (000C) : set   1 int   & get   1 int
          enhanceps        (000D) : set   1 int   & get   1 int
          wakeupmt         (000E) : set   1 int   & get   1 int
          authtype         (0010) : set   1 int   & get   1 int
          setrxant         (0001) : set   1 int   & get   0
          settxant         (0002) : set   1 int   & get   0
          authalgs         (0004) : set   1 int   & get   0
          encryptionmode   (0005) : set   1 int   & get   0
          setregioncode    (0006) : set   1 int   & get   0
          setlisteninter   (0007) : set   1 int   & get   0
          setmultipledtim  (0008) : set   1 int   & get   0
          setbcnavg        (0009) : set   1 int   & get   0
          setdataavg       (000A) : set   1 int   & get   0
          associate        (000B) : set   1 int   & get   0
          getregioncode    (0001) : set   0       & get   1 int
          getlisteninter   (0002) : set   0       & get   1 int
          getmultipledtim  (0003) : set   0       & get   1 int
          gettxrate        (0004) : set   0       & get   1 int
          getbcnavg        (0005) : set   0       & get   1 int
          getdataavg       (0006) : set   0       & get   1 int
          getauthtype      (0007) : set   0       & get   1 int
          getrsnmode       (0008) : set   0       & get   1 int
          act_paircipher   (0009) : set   0       & get   1 int
          act_groupcipher  (000A) : set   0       & get   1 int
          getdtim          (000B) : set   0       & get   1 int
          getrxant         (0001) : set   0       & get  12 char
          gettxant         (0002) : set   0       & get  12 char
          gettsf           (0003) : set   0       & get  12 char
          wpssession       (0004) : set   0       & get  12 char
          deepsleep        (8BFB) : set   1 char  & get   6 char
          adhocstop        (0004) : set   0       & get   0
          radioon          (0001) : set   0       & get   0
          radiooff         (0002) : set   0       & get   0
          rmaeskey         (0003) : set   0       & get   0
          crypto_test      (0006) : set   0       & get   0
          reasso-on        (0007) : set   0       & get   0
          reasso-off       (0008) : set   0       & get   0
          wlanidle-on      (0009) : set   0       & get   0
          wlanidle-off     (000A) : set   0       & get   0
          softreset        (000C) : set   0       & get   0
          sleepparams      (0002) : set  64 char  & get  64 char
          requesttpc       (0004) : set  64 char  & get  64 char
          powercap         (0005) : set  64 char  & get  64 char
          measreq          (000C) : set  64 char  & get  64 char
          bca-ts           (0003) : set  64 char  & get  64 char
          scanmode         (0006) : set  64 char  & get  64 char
          getadhocstatus   (0009) : set  64 char  & get  64 char
          setgenie         (000A) : set  64 char  & get  64 char
          getgenie         (000B) : set  64 char  & get  64 char
          qstatus          (000D) : set  64 char  & get  64 char
          ts_status        (000E) : set  64 char  & get  64 char
          setaeskey        (0001) : set  32 char  & get   0
          getaeskey        (0001) : set   1 int   & get 128 char
          version          (0002) : set   1 int   & get 128 char
          verext           (0003) : set   1 int   & get 128 char
          setwpaie         (8BE0) : set  24 char  & get   0
          setband          (0001) : set  10 char  & get   0
          setadhocch       (0002) : set  10 char  & get   0
          chanswann        (0003) : set  10 char  & get   0
          getband          (0001) : set   0       & get  10 char
          getadhocch       (0002) : set   0       & get  10 char
          getlog           (8BE9) : set   0       & get 512 char
          tpccfg           (0001) : set  16 int   & get  16 int
          scanprobes       (0006) : set  16 int   & get  16 int
          ledgpio          (0005) : set  16 int   & get  16 int
          sleeppd          (0007) : set  16 int   & get  16 int
          rateadapt        (0008) : set  16 int   & get  16 int
          getSNR           (0009) : set  16 int   & get  16 int
          getrate          (000A) : set  16 int   & get  16 int
          getrxinfo        (000B) : set  16 int   & get  16 int
          atimwindow       (000C) : set  16 int   & get  16 int
          bcninterval      (000D) : set  16 int   & get  16 int
          sdiopullctrl     (000E) : set  16 int   & get  16 int
          scantime         (000F) : set  16 int   & get  16 int
          sysclock         (0010) : set  16 int   & get  16 int
          txcontrol        (0012) : set  16 int   & get  16 int
          hscfg            (0014) : set  16 int   & get  16 int
          hssetpara        (0015) : set  16 int   & get  16 int
          inactoext        (0016) : set  16 int   & get  16 int
          dbgscfg          (0017) : set  16 int   & get  16 int
          drvdbg           (0018) : set  16 int   & get  16 int
          drvdelaymax      (001A) : set  16 int   & get  16 int
          intfctrl         (001B) : set  16 int   & get  16 int
          setquietie       (001C) : set  16 int   & get  16 int
          ctspowerctrl     (001E) : set  16 int   & get  16 int
          psmode           (001F) : set  16 int   & get  16 int
          setuserscan      (0001) : set 2000 byte  & get 2000 byte
          getscantable     (0002) : set 2000 byte  & get 2000 byte
          setmrvltlv       (0003) : set 2000 byte  & get 2000 byte
          getassocrsp      (0004) : set 2000 byte  & get 2000 byte
          addts            (0005) : set 2000 byte  & get 2000 byte
          delts            (0006) : set 2000 byte  & get 2000 byte
          qconfig          (0007) : set 2000 byte  & get 2000 byte
          qstats           (0008) : set 2000 byte  & get 2000 byte
          txpktstats       (000C) : set 2000 byte  & get 2000 byte
          getcfptable      (0009) : set 2000 byte  & get 2000 byte
          mefcfg           (000A) : set 2000 byte  & get 2000 byte
          getmem           (000B) : set 2000 byte  & get 2000 byte
          rdeeprom         (000D) : set 2000 byte  & get 2000 byte




* SD_WLAN_2_6_38_8.patch (6.41 KB - downloaded 184 times.)
Logged

Fletch
Jr. Member
**

Karma: 1
Posts: 61


View Profile
« Reply #5 on: June 23, 2011, 08:37:45 PM »

Easier way (for me) to set up wifi client:
1) Delete (or rename) /root/init_setup.sh
2) apt-get install wpasupplicant libertas-firmware
3) modify /etc/network/interfaces for your setup, ie:
Code:
auto wlan0
iface wlan0 inet dhcp
wpa-ssid myssid
wpa-psk mypassword
4) reboot

I'm running debian squeeze with the cxbiker kernel, but this should work on the factory kernel and rootfs too.
Logged

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #6 on: June 24, 2011, 06:39:09 PM »

Hi fletch,

How stable is the libertas driver and firmware for you? I went to sd8xxx because I could not get a stable client connection, I also found the libertas-firmware to mess wiyh uap8xxx so I basically followed the recipe at http://plugcomputer.org/plugwiki/index.php/Setting_GuruPlug_to_be_a_stable_WiFi_Client (except I did not need to recompile the kernel).
I found the firmware in http://www.plugcomputer.org/plugwiki/images/0/05/SD_WLAN.tar.gz to be the same as the firmware in the mrvl directory of the Dreamplug as distributed. It would appear that sd8xxx loads firmware from /lib/firmware (sd8688.bin and sd8688_helper.bin) and uap8xxx loads the same from /lib/firmware/mrvl. When I installed the libertas-firmware (which has a different  sd8688.bin and sd8688_helper.bin) then I found that the AP mode uap0 no longer worked. So I ended up with sd8xxx as the means to be enable both a wifi client or AP without having to add/remove firmware. 
The sd8xxx/uap8xxx combination is premised on blacklisting libertas and libertas_sdio.
My remaining issue is that libertas and libertas_sdio is the only way I can get Bluetooth to work.
Logged

Fletch
Jr. Member
**

Karma: 1
Posts: 61


View Profile
« Reply #7 on: June 24, 2011, 07:49:00 PM »

How stable is the libertas driver and firmware for you?

Not sure yet.  I've had problems with it in the past, but I'm not sure what versions I was using.  I've been running wired and just recently had a reason to try wireless again.  I'll post if I run into any issues.
Logged

Klaus
Newbie
*

Karma: 0
Posts: 4


View Profile
« Reply #8 on: October 17, 2011, 12:52:36 PM »

The libertas driver is extremely unstable using the 2.6.33 kernel and ad-hoc mode. However using 2.6.38.8 and a properly patched sd-driver makes the dreamplug a happy ad-hoch wlan node.

Thank you for the great directions!
Logged

Klaus
Newbie
*

Karma: 0
Posts: 4


View Profile
« Reply #9 on: October 17, 2011, 02:12:17 PM »

one thing though: CPU Usage went up by about 15% in contrast to the uap module and AP mode.
Logged

spinifex
Full Member
***

Karma: 8
Posts: 167



View Profile WWW
« Reply #10 on: October 17, 2011, 10:48:10 PM »

... CPU Usage went up ... in contrast to the uap module and AP mode

Using sheeva-with-linux 3.0.4
The difference for me has been neglible. I guess it depends on your usage pattern.
Logged

Klaus
Newbie
*

Karma: 0
Posts: 4


View Profile
« Reply #11 on: October 18, 2011, 01:15:07 PM »

Do you use ad-hoc mode as well? Can you see a change in cpu use if you do?

Because that would mean it might be worthwile to upgrade the kernel once again to 3.0.4 and do all the module rebuilds for iptables, openssl and ocf once more.
Logged

Pages: [1]
Print
Jump to: