Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Command Line on setting up Linksys usb adapter from sbininit

  1. #1
    Senior Member registered user
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    204

    Command Line on setting up Linksys usb adapter from sbininit

    Quote Originally Posted by sbininit
    I got my linksys usb adapter working in knx 5.3.1 finally. I'm not sure how to edit the make file to specify the 2.6.24.4 linux kernel when installing it though.

    I also have to manualy load the driver rt2870sta.ko using : insmod rt2870sta.ko

    /etc/rc.local doesnt load it on start up. I dont know if the script is enabled.

    at the bottom of rc.local it says:
    In order to enable or disable this script just change the execution
    # bits.
    Thats fine and dandy but I dont know how to change the execution bits

    I have to pull it up with ifconfig ra0 up and then configure it with Knoppix on board network wizard. I cant seem to get it going with command line, the pump command always fails for some reason. I want to be able to do it with the command line.
    I moved your post here just to avoid too much topics on one thread. Let's be fair to those user who wants to keep track on their own problems.

    OK, for your problem. Here is a summary of what you have done so far.

    1. You found yourself a compiled wifi device driver rt2870sta.ko from somewhere.
    2. Manually, you have successfully activated your wifi device.

    Now you want to automate it during boot time. And you are trying it by adding entries on the rc.local to make it works.

    Can you do the following:

    Perform the following 2 commands from the konsole and post your result back.

    Code:
    $ ls -l /etc/rc.local
    $ cat /etc/rc.local
    In case you don't know where the konsole is, it is the black TV liked icon on the bottom status bar on the x-window.

    Rgds,
    Chip

  2. #2
    Member registered user
    Join Date
    Jul 2009
    Posts
    38
    Yes, here is the first command results-

    knoppix@Knoppix:~$ ls -l /etc/rc.local
    -rwxr-xr-x 1 root root 358 Aug 18 23:08 /etc/rc.local
    knoppix@Knoppix:~$


    and the 2nd-

    knoppix@Knoppix:~$ cat /etc/rc.local
    #!/bin/sh
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    sudo insmod /lib/modules/2.6.24.4/wireless/rt2870sta.ko
    exit 0
    knoppix@Knoppix:~$



    I did get it to load the module at boot up by canging the name of the /bin/sh -e to /bin/sh
    That did not solve completely the problem. the light comes on my usb wireless adapter but I cant see the device with iwconfig or ifconfig until I unplug it, replug it and then bring it up with ifconfig ra0 up.

  3. #3
    Senior Member registered user
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    204
    Quote Originally Posted by sbininit
    knoppix@Knoppix:~$ ls -l /etc/rc.local
    -rwxr-xr-x 1 root root 358 Aug 18 23:08 /etc/rc.local
    For your first question, the 3 x show above mean you already have the execute bits on. This script should run at boot time.

    Quote Originally Posted by sbininit
    knoppix@Knoppix:~$ cat /etc/rc.local
    #!/bin/sh
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    sudo insmod /lib/modules/2.6.24.4/wireless/rt2870sta.ko
    exit 0
    knoppix@Knoppix:~$
    So you added one line before the 'exit 0' line. I don't think it requires sudo, but it should run OK.

    I believe at this point, after the boot up of the system, the rt2870sta.ko will be loaded into the system.

    Please confirm it by enter the following command:

    Code:
    $ sudo ls -l /lib/modules/2.6.24..4/wireless
    You should be able to see the rt2870sta.ko is there.

    Quote Originally Posted by sbininit
    I did get it to load the module at boot up by canging the name of the /bin/sh -e to /bin/sh
    Don't know what you mean here. Can you give more detail information like what you have done?

    Quote Originally Posted by sbininit
    That did not solve completely the problem. the light comes on my usb wireless adapter but I cant see the device with iwconfig or ifconfig until I unplug it, replug it and then bring it up with ifconfig ra0 up.
    Can you do the iwconfig and ifconfig between each step you take and post the result here.

    1. after the reboot
    2. after the unplug of the USB device
    3. after the plug in of the USB device
    4. after you execute the ifconfig ra0 up command

    Rgds,
    Chip
    [/code]

  4. #4
    Member registered user
    Join Date
    Jul 2009
    Posts
    38
    the results of sudo ls -l /lib/modules/2.6.24..4/wireles or as follows-


    root@Knoppix:/home/knoppix# sudo ls -l /lib/modules/2.6.24.4/wireless
    total 591
    -rw-r--r-- 1 root root 600508 Aug 15 23:20 rt2870sta.ko



    I'll get back with you on the iwconfig and ifconfig results. It takes me about twenty minutes to get back on line after rebooting.

  5. #5
    Member registered user
    Join Date
    Jul 2009
    Posts
    38
    Here are the results of iwconfig and ifconfig after reboot, unplugged, replugged and ifconfig ra0 up-



    1.after reboot with WUSB600N plugged in-

    knoppix@Knoppix:~$ ifconfig
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:2 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:100 (100.0 B) TX bytes:100 (100.0 B)


    knoppix@Knoppix:~$ iwconfig
    lo no wireless extensions.

    eth0 no wireless extensions.



    2. unplugged-

    knoppix@Knoppix:~$ ifconfig
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:2 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:100 (100.0 B) TX bytes:100 (100.0 B)


    knoppix@Knoppix:~$ iwconfig
    lo no wireless extensions.

    eth0 no wireless extensions.



    3. replugged-
    knoppix@Knoppix:~$ ifconfig
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:2 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:100 (100.0 B) TX bytes:100 (100.0 B)

    knoppix@Knoppix:~$ iwconfig
    lo no wireless extensions.

    eth0 no wireless extensions.

    ra0 RT2870 Wireless ESSID:"" Nickname:""
    Mode:Auto Frequency=2.412 GHz
    Link Quality=10/100 Signal level:0 dBm Noise level:-143 dBm
    Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retries:0 Invalid misc:0 Missed beacon:0



    4. ifconfig ra0 up-


    root@Knoppix:/home/knoppix# ifconfig
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:2 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:100 (100.0 B) TX bytes:100 (100.0 B)

    ra0 Link encap:Ethernet HWaddr 00:1e:e5:e7:aa:38
    inet6 addr: fe80::21e:e5ff:fee7:aa38/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:69 errors:0 dropped:0 overruns:0 frame:0
    TX packets:221 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:5947 (5.8 KiB) TX bytes:19112 (18.6 KiB)



    root@Knoppix:/home/knoppix# iwconfig
    lo no wireless extensions.

    eth0 no wireless extensions.

    ra0 RT2870 Wireless ESSID:"myrouterxxxxx" Nickname:"RT2870STA"
    Mode:Auto Frequency=2.462 GHz Access Point: Not-Associated
    Bit Rate:1 Mb/s
    RTS thrff Fragment thrff
    Encryption keyff
    Link Quality=10/100 Signal level:0 dBm Noise level:-87 dBm
    Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retries:0 Invalid misc:0 Missed beacon:0

  6. #6
    Senior Member registered user
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    204
    Quote Originally Posted by sbininit
    root@Knoppix:/home/knoppix# iwconfig
    lo no wireless extensions.

    eth0 no wireless extensions.

    ra0 RT2870 Wireless ESSID:"myrouterxxxxx" Nickname:"RT2870STA"
    Mode:Auto Frequency=2.462 GHz Access Point: Not-Associated
    Bit Rate:1 Mb/s
    RTS thrff Fragment thrff
    Encryption keyff
    Link Quality=10/100 Signal level:0 dBm Noise level:-87 dBm
    Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retries:0 Invalid misc:0 Missed beacon:0
    Questions:

    1. Is the ESSID = "myrouterxxxxx" the correct ESSID name?
    2. Are you able to do the pump command to get an IP address from your router?
    Code:
    # pump  -i  ra0
    Note: your wireless router should be setup with dhcp = on or else it will not be able to response back with the IP address request.
    If you can pass the pump command, then you should be able to connect to your LAN via the wireless adapter.
    You can double check with the ifconfig command
    Code:
    $ ifconfig  ra0
    It should return you the ra0 configuration data with an IP address.
    I believe you can do it according to your first post. Now I want you to do the following steps:
    1. Reboot the knoppix
    2. After the knoppix boot up, open a konsole and su to root
    Code:
    $  su
    #
    3. Reset the USB port with the following commands
    Code:
    # modprobe  -r  uhci-hcd
    # modprobe  uhci-hcd
    4. Now perform a iwconfig, you should see the ra0 appears
    5. Setup the essid with iwconfig
    Code:
    # iwconfig  ra0  essid myrouterxxxxx
    change the "myrouterxxxxx" to whatever it is on your wireless router if it is not the same.
    6. Start your wireless device using ifconfig
    Code:
    # ifconfig  ra0  up
    7. Obtain the IP address from the router
    Code:
    # pump  -i  ra0
    8. Try to see if you can connect to the internet or other machines in your local area network. If the answer is yes. Move on to the next step.
    9. Edit your rc.local file and right before the exit 0 statement, insert the commands on step 3. Save the file and then reboot knoppix.
    10. Now su to root, and then continue from step 4 to step 7.
    11. If it works, edit the rc.local file again, this time put all commands there, step 5, 6, 7 and your rc.local should look like this
    Code:
    sudo insmod /lib/modules/2.6.24.4/wireless/rt2870sta.ko
    modprobe  -r  uhci-hcd
    modprobe  uhci-hcd
    iwconfig  ra0  essid myrouterxxxxx
    ifconfig  ra0  up
    pump  -i  ra0
    exit 0
    Let us know if it works.

    Rgds,
    Chip

  7. #7
    Member registered user
    Join Date
    Jul 2009
    Posts
    38
    I can't seem to reset the usb port with that modoprobe command and there doesn't seem to be a module loaded that
    resembles the one you suggested.


    root@Knoppix:/home/knoppix# modprobe -r uhci-hcd
    FATAL: Module uhci_hcd not found.


    and pump -i ra0


    always returns with-


    root@Knoppix:/home/knoppix# pump -i ra0
    Operation failed.



    After rebooting I have to get back on line by...

    1. manually installing WUSB600N driver rt2870sta.ko

    # insmod /lib/modules/2.6.24.4/wireless/rt2870sta.ko which I have a script in /bin for titled loadra0

    2.run knoppix network wlan configuration with ra0 still down, set mode to auto set essid to bogusnamerouterxxxx, set IP
    to auto and let it run. If DHCP answers with IP,broadcast,gateway, adresses etc,...it will load by...

    3.# ifconfig confirms that ra0 is up


    4.run the knoppix network wlan configuration tool once more now that ra0 is up and voila I'm back here posting.



    I would lik to add that it doesnt seem to work the same every time. /etc/rc.local was loading the usb driver at boot
    time after I changed the name of the script from /bin/sh -e to /bin/sh. The last five or six times it has not and I have
    to manually load it.

    Its easy enough but I would like to be able to do it all by command if possible.

  8. #8
    Senior Member registered user
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    204
    Quote Originally Posted by sbininit
    I can't seem to reset the usb port with that modoprobe command and there doesn't seem to be a module loaded that
    resembles the one you suggested.


    root@Knoppix:/home/knoppix# modprobe -r uhci-hcd
    FATAL: Module uhci_hcd not found.


    and pump -i ra0


    always returns with-


    root@Knoppix:/home/knoppix# pump -i ra0
    Operation failed.
    Sounds like we are using difference version of Knoppix. I am still using Knoppix 5.1.1. Kernel version is 2.6.19.

    From the info your provided, you must be using 5.3.1 or above.

    I downloaded knoppix 5.3.1, which has the same kernel number as yours, and did a test on it, it did not work. Don't even has the uhci-hcd USB module for me to do a reset.

    For the pump command, I got the same problem as you under knoppix 5.3.1

    Quote Originally Posted by sbininit
    After rebooting I have to get back on line by...

    1. manually installing WUSB600N driver rt2870sta.ko

    # insmod /lib/modules/2.6.24.4/wireless/rt2870sta.ko which I have a script in /bin for titled loadra0

    2.run knoppix network wlan configuration with ra0 still down, set mode to auto set essid to bogusnamerouterxxxx, set IP
    to auto and let it run. If DHCP answers with IP,broadcast,gateway, adresses etc,...it will load by...

    3.# ifconfig confirms that ra0 is up


    4.run the knoppix network wlan configuration tool once more now that ra0 is up and voila I'm back here posting.



    I would lik to add that it doesnt seem to work the same every time. /etc/rc.local was loading the usb driver at boot
    time after I changed the name of the script from /bin/sh -e to /bin/sh. The last five or six times it has not and I have
    to manually load it.

    Its easy enough but I would like to be able to do it all by command if possible.
    Yes, I understand what you mean. That's why I still try to use command line commands when possible. Just wonder if those gui programs (i.e. network wlan config tool) can be run in silent mode (or in batch mode)

    If you cannot find a way to run all those commands in command mode to activate the wlan, you cannot automate it.

    Rgds,
    Chip

  9. #9
    Member registered user
    Join Date
    Jul 2009
    Posts
    38
    I was wondering if there is a way to view the commands that the knoppix network utility uses? The answer has to be somewhere in there. Where would one find the script it uses?

    Sorry I failed to mention I was using knoppix 5.3.1. I kind of figured network connecting would all work about the same on any knoppix.

  10. #10
    Senior Member registered user
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    204
    Quote Originally Posted by sbininit
    I was wondering if there is a way to view the commands that the knoppix network utility uses? The answer has to be somewhere in there. Where would one find the script it uses?

    Sorry I failed to mention I was using knoppix 5.3.1. I kind of figured network connecting would all work about the same on any knoppix.
    Well, if you really interested in it. You can go to the following two directories which hold all the programs you can run from the k-menu and the knoppix menu.

    Code:
    /usr/share/applications
    /usr/share/applications/kde
    I take a look at the file kwlan.desktop under /usr/share/applications, I believe it is the Kwlan wireless LAN manager on the K-Menu

    Code:
    # cat /usr/share/applications/kwlan.desktop | head
    
    [Desktop Entry]
    Encoding=UTF-8
    Name=Kwlan
    Exec=kwlan %i %m -caption "%c"
    Icon=kwlan
    Type=Application
    DocPath=kwlan/kwlan.html
    Comment=KDE network manager
    Comment[da]=KDE's netværkshåndtering
    Comment[el]=ÎιαÏειÏιÏÏÎ®Ï Î´Î¹ÎºÏÏÎ¿Ï ÏÎ¿Ï KDE
    On the 4th line, the command after Exec= is the actual command it runs.

    From the /KNOPPIX/usr/bin directory, you can find the kwlan program in binary format.

    The problem of the GUI program is that, even you kick it off from command line and it MIGHT end up go back to the interactive GUI interface mode and ask you to provide input. Obviously you cannot put it into your automation script.

    It's up to the developer's preference to provide a batch silent mode (i.e. you enter all required parameters up front or allow you to enter all input from a configuration file) or not.

    Rgds,
    Chip

Page 1 of 2 12 LastLast

Similar Threads

  1. Wifi From Command Line
    By borgward in forum Networking
    Replies: 2
    Last Post: 08-18-2009, 11:30 AM
  2. DOS Command Line?
    By Mongoose in forum MS Windows & New to Linux
    Replies: 2
    Last Post: 06-07-2006, 12:23 AM
  3. booting into the command line
    By greygooseplz in forum General Support
    Replies: 1
    Last Post: 11-25-2004, 05:58 AM
  4. login with GUI/Command Line
    By wilsondk in forum General Support
    Replies: 2
    Last Post: 02-18-2004, 10:04 PM
  5. Hostname on command line
    By Ambrose in forum General Support
    Replies: 1
    Last Post: 08-08-2003, 02:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


** Intel i3 10100F CPU Processor - USED  ** picture

** Intel i3 10100F CPU Processor - USED **

$47.99



Intel - Core i9-14900K 14th Gen 24-Core 32-Thread - 4.4GHz (6.0GHz Turbo) Soc... picture

Intel - Core i9-14900K 14th Gen 24-Core 32-Thread - 4.4GHz (6.0GHz Turbo) Soc...

$546.99



Intel - Core i7-14700K 14th Gen 20-Core 28-Thread - 4.3GHz (5.6GHz Turbo) Soc... picture

Intel - Core i7-14700K 14th Gen 20-Core 28-Thread - 4.3GHz (5.6GHz Turbo) Soc...

$381.99



Intel Core i7-14700K Processor (5.5 GHz, 20 Cores, LGA 1700) BX8071514700K, OEM picture

Intel Core i7-14700K Processor (5.5 GHz, 20 Cores, LGA 1700) BX8071514700K, OEM

$339.99



Intel i5-3470 3.2Ghz Quad-Core SR0T8 Socket LGA-1155 CPU  picture

Intel i5-3470 3.2Ghz Quad-Core SR0T8 Socket LGA-1155 CPU

$9.00



Intel Core i5-12400F - 6-Core 2.5GHz 12th Gen Alder Lake LGA 1700 65W CPU picture

Intel Core i5-12400F - 6-Core 2.5GHz 12th Gen Alder Lake LGA 1700 65W CPU

$118.84



AMD Ryzen 5 7600x Processor (5.3 GHz, 6 Cores, LGA 1718/Socket AM5) NEW OEM Tray picture

AMD Ryzen 5 7600x Processor (5.3 GHz, 6 Cores, LGA 1718/Socket AM5) NEW OEM Tray

$169.98



AMD Ryzen 5 5600G 6-Core 12-Thread Desktop Processor with Radeon Graphics picture

AMD Ryzen 5 5600G 6-Core 12-Thread Desktop Processor with Radeon Graphics

$99.99



AMD Ryzen 9 5900X Processor 4th Gen UNLOCKED (AM4 12 Cores 24 Threads 4.8GHz) picture

AMD Ryzen 9 5900X Processor 4th Gen UNLOCKED (AM4 12 Cores 24 Threads 4.8GHz)

$229.00



Intel Core i7-13700KF - 13th Gen Raptor Lake 16-Core (8P+8E) Desktop CPU Proc... picture

Intel Core i7-13700KF - 13th Gen Raptor Lake 16-Core (8P+8E) Desktop CPU Proc...

$289.99