Advertisement
Guest User

Untitled

a guest
Aug 16th, 2011
1,069
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 6.56 KB | None | 0 0
  1. #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.
  2.  
  3. #Because I can't find a documented way to switch between 3G and 4G on this device, these instructions don't currently let you access the 4G network - see the bottom of this file. If anyone at Sprint or Sierra Wireless is reading this, I'd appreciate advice: mm201108 (at) zzxc.net.
  4.  
  5. #The contents of this file, to the extent that they are copyrightable, are hereby placed in the public domain.
  6. #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.
  7.  
  8.  
  9. #0) Create a working directory for the big mess you're about to create.
  10. mkdir ~/sprint
  11. cd ~/sprint
  12.  
  13.  
  14. #1) Get prerequisites
  15. sudo apt-get install libnl-dev
  16. sudo apt-get install linux-kernel-headers
  17. sudo apt-get install libssl-dev
  18.  
  19.  
  20. #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.
  21.  
  22. #3) Copy firmware
  23. sudo cp macxvi.cfg /lib/firmware
  24. sudo cp USB_350/Binaries/Firmware/macxvi350.bin /lib/firmware
  25.  
  26.  
  27. #4) Build the API files
  28. cd USB_350/Source/API
  29. dos2unix build.sh
  30. chmod 755 build.sh
  31. ./build.sh
  32. cd tgtxvi020
  33. sudo make install
  34.  
  35.  
  36. #5) Fix the build file, as we're in unix
  37. cd ../../CSCM
  38. chmod 755 build.sh
  39. dos2unix build.sh
  40.  
  41.  
  42. #6) Now let's fix the wpa_supplicant.  Nix the DOS drive letters in the file to prevent syntax errors.
  43. sed -i 's/C:\//\//g' wpa_supplicant/*.d
  44.  
  45. #7) Copy libxvi020.so to the right place
  46. cp ../API/bin_linux/bin/libxvi* bin_pc_linux/bin/
  47.  
  48. #8) Build it:
  49. ./build.sh pc_linux
  50.  
  51. #9) Exit this folder
  52. cd ../../..
  53.  
  54.  
  55. #10) kill the bcm_wimax driver - it doesn't work with any existing software.  Also, kill the sierra driver to prevent interference.
  56. /bin/echo -e "blacklist sierra\nblocklist bcm_wimax" >> /etc/modprobe.d/blacklist.conf
  57.  
  58.  
  59. #11) Build the Beceem driver from your Sprint 4G Developer Pack.
  60. cd USB_350/Source/Driver/Network/OSAL/Linux/usb
  61.  
  62. #12) IMPORTANT: FIX LINE ENDINGS SO THAT THE FOLLOWING PATCH APPLIES CLEANLY!!!
  63. dos2unix Include/Common/led_control.h
  64. dos2unix Include/Common/osal_misc.h
  65. dos2unix Interface/usb/InterfaceInit.c
  66.  
  67.  
  68. #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
  69.  
  70. #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")
  71. : <<'END'
  72.  
  73. /Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4BaoB6VdADIaSQnC/BF9UN4KT0fXHd5NuXXL0v4hZC+B
  74. rifuihGksiZISn8tIyzOA+Gryvp3JUMcKa6YDlyOzXAmVm2aWF1keWKA3gBNN4rqQISA0TFVELjU
  75. wL34HVKY5PFlNQ/5uZXFiZ65nOpzKNvb2faW3E1MhC35k8yHHOKN1M/y2k5NWvcqAk1c3j8J3qyx
  76. HcOAi4GgcP+gx9FYP8HlHfz4KSlLvMahyAzmNlIopThl570Mrc620lm5KsejT79/+mPyVqhlyhwm
  77. TfK57ZA/U/oAkytPBX9DFzma/oGaay9ZHlI1Syi/odqKyy4kWephvHqFTaL7EOhSR/BVPCuad8rX
  78. tgKecy0ymU0WcedFFfbzC/mJn5fxk2wYmgkG+rKcww/o2PEeVVHv6TasSGtuBjV9OWZCNVCqYRxS
  79. uAM4wK2gkzuik+1t1BhVP9ITWyNndzkKpgcn7/hbjAZMaibAAaM3YGECRReAsGpfZXc7bFYqPOae
  80. aRugkZh26jz33DSNBX4uaptwWc7VBXS7F0k21vnAi4DQqB52cyzN/lAE0R2AI/fyptPI5NtAxWth
  81. pnQCywxMnW8l7evOX2U1zw786ioAFF6hbBKebd92qaHF38bWRQb9+I1DcQn4Hq5vD07kC/a62q8n
  82. sNjK8EsWgtDbPCC2ApnLQ6wWV33g9pvJfG0yhZG9pgYf1hcvz4ct+1prP9aOcBITiU4Pv58xx42c
  83. 9mWmNfKBmAOJlS2YfQe0qEb0oowT/kCvXR4geNUJA/FU9qqd0/RW4uoLzNgjxEo5CjVDFxfg04Dt
  84. gybL9GC//zjdylJOignb069JYvx39N3e0Ny8MIf3qX6Imqrx9a86/AzSj5Vz/Z8f5v2kPv4HcNMJ
  85. pWmbRj/Y/Pf7b9x26+KoqBcD3qx6iCT5FirEV8l98wHxrbte2Ko684PlZqEPxntgAa5upK/EOsUg
  86. ppYWpv4k/Nw6TawM8um7eSr/mRvJBCTI7xDsRuoXdb2IKscB6sYjh3dNqckxzawHOkzinRICgv0P
  87. KP90gRMBIIcnxZiYRVQaKo+NjKhdmu3LIp5pszJaxs9MXParvbgGgk5nedWHQFsq7LwcMfsATnW6
  88. T34qbisD9gIA9F6zYuOOkzyYo7o3mfaHkAOc9bmJZq6eJemqkBSUt4fTrqfDNs7zl4DfCkSJcTN5
  89. gUSsIw5CCBH7e9TXU80v0/mTqQApuyZXFYVorwwo1f3FCvwx8EJIzmY/MD9muJLe75Ktowjpinsd
  90. uExHSh5Y3bW3xgZVhbRJpKu4sGFbIFzlHWtM1v4k/mJI3MXUryUVlWUjR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+
  104. 6rWRanHDXylJxATMGPU9tWq/aQ1oRXFws7Tg+oKrlUDKF2JpUuuDJZYyV6ynv/4cJQKU2IT9EBLH
  105. TPD0lAQjcJZya2IvajS6j8HhQJe5o7GXZxqq4dAgwx2aQjE3gzJtSeHaNw1EfXB0HUYsZbvsjJ/j
  106. 8An2H4PAZUdPbd9ZHt6hK7S0T2AMcfewpD4uRLXAjGNsw7W0ZCsH0/OXJvRY6d4pgQEyX5SsGuR6
  107. /gEw6xOg2AQd+4/WQRhdKvPCddA21qILmbSHZaDtRAg2DYh34ThC+5W8kWxcWlAFXzwAAAAAkfP6
  108. wI+eWcEAAcEPqS0AACENR5uxxGf7AgAAAAAEWVo=
  109.  
  110.  
  111. END
  112.  
  113. #14) Build it.
  114. make
  115.  
  116. #15) Insert your new module
  117. sudo insmod drxvi314.ko
  118.  
  119. #16) Set up serial access so that AT commands can be sent to the sierra portion of the modem (250U only)
  120. sudo modprobe option
  121. echo "1199 0301" > /sys/bus/usb-serial/drivers/option1/new_id
  122.  
  123.  
  124. #16) Finally - test it
  125. cd ../../../../../CSCM/bin_pc_linux/bin/
  126. sudo env LD_LIBRARY_PATH=. ./wimaxd -c ~/sprint/wimaxd.conf -D
  127. #Open another shell and start the client:
  128. env LD_LIBRARY_PATH=. ./wimaxc -i
  129. search
  130.  
  131. #17) Notice that the 3G light stays illuminated on the 250U, even as you attempt to use the WiMAX modem.  Zero WiMAX nodes will be found, even if you're in an area with 4G access.  You'll need to use some sort of AT command or CnS command (which aren't documented) to turn on the 4G modem.
  132. #/bin/echo "SOMETHING TO TURN ON 4G MODEM" > /dev/ttyUSBx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement