LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-10-2011, 07:08 PM   #1
NRV85
LQ Newbie
 
Registered: Dec 2011
Posts: 6

Rep: Reputation: Disabled
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.
 
Old 12-11-2011, 12:42 AM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
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/
 
1 members found this post helpful.
Old 12-11-2011, 11:29 AM   #3
NRV85
LQ Newbie
 
Registered: Dec 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-11-2011, 01:22 PM   #4
NRV85
LQ Newbie
 
Registered: Dec 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
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?

Last edited by NRV85; 12-11-2011 at 01:31 PM.
 
Old 12-11-2011, 11:41 PM   #5
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
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.

Last edited by MS3FGX; 12-11-2011 at 11:45 PM.
 
Old 12-11-2011, 11:56 PM   #6
NRV85
LQ Newbie
 
Registered: Dec 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
I used all all the commands I typed above without actually SSHing into the router and it worked.

Last edited by NRV85; 12-12-2011 at 12:39 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DDwrt/OpenVPN, vpn works on router, not for computers connected Nadine88 Linux - Newbie 0 08-11-2011 04:04 AM
MacOSX to RHEL5/6 ssh connection timeout landev Linux - Networking 6 04-06-2011 10:09 AM
suggestion: Moving to the SCSI (libata drivers) instead of traditional IDE drivers? kushalkoolwal Debian 1 05-15-2008 04:25 PM
Linux Router project - serial terminal antken Linux - General 1 03-28-2005 02:53 AM
Cisco Router Terminal on my Linux Machine ValidiusMaximus Linux - Networking 7 06-29-2004 10:40 PM


All times are GMT -5. The time now is 07:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration