LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Moving drivers from MacOSX to linux (ddwrt) router using Terminal (SSH). (https://www.linuxquestions.org/questions/linux-newbie-8/moving-drivers-from-macosx-to-linux-ddwrt-router-using-terminal-ssh-918100/)

NRV85 12-10-2011 07:08 PM

Moving drivers from MacOSX to linux (ddwrt) router using Terminal (SSH).
 
Wireless Router: Asus WL-520gu
Firmware: DD-WRT v24-sp2 (08/12/10) mini-usb-ftp (SVN revision 14929)
Computer: Macbook Pro (OS X 10.6.8)
Connection: Mac <ethernet> Router
-------------------------------

In Terminal.app, I SSH into the router, put in my pass and I see the dd wrt welcome text, etc

# cd /jffs
# mkdir kmods
# cd kmods
# mv /Users/Home/Desktop/acm.o /jffs/kmods
# mv /Users/Home/Desktop/usbserial.o /jffs/kmods
# mv /Users/Home/Desktop/ftdi_sio.o /jffs/kmods

(The files are sitting on my desktop)

Then I put this script into both the "Commands" tab of the router's web GUI and into Terminal.app to be safe. In the router's GUI, I hit "Run Commands" in the GUI, then "Save Startup".

insmod /jffs/kmods/usbserial.o
insmod /jffs/kmods/ftdi_sio.o
insmod /jffs/kmods/acm.o
---------Question-------
1) I have no experience with using command lines, and I feel that my "move" commands are the problem. The project that I've been following used wget to retrieve files from a website, and since I cannot connect to the internet while doing this, I have been left on my own sort of.

Thanks in advance for any help.

MS3FGX 12-11-2011 12:42 AM

Are you trying to copy files from one machine to the other by using "mv"? Surely this is giving you a very clear error message about the file you want to move not existing. You can't do that any more than me putting that command into my computer would copy the file from your machine. You need to transfer the files to the DD-WRT machine over the network through one of the supported file transfer protocols.

Since you are logging in with SSH, you should have access to SCP. The following command would move the kernel modules from your machine to the destination router:

Code:

scp /Users/Home/Desktop/*.o root@ROUTER_IP:/jffs/kmods/

NRV85 12-11-2011 11:29 AM

It gave me no error message at all. It wasn't until I attempted to install ser2net that I got "File Not Found". But in the case of the drivers, I would execute the code and get no error messages. I knew it wasn't working when I tried to list the drivers and saw nothing new.

Thank you for posting the code. On another forum I was told using wget was wrong, but not given any answer or direction. This is how I wound up using mv.

I'll post back with the results.

NRV85 12-11-2011 01:22 PM

I SSHd into the router, put in my pass, and got the DD WRT welcome screen. Then I cd /jffs/kmods. After trying each of these codes:

# scp /Users/Home/Desktop/acm.o root@192.168.1.1:/jffs/kmods/
"No such file or directory"
# scp /Users/Home/Desktop/acm.o root@192.168.1.1:/jffs/kmods
"No such file or directory"

When I right click the file, acm.o, on my desktop and click "Get Information", the location is /Users/Home/Desktop.

1) Do I need something to go here/Users/Home/Desktop, like some kind of IP for my computer or something?

2) Do I need to go under Network Settings / Sharing and enable File Sharing and maybe Web Sharing? (Edit: I enabled File Sharing, Web Sharing, Remote Login, & Remote Management to no effect.)

3) My router is set to Client Mode, with SSH & Jffs enabled. I figured if I can SSH into the router, which I can, then the mode shouldn't matter?

MS3FGX 12-11-2011 11:41 PM

No, you are still having the same problem as before. You can't log into the router and then expect it to know how to get files from a completely different machine. There is no connection between the router and the desktop to make this possible, you are asking it to move files which is has no access to. It would be like if I asked you to reach into my pocket and get out my wallet from where you are sitting right now, it's impossible.

The SCP commands need to be run on the machine that has the files. SCP is "Secure Copy", you are copying the files from the local machine to the device at username@IPADDRESS. You have to give your computer the IP address of the router so it knows where to send the files to.

You don't need to change any settings on the computer, in fact, that is probably the last thing you want to do since you may end up inadvertently disabling something.

NRV85 12-11-2011 11:56 PM

I used all all the commands I typed above without actually SSHing into the router and it worked.


All times are GMT -5. The time now is 02:53 PM.