Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #The contents of this file, to the extent that they are copyrightable, are hereby placed in the public domain. If anyone reading this wishes to contact me with more information or patches, send e-mail to mm201108 at zzxc dot net.
- #Sprint 4G on Ubuntu 11.04+ with a 250U modem. These instructions correct omissions in the official documentation and patch the driver to work in modern Linux kernels.
- #Because the wimax modem in the 250U doesn't actually work unless the Windows driver and Sprint SmartView initialize it first, this also contains a patch for the sierra kernel driver and a python script to simulate SmartView.
- #This guide keeps all the installed files in the working directory instead of installing them to the system - so as to prevent conflicts when the system is upgraded later.
- #0) Create a working directory for the big mess you're about to create.
- mkdir ~/sprint
- cd ~/sprint
- #1) Get prerequisites
- sudo apt-get install libnl-dev
- sudo apt-get install linux-kernel-headers
- sudo apt-get install libssl-dev
- #2) Get Sprint4GDeveloperPack-1.6.1.2.2.tar.gz and extract it. Inside, extract Rel_6.1.2.2_USB-Updated.zip. Read the enclosed instructions and ensure that you extract the correct wimaxd.conf, the correct macxvi.cfg file, and the USB_350 folder.
- #3) Copy firmware
- sudo cp macxvi.cfg /lib/firmware
- sudo cp USB_350/Binaries/Firmware/macxvi350.bin /lib/firmware
- #4) Build the API files
- cd USB_350/Source/API
- dos2unix build.sh
- chmod 755 build.sh
- ./build.sh
- cd tgtxvi020
- sudo make install
- #5) Fix the build file, as we're in unix
- cd ../../CSCM
- chmod 755 build.sh
- dos2unix build.sh
- #6) Now let's fix the wpa_supplicant. Nix the DOS drive letters in the file to prevent syntax errors.
- sed -i 's/C:\//\//g' wpa_supplicant/*.d
- #7) Copy libxvi020.so to the right place
- cp ../API/bin_linux/bin/libxvi* bin_pc_linux/bin/
- #8) Build it:
- ./build.sh pc_linux
- #9) Exit this folder
- cd ../../..
- #10) kill the bcm_wimax driver - it doesn't work with any existing software. Also, kill the sierra driver because you will be replacing it later.
- /bin/echo -e "blacklist sierra\nblacklist bcm_wimax" >> /etc/modprobe.d/blacklist.conf
- #11) Build the Beceem driver from your Sprint 4G Developer Pack.
- cd USB_350/Source/Driver/Network/OSAL/Linux/usb
- #12) IMPORTANT: FIX LINE ENDINGS SO THAT THE FOLLOWING PATCH APPLIES CLEANLY!!!
- dos2unix Include/Common/led_control.h
- dos2unix Include/Common/osal_misc.h
- dos2unix Interface/usb/InterfaceInit.c
- #13) Edit the Makefile to point to the right location of your kernel headers. Patch the Beceem driver to take care of http://git390.marist.edu/cgi-bin/gitweb.cgi?p=linux-2.6.git;a=commitdiff_plain;h=9bbdf1e0afe771ca7650f9f476769310bee9d8f3 , http://kerneltrap.org/mailarchive/git-commits-head/2010/4/30/32383 , http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626790 , and http://www.gossamer-threads.com/lists/linux/kernel/1263098
- #I wrote a patch to do that. Un-base64 the following blob of data, then decompress it with xz. Apply the patch to the 'usb' folder you're in right now. (hint: pipe it to "patch -p1")
- : <<'END'
- /Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4BaoB6VdADIaSQnC/BF9UN4KT0fXHd5NuXXL0v4hZC+B
- rifuihGksiZISn8tIyzOA+Gryvp3JUMcKa6YDlyOzXAmVm2aWF1keWKA3gBNN4rqQISA0TFVELjU
- wL34HVKY5PFlNQ/5uZXFiZ65nOpzKNvb2faW3E1MhC35k8yHHOKN1M/y2k5NWvcqAk1c3j8J3qyx
- HcOAi4GgcP+gx9FYP8HlHfz4KSlLvMahyAzmNlIopThl570Mrc620lm5KsejT79/+mPyVqhlyhwm
- TfK57ZA/U/oAkytPBX9DFzma/oGaay9ZHlI1Syi/odqKyy4kWephvHqFTaL7EOhSR/BVPCuad8rX
- tgKecy0ymU0WcedFFfbzC/mJn5fxk2wYmgkG+rKcww/o2PEeVVHv6TasSGtuBjV9OWZCNVCqYRxS
- uAM4wK2gkzuik+1t1BhVP9ITWyNndzkKpgcn7/hbjAZMaibAAaM3YGECRReAsGpfZXc7bFYqPOae
- aRugkZh26jz33DSNBX4uaptwWc7VBXS7F0k21vnAi4DQqB52cyzN/lAE0R2AI/fyptPI5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ENR5uxxGf7AgAAAAAEWVo=
- END
- #14) Build it.
- make
- #15) Insert your new module
- sudo insmod drxvi314.ko
- #16) Build the sierra250 module, a slightly modified version of the sierra driver. Un-base64 this additional blob of binary data, decompress it with xz, and untar it with tar. You will have a new folder named sierra250. Enter it and follow the instructions in the README.
- : <<'END'
- /Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4Cf/BT1dADmaSNSNlVi+WvxHRwuVR4pFXtmxf4+D7gVJ
- OGzGCm/RRTNTnsDuJbGWZBSuJ+R86kOAkI/D6DdSBBCXFins4Ft6IkYLNRw0TZuii8GeeAwkHO53
- kWFH1IPiRAWiixJdIda7bal+wb3OS6YWj/HBmwXnf8ygAgEe4iO0V4V3yLT9zTil8TmiHFHUDise
- hGO8Kd5PEEM7/8qk7J8SD4VWKv7LR6irgqJ4WXcq3FCkkzNPmYglSxApvRUKwjH6q0VzqFlCCTSr
- hYPAXvPmXzo63KMy2eNXEf0EuJIv5DRf7IWMjM05eOcc+gKNZ6nu9bI8Md/t/1OWP0oYa0qWmXue
- A1RKoiy0qlHQyusOWNuyvR5UzGk95HiHppWtev0N/cyimmAT9HCalRIOCDvKo4Lv1OPFroFaATEM
- 1LV94yJ89Qs2N1yqvHYR8w9vNg3PDKnXtOha6+Ltx12V3LwKNbaMkccVIfP5hIrfCO6v7RuPNVj2
- sAiDV5Qc1hgIAUKas97zH3UB6SLZZQbivC6AUMMlYrJ7p4faP+uiPRCRq6qqM9izNK3aS07Q3w7h
- GytHPChzYswREeqlIOnaItaAZb0s38ij12taRdOGxwwgYrpwmf2NJ7DOIlUsQaNC5WSdVVs3uyKH
- UIB1B3oBzXjyqpG1GeJU7R6CXGEEe7s4BfVaq2tuKm3XaYSvz1RmAOATlJGXmq9Hxw68TPvoHoid
- Rx3sIjwktUwkM2O3KPfS1a/p4IMOg5Galo9bcsm8tPe+1FHSC2vXGc2B57MF+DAl1QpQ64WAcKiO
- ekl6dycUch8EEZ2M/M39GYv9tJj217evBpiqUa8UlnA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now have /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2, and /dev/ttyUSB3. The first is a serial modem port, and the second is a "CNS" (binary proprietary protocol from Sierra Wireless). Unfortunately, you'll need to issue a CNS command to turn off the CDMA modem before your WiMAX modem will work. I wrote a simple Python script to do that - decode (un-base64), decompress (xzip), and save the following data to cns1075.py
- : <<'END'
- /Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4Ay/A7ldABGIQkeKIzPDdw8z/VhnH14++zRlb+ysPMFG
- kEy/AsNgVesP59jLMFt1tj4k8GrUQ3n0yH+jmUcWDYlJfPVRgcIrz+ViYV2f+xEtQeTQZhl9eqp3
- WYMYmjIVe4PvmxehA6Z5RB2Gd3mdcNEhTIvgko3MO0ql+Q8I3CqG34W30u/MupFh15JJ4bc/FFdZ
- T8vAlvHk5WtmjFaYv7wPKsBzxzQCj1OftYFZpygKaaXefGRztN5ZikIX0mw/c0faxJ2kbJ2ibPfa
- qkD9cpvfNih9bNhNuvqsMY0XBXsauY7qY4Uqexcsbu4ktbKAYMY3YC6XdJkDevQTNllohUTa3tTA
- dBkD4skYW9ovZYnT515rdjv10soootATFoVikgbRvzTDSlTD40HvYv3w7Sf55gImP2n1b/ZLpLen
- N90UmxIzGeJdHDTUrcEjlBSzr4/OXsB1dRU3tKhLw+2yuVYn9b1od4s6021mBG78r37RMA6wetw7
- C0lUJZw+ZC4W7BWki1QU6z1UZ7jyksUP9/pyvvLpwjV4hAaI8wpStxnCTEm8rxyf6Wdb4Ik2X4aP
- /8/TuKOIAweaJo0Qlrvf1DMmX1eT5SXgrNsShmxwKoKrEri1Bem5IELHm1yAESiS5Xa/eF7x58Sv
- 3eRfCD6k09or6lCDPyge4Bku+7McAArIYBQan63N1r8rlAhSaXIZwa031wYYk/bifyijZRWO1Gxw
- meKsRBj/jiLcppy0aeYTBPZXTE4zI7lIRA4FBXYkN9AoDUz6oNDtkm8CB17Rzzt89xs968q2cqdv
- zhZdHhbflls7N5jAifbFz1CCFD8BCykq9G1qbDmlf6GV3beJDO9NzPfw37Ms1CAht8PNkvb0grfb
- 77tCo570W1g8IyztHENb6nTevJSlG/znbiZCORdJagBrcg4NmY9nE1vDus14QAHPl6l4oy70Wqs6
- jMAaA9amQsSkzSy0mx9+KRDI/thKZ9vsgz+Ui/X2Jfsd4zzE5NU4/f/HZ3Pj6JmJUgpneu9uq3F5
- ixYXVbD0/NocKt7be1onaiKRd3f9Mc2FZkfpApxMUZx5FwqTkxTMvf8OYQ1d7a60Zd+2LmVHn9xh
- OarcXqxIUPIkGxdG/oD184Lf74fd3wr2ojcE4Lm+HwD1OvUycWUcMMmapW4gbG/lxDyJ/QrePg0V
- dIZt9jZWPoWaT1cI3qZuFhRDa36Z9CJ2BJPT//v78lE9d0CLe+NILzrG/a2iWvwULXHwdwRqoaZC
- zLjcTEknJ4SxIjTGgswAAAAAAHMTYlKG//KRAAHVB8AZAACo8zxWscRn+wIAAAAABFla
- END
- #18) Execute the python script. It puts your terminal in character-mode input and awaits commands:
- # q = quit the program (You can also use CTRL+C)
- # C = CDMA radio on
- # c = CDMA radio off
- # W = wimax LED on
- # w = wimax LED off
- # ? = make the wimax LED blink
- # D = Cancel DM session (sometimes necessary, if the 3G modem is in use)
- sudo ./cns1075.py
- #You want to execute only the c (lowercase letter c) and q commands, to turn off the CDMA radio and quit. Optionally, you can turn the wimax LED on/off or change its color.
- #19) Finally - test it
- cd ../../../../../CSCM/bin_pc_linux/bin/
- sudo env LD_LIBRARY_PATH=. ./wimaxd -c ~/sprint/wimaxd.conf -D
- #Open another shell and start the client:
- env LD_LIBRARY_PATH=. ./wimaxc -i
- search
- #20) Follow the instructions in the Sprint 4G PDF to configure EAP. When it's working, use a shell script to insmod the driver, establish your connection, launch dhcpd, and fix network routes. (When the bcm_wimax kernel driver is finished, and NetworkManager 0.9+ is in use, this should work automagically. Until then, it's ugly.)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement