sb1000.rst 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ===================
  3. SB100 device driver
  4. ===================
  5. sb1000 is a module network device driver for the General Instrument (also known
  6. as NextLevel) SURFboard1000 internal cable modem board. This is an ISA card
  7. which is used by a number of cable TV companies to provide cable modem access.
  8. It's a one-way downstream-only cable modem, meaning that your upstream net link
  9. is provided by your regular phone modem.
  10. This driver was written by Franco Venturi <fventuri@mediaone.net>. He deserves
  11. a great deal of thanks for this wonderful piece of code!
  12. Needed tools
  13. ============
  14. Support for this device is now a part of the standard Linux kernel. The
  15. driver source code file is drivers/net/sb1000.c. In addition to this
  16. you will need:
  17. 1. The "cmconfig" program. This is a utility which supplements "ifconfig"
  18. to configure the cable modem and network interface (usually called "cm0");
  19. 2. Several PPP scripts which live in /etc/ppp to make connecting via your
  20. cable modem easy.
  21. These utilities can be obtained from:
  22. http://www.jacksonville.net/~fventuri/
  23. in Franco's original source code distribution .tar.gz file. Support for
  24. the sb1000 driver can be found at:
  25. - http://web.archive.org/web/%2E/http://home.adelphia.net/~siglercm/sb1000.html
  26. - http://web.archive.org/web/%2E/http://linuxpower.cx/~cable/
  27. along with these utilities.
  28. 3. The standard isapnp tools. These are necessary to configure your SB1000
  29. card at boot time (or afterwards by hand) since it's a PnP card.
  30. If you don't have these installed as a standard part of your Linux
  31. distribution, you can find them at:
  32. http://www.roestock.demon.co.uk/isapnptools/
  33. or check your Linux distribution binary CD or their web site. For help with
  34. isapnp, pnpdump, or /etc/isapnp.conf, go to:
  35. http://www.roestock.demon.co.uk/isapnptools/isapnpfaq.html
  36. Using the driver
  37. ================
  38. To make the SB1000 card work, follow these steps:
  39. 1. Run ``make config``, or ``make menuconfig``, or ``make xconfig``, whichever
  40. you prefer, in the top kernel tree directory to set up your kernel
  41. configuration. Make sure to say "Y" to "Prompt for development drivers"
  42. and to say "M" to the sb1000 driver. Also say "Y" or "M" to all the standard
  43. networking questions to get TCP/IP and PPP networking support.
  44. 2. **BEFORE** you build the kernel, edit drivers/net/sb1000.c. Make sure
  45. to redefine the value of READ_DATA_PORT to match the I/O address used
  46. by isapnp to access your PnP cards. This is the value of READPORT in
  47. /etc/isapnp.conf or given by the output of pnpdump.
  48. 3. Build and install the kernel and modules as usual.
  49. 4. Boot your new kernel following the usual procedures.
  50. 5. Set up to configure the new SB1000 PnP card by capturing the output
  51. of "pnpdump" to a file and editing this file to set the correct I/O ports,
  52. IRQ, and DMA settings for all your PnP cards. Make sure none of the settings
  53. conflict with one another. Then test this configuration by running the
  54. "isapnp" command with your new config file as the input. Check for
  55. errors and fix as necessary. (As an aside, I use I/O ports 0x110 and
  56. 0x310 and IRQ 11 for my SB1000 card and these work well for me. YMMV.)
  57. Then save the finished config file as /etc/isapnp.conf for proper
  58. configuration on subsequent reboots.
  59. 6. Download the original file sb1000-1.1.2.tar.gz from Franco's site or one of
  60. the others referenced above. As root, unpack it into a temporary directory
  61. and do a ``make cmconfig`` and then ``install -c cmconfig /usr/local/sbin``.
  62. Don't do ``make install`` because it expects to find all the utilities built
  63. and ready for installation, not just cmconfig.
  64. 7. As root, copy all the files under the ppp/ subdirectory in Franco's
  65. tar file into /etc/ppp, being careful not to overwrite any files that are
  66. already in there. Then modify ppp@gi-on to set the correct login name,
  67. phone number, and frequency for the cable modem. Also edit pap-secrets
  68. to specify your login name and password and any site-specific information
  69. you need.
  70. 8. Be sure to modify /etc/ppp/firewall to use ipchains instead of
  71. the older ipfwadm commands from the 2.0.x kernels. There's a neat utility to
  72. convert ipfwadm commands to ipchains commands:
  73. http://users.dhp.com/~whisper/ipfwadm2ipchains/
  74. You may also wish to modify the firewall script to implement a different
  75. firewalling scheme.
  76. 9. Start the PPP connection via the script /etc/ppp/ppp@gi-on. You must be
  77. root to do this. It's better to use a utility like sudo to execute
  78. frequently used commands like this with root permissions if possible. If you
  79. connect successfully the cable modem interface will come up and you'll see a
  80. driver message like this at the console::
  81. cm0: sb1000 at (0x110,0x310), csn 1, S/N 0x2a0d16d8, IRQ 11.
  82. sb1000.c:v1.1.2 6/01/98 (fventuri@mediaone.net)
  83. The "ifconfig" command should show two new interfaces, ppp0 and cm0.
  84. The command "cmconfig cm0" will give you information about the cable modem
  85. interface.
  86. 10. Try pinging a site via ``ping -c 5 www.yahoo.com``, for example. You should
  87. see packets received.
  88. 11. If you can't get site names (like www.yahoo.com) to resolve into
  89. IP addresses (like 204.71.200.67), be sure your /etc/resolv.conf file
  90. has no syntax errors and has the right nameserver IP addresses in it.
  91. If this doesn't help, try something like ``ping -c 5 204.71.200.67`` to
  92. see if the networking is running but the DNS resolution is where the
  93. problem lies.
  94. 12. If you still have problems, go to the support web sites mentioned above
  95. and read the information and documentation there.
  96. Common problems
  97. ===============
  98. 1. Packets go out on the ppp0 interface but don't come back on the cm0
  99. interface. It looks like I'm connected but I can't even ping any
  100. numerical IP addresses. (This happens predominantly on Debian systems due
  101. to a default boot-time configuration script.)
  102. Solution
  103. As root ``echo 0 > /proc/sys/net/ipv4/conf/cm0/rp_filter`` so it
  104. can share the same IP address as the ppp0 interface. Note that this
  105. command should probably be added to the /etc/ppp/cablemodem script
  106. *right*between* the "/sbin/ifconfig" and "/sbin/cmconfig" commands.
  107. You may need to do this to /proc/sys/net/ipv4/conf/ppp0/rp_filter as well.
  108. If you do this to /proc/sys/net/ipv4/conf/default/rp_filter on each reboot
  109. (in rc.local or some such) then any interfaces can share the same IP
  110. addresses.
  111. 2. I get "unresolved symbol" error messages on executing ``insmod sb1000.o``.
  112. Solution
  113. You probably have a non-matching kernel source tree and
  114. /usr/include/linux and /usr/include/asm header files. Make sure you
  115. install the correct versions of the header files in these two directories.
  116. Then rebuild and reinstall the kernel.
  117. 3. When isapnp runs it reports an error, and my SB1000 card isn't working.
  118. Solution
  119. There's a problem with later versions of isapnp using the "(CHECK)"
  120. option in the lines that allocate the two I/O addresses for the SB1000 card.
  121. This first popped up on RH 6.0. Delete "(CHECK)" for the SB1000 I/O addresses.
  122. Make sure they don't conflict with any other pieces of hardware first! Then
  123. rerun isapnp and go from there.
  124. 4. I can't execute the /etc/ppp/ppp@gi-on file.
  125. Solution
  126. As root do ``chmod ug+x /etc/ppp/ppp@gi-on``.
  127. 5. The firewall script isn't working (with 2.2.x and higher kernels).
  128. Solution
  129. Use the ipfwadm2ipchains script referenced above to convert the
  130. /etc/ppp/firewall script from the deprecated ipfwadm commands to ipchains.
  131. 6. I'm getting *tons* of firewall deny messages in the /var/kern.log,
  132. /var/messages, and/or /var/syslog files, and they're filling up my /var
  133. partition!!!
  134. Solution
  135. First, tell your ISP that you're receiving DoS (Denial of Service)
  136. and/or portscanning (UDP connection attempts) attacks! Look over the deny
  137. messages to figure out what the attack is and where it's coming from. Next,
  138. edit /etc/ppp/cablemodem and make sure the ",nobroadcast" option is turned on
  139. to the "cmconfig" command (uncomment that line). If you're not receiving these
  140. denied packets on your broadcast interface (IP address xxx.yyy.zzz.255
  141. typically), then someone is attacking your machine in particular. Be careful
  142. out there....
  143. 7. Everything seems to work fine but my computer locks up after a while
  144. (and typically during a lengthy download through the cable modem)!
  145. Solution
  146. You may need to add a short delay in the driver to 'slow down' the
  147. SURFboard because your PC might not be able to keep up with the transfer rate
  148. of the SB1000. To do this, it's probably best to download Franco's
  149. sb1000-1.1.2.tar.gz archive and build and install sb1000.o manually. You'll
  150. want to edit the 'Makefile' and look for the 'SB1000_DELAY'
  151. define. Uncomment those 'CFLAGS' lines (and comment out the default ones)
  152. and try setting the delay to something like 60 microseconds with:
  153. '-DSB1000_DELAY=60'. Then do ``make`` and as root ``make install`` and try
  154. it out. If it still doesn't work or you like playing with the driver, you may
  155. try other numbers. Remember though that the higher the delay, the slower the
  156. driver (which slows down the rest of the PC too when it is actively
  157. used). Thanks to Ed Daiga for this tip!
  158. Credits
  159. =======
  160. This README came from Franco Venturi's original README file which is
  161. still supplied with his driver .tar.gz archive. I and all other sb1000 users
  162. owe Franco a tremendous "Thank you!" Additional thanks goes to Carl Patten
  163. and Ralph Bonnell who are now managing the Linux SB1000 web site, and to
  164. the SB1000 users who reported and helped debug the common problems listed
  165. above.
  166. Clemmitt Sigler
  167. csigler@vt.edu