OpenWrt Forum Archive

Topic: madwimax (yota.ru) on 8.09

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I've managed to compile packages of madwimax (http://code.google.com/p/madwimax/) against 8.09 branch.

Be aware, that in order to run madwimax binary, you'll need to install a new libusb 1.0 library. Doing so will break usbutils package for sure and maybe something else I'm now aware of. Another point to note, is that the packages are compiled for brcm47xx platform (2.6) I'll try to compile for 2.4 but at the moment I just don't have enough time.

First you'll need to install usb support for your box. On my ASUS WL500gP I needed to install kmod-usb-core_2.6.25.17-brcm47xx-1_mipsel.ipk and kmod-usb-uhci_2.6.25.17-brcm47xx-1_mipsel.ipk.

opkg update
opkg install kmod-usb-core
opkg install kmod-usb-uhci

Then install customized libusb library and madwimax package from ftp://downloads.nas.lv/openwrt/8.09/brcm47xx/madwimax/.

opkg install ftp://downloads.nas.lv/openwrt/8.09/brcm47xx/madwimax/libusb_1.0.0-1_mipsel.ipk
opkg install ftp://downloads.nas.lv/openwrt/8.09/brcm47xx/madwimax/madwimax_0.1.0+r160-1_mipsel.ipk

After rebooting your box you'll be able to run madwimax binary by typing /usr/sbin/madwimax.

oot@OpenWrt:~# /usr/sbin/madwimax -vv
Bus 001 Device 001: ID 1d6b:0001
Bus 002 Device 001: ID 1d6b:0001
Bus 001 Device 002: ID 04e8:6761
Device found
Claimed interface
Continuous async read start...
Chip info: cmc730_v2.1
Firmware info: u200_rev1-2.3.0-BL22
MAC: xx:xx:xx:xx:xx:xx
Allocated tap interface: wimax0
Starting if-create script...
Child exited with status 256
Network not found.

Unfortunately my current location is not covered by wimax signal, so I can't test myself whether it associates itself with station or not, so if you're fortunate to be covered please test it and report back.

(Last edited by nas on 3 May 2009, 19:29)

Ok, tested it myself - it works.

I've created packages for brcm-2.4 and atheros platforms. Because of endianess when launching madwimax on atheros platform you need to use --device and specify vid:pid explicitly.

Well the only thing left is to incorporate into standard openwrt configuration paradigm.

Incorporated it. The packages on ftp://downloads.nas.lv include these changes.

You'll need to create 3 files and modify one file:

/etc/hotplug.d/usb/20-madwimax
The hotplug system is responsible for detecting a plugged-in/plugged-out WiMAX dongle. And starting or stopping the madwimax service.

#!/bin/sh

case "$ACTION" in
        add)     
                [ -n ${PRODUCT} ] &&                
                [ -n ${INTERFACE} ] &&              
                [ "${PRODUCT}" = "4e8/6761/1" ] &&  
                [ "${INTERFACE}" = "255/0/0" ] && { 
                        /etc/init.d/madwimax start  
                }                                   
                ;;                                  
        remove)                                     
                [ -n ${PRODUCT} ] &&                
                [ -n ${INTERFACE} ] &&              
                [ "${PRODUCT}" = "4e8/6761/1" ] &&  
                [ "${INTERFACE}" = "255/0/0" ] && { 
                        /etc/init.d/madwimax stop   
                }                                   
                ;;                                  
esac

/etc/init.d/madwimax
Launches and stops madwimax daemon.

#!/bin/sh /etc/rc.common

START=95

start() {
        /usr/sbin/madwimax -vvfd
}

stop() {
        /usr/bin/killall madwimax 
        return 0
}

/etc/madwimax/event.sh
A script that receives events from madwimax daemon and tunes the interface accordingly.

#!/bin/sh

case "$1" in
        if-create)
                ;;
        if-up)
                /sbin/ifup wan
                ;;
        if-down)
                /sbin/ifdown wan
                ;;
        if-release)
                ;;
esac

exit 0

/etc/config/network
Simply add the following strings to this configuration file in order to get an internet connection behind your box. Specifying ifname is ugly hack, but there is no way to scan for correct interface name. So at the moment this setup will work only with one dongle at a time.

config interface        wan
        option ifname   "wimax0"
        option proto    dhcp
        option auto     0

(Last edited by nas on 11 Jun 2009, 20:16)

Would you mind posting your Makefile for Madwimax? For some reason I can't get it to see libusb1 though it's installed and in the staging dir with the rest of the libs.

Thanks smile

This post should be moved into the 'Howtos and Documentation' sub-forum.

aport, here is a Makefile I use. Because a lot of problems were fixed in current trunk I choosed to copy the source from local source.

#
# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=madwimax
PKG_VERSION:=0.1.0+r161
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

include $(INCLUDE_DIR)/package.mk

define Package/madwimax
  SECTION:=net
  CATEGORY:=Network
  DEPENDS:+=libusb kmod-tun libpthread
  TITLE:=An userspace driver for devices based on Samsung CMC-730 chip
  URL:=http://code.google.com/p/madwimax/
endef

define Package/madwimax/description
  MadWimax is a reverse-engineered linux
  driver for Mobile Wimax (802.16e) devices
  based on Samsung CMC-730 chip
endef

define Build/Prepare
        mkdir -p $(PKG_BUILD_DIR)
        $(CP) -r ./source/* $(PKG_BUILD_DIR)/
endef

define Build/Configure
        $(call Build/Configure/Default)
endef

define Package/madwimax/install
        install -m0755 -d $(1)/usr/sbin
        install -m0755 $(PKG_BUILD_DIR)/src/madwimax $(1)/usr/sbin

        install -m0755 -d $(1)/etc/hotplug.d/usb/05-madwimax
        install -m0755 $(PKG_BUILD_DIR)/etc/hotplug.d/usb/05-madwimax
endef

$(eval $(call BuildPackage,madwimax))

Yanira,

Do you really think creating a wiki page worth it? It took longer than month to get the first comment on the topic ... So I've thought there is no interest in it.

I think you should, as soon this devices will spread on the market your expirience will be very useful!

AraKs wrote:

I think you should, as soon this devices will spread on the market your expirience will be very useful!

There is barely any talk about 3G cards. I don't see much around 4G technologies, either.


HOWEVER!!


You can never have enough information! I say create a Wiki page. I'll probably update it too as I'm working on some Wimax stuff at the moment.

In my opinion, 3G cards are a totally different situation.

The only 3G modems we have in italy are those rebranded by mobile providers (USB and ExpressCards/PCMCIA). Each one has its driver and firmware. I don't know what's the current state of linux drivers for this devices, but the device base seems too heterogeneous.
WiMAX solutions seems to adopt the same chipsets, and i think that in the near future almost every mainstream WiMAX product will be based on a couple of well known chipsets (like atheros and broadcom for WiFi). This will simplify the writing of functional and easy to use drivers.

At least, this is the situation in Italy, it could be different in other states.

AraKs wrote:

In my opinion, 3G cards are a totally different situation.

The only 3G modems we have in italy are those rebranded by mobile providers (USB and ExpressCards/PCMCIA). Each one has its driver and firmware. I don't know what's the current state of linux drivers for this devices, but the device base seems too heterogeneous.
WiMAX solutions seems to adopt the same chipsets, and i think that in the near future almost every mainstream WiMAX product will be based on a couple of well known chipsets (like atheros and broadcom for WiFi). This will simplify the writing of functional and easy to use drivers.

At least, this is the situation in Italy, it could be different in other states.

It is actually the complete reverse.

Almost all 3G cards on the market can use the generic usbserial driver, or the option driver which is an extension to it. Newer Option cards can use the HSO driver. So, that's three open source drivers that power every 3G card in existence.

Wimax cards seem to use proprietary chipsets with no drivers available at all.  You've got the Intel cards with open source drivers, then you've got Samsung cards with reverse-engineered Madwimax drivers. Then there's Beceem chips with no drivers.

You're right. We've just to wait to see wich wimax cards will be mostly deployed on the market.

Another question:
Do you know wich chipset is used by Huawei 3G usb sticks? Those one are the most common in Italy, and i might find one to test...

AraKs wrote:

You're right. We've just to wait to see wich wimax cards will be mostly deployed on the market.

Another question:
Do you know wich chipset is used by Huawei 3G usb sticks? Those one are the most common in Italy, and i might find one to test...

It's definitely not Qualcomm, that's for sure. Every huawei card I've tried works just fine insmodding usbserial with the vendor id and product id.

You were right, there's an howto for the Huawei E220 USB Dongle:
http://josefsson.org/openwrt/dongle.html

It needs a couple of extra packages, but it works just by using usb-serial.
Probably will be the same for their USB Sticks!

Thanks!!!

P.S.
My father brought me home a Huawei K3715. It's a HSPA modem with microSD slot. It works, but the sliding usb connector is broken, so i have to find a way to block it outside the stick, maybe with some glue...
Here's a video showing the exact model:
http://www.youtube.com/watch?v=YE--mQHI_nI

Hellow everybody. I install Samsung SWC-U200 to wl500Gp and i haven't driver for it.
This link ftp://downloads.nas.lv/openwrt/8.09/brcm47xx/madwimax/ are not responding.Dead.
Can you give me link to this things: libusb_1.0.0-1_mipsel.ipk,  madwimax_0.1.0+r160-1_mipsel.ipk
or put to some resource?

Is it possbile to make it for atheros based routers?

The discussion might have continued from here.