Author Topic: Axon Driver on a (dd wrt) router (SOLVED)  (Read 3162 times)

0 Members and 1 Guest are viewing this topic.

Offline Rent2OwnTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Axon Driver on a (dd wrt) router (SOLVED)
« on: December 04, 2011, 03:08:36 PM »
The following link downloads a folder full of drivers to be installed on a router with dd wrt (linux) software.
http://www.dd-wrt.com/phpBB2/download.php?id=8816

There are drivers for USB, FTDI, scanner, printer,  etc inside.  (Link is taken from a project interfacing an Arduino with a router via USB).

Would any of these drivers support the Axon as well?  Or could anyone point me in the right direction to finding an appropriate one (if it exists).

----For project background info----
http://www.societyofrobots.com/robotforum/index.php?topic=14782.0
« Last Edit: December 12, 2011, 12:52:07 AM by Rent2Own »

Offline Gertlex

  • Supreme Robot
  • *****
  • Posts: 763
  • Helpful? 24
  • Nuclear Engineer · Roboticist
    • Index of Oddities
Re: Axon & Arduino Driver on a (linux) router
« Reply #1 on: December 04, 2011, 05:32:39 PM »
There are two ways. You either do a USB-Serial adapter connected to a level shifter and then to the Axon's UART, or you can use the usb ftdi driver, probably, to communicate with the Axon via its mini USB port.

I've never really worked with drivers on Linux, though... so I have no idea what the equivalent to Windows "finding new hardware" notification is.
I

Offline Rent2OwnTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Axon & Arduino Driver on a (linux) router
« Reply #2 on: December 05, 2011, 01:18:51 PM »
For the USB-Serial adapter, I'd have to use a serial port on the router?  I have a USB port on the router thats easier to get to, but there is a serial port (that I had to solder in) on the PCB inside the unit's casing.

Also, does the above situation not require a driver?
Thanks for the advice

« Last Edit: December 05, 2011, 10:47:01 PM by Rent2Own »

Offline Rent2OwnTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Axon Driver on a (linux,hacked) router
« Reply #3 on: December 05, 2011, 10:48:00 PM »

I've just learned of the host/slave relationship of USB.  So neither the Axon nor the router would qualify as a host.  What can I do to solve this?  Would installing the appropriate driver on the router solve this problem? (e.g. turn the router into a host?)

Offline Gertlex

  • Supreme Robot
  • *****
  • Posts: 763
  • Helpful? 24
  • Nuclear Engineer · Roboticist
    • Index of Oddities
Re: Axon Driver on a (linux,hacked) router
« Reply #4 on: December 06, 2011, 12:50:37 AM »
If you have a hardware serial port, you should be able to send serial communications from computer to router, and then have the router send the signals back to your computer wirelessly without any drivers being needed.  If that works, then all you need is a TTL level shifter (essentially something like this, I have a different one, but don't remember where I got it from)
I

Offline Rent2OwnTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Axon Driver on a (linux,hacked) router
« Reply #5 on: December 06, 2011, 09:21:19 PM »
Hardware Setup

I have both an FTDI USB/Serial (ttl 3.3v) cable from my laptop to the hardware serial port on my router & an ethernet cable to the router (for internet).  Also, I have the Axon connected by its miniUSB to the router's USB.  *(both cables' drivers are installed on laptop and have been tested to work before connecting with router)

The router is setup in "Client Bridge" mode and I'm using it as a wireless network adapter to connect to my primary (factory default) router, which is my internet connection.  (laptop <ethernet> client bridged router <wireless> gateway/internet router)
-------Communication Problem------
I have zTerm running on my macbook.  It's connected (via FTDI serial/usb) to the router's serial port, & I was able to SSH into the router (works fine).  zTerm's baud rate is 115,200, which is what the Axon needs so that's ok.

The axon has a rprintf loop saying "working" over and over (tested early).

1)  What can I do with this configuration to see the Axon's rprintf over zTerm?
-It's important for the overall project that the Axon communicates through the router, giving it wireless capability.

Thanks
« Last Edit: December 06, 2011, 09:23:26 PM by Rent2Own »

Offline Gertlex

  • Supreme Robot
  • *****
  • Posts: 763
  • Helpful? 24
  • Nuclear Engineer · Roboticist
    • Index of Oddities
Re: Axon Driver on a (linux,hacked) router
« Reply #6 on: December 06, 2011, 09:57:49 PM »
What I would test is to see if you can see stuff sent from your computer to the hardware serial port on the router.  E.g. when ssh'd into the router, somehow you should be able to see what's coming from the router's serial port.

Does Linux use the term COM port? (I don't know...)  Can you find out what COM ports the router thinks it has?

Basically my test steps would be:
1. Using computer hooked up to router's serial port, figure out how to see stuff coming into the router's serial port when ssh'd in.
2. With whatever hardware might be needed for shifting logic (it's magic to me because I'm lazy) should then allow you to hook Axon UART to Router Serial port, and see "working" when ssh'd to the router.
I

Offline Rent2OwnTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Axon Driver on a (linux,hacked) router
« Reply #7 on: December 07, 2011, 10:58:37 PM »
I'm reading up on this now & trying to apply it with the "echo" linux command to my situation.
http://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/preparation-setport.html

Now here's a link to a similar problem someone was having.  I think between the two of these pages, I might have an answer.  I'm reading them and trying to figure it out.  I'll post with something productive soon hopefully.
http://arduino.cc/forum/index.php?topic=63525.0
« Last Edit: December 08, 2011, 12:46:14 AM by Rent2Own »

Offline Rent2OwnTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Axon Driver on a (linux,hacked) router
« Reply #8 on: December 08, 2011, 06:10:01 PM »
I found some better info than my last post.  The links below seem like the answer in general, but I have some technical questions about how to do that stuff.  I'm googling on how to do it this evening.

1) Once I am SSHd into the router, how can I determine what port number the USB is?  Anyone happen to know the terminal command?

Once I know that I can use something like ser2net to "see" that port via terminal... even though it's a USB port and not serial. (I'd really like to use the USB port and not the serial if we can)
 
Here are some tech instructions I'm looking at but I'm stuck on the part about using a USB instead of serial:

http://www.andrewhazelden.com/blog/2010/01/how-to-use-the-serial-ports-on-a-linksys-wrt54gs-with-dd-wrt-v24/
https://sites.google.com/site/pinguinotutorial/wrt54gl

Offline Gertlex

  • Supreme Robot
  • *****
  • Posts: 763
  • Helpful? 24
  • Nuclear Engineer · Roboticist
    • Index of Oddities
Re: Axon Driver on a (linux,hacked) router
« Reply #9 on: December 08, 2011, 06:18:08 PM »
I take it you have a USB to Serial adapter plugged into the router's usb.

In Windows, at least, the drivers for those adapters create a "fake" COM port, and that's what you use.  (It doesn't matter what USB port I plug a given USB to serial device into, it will always appear with the same COM #)

Assuming that Linux is the same, a quick look at one google result suggests you want to look in /dev/tty## and figure out if one of those is created by the USB2Serial driver thingy.
I

Offline Rent2OwnTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Axon Driver on a (linux,hacked) router
« Reply #10 on: December 08, 2011, 06:41:22 PM »
*I have the USB mini to USB (norm size) that came with my Axon connecting the Axon to the Router's USB.
*I have a serial port on the router I can/will use for debugging/seeing what's going on, but I want to connect the Axon via the USB for this project.

The problem is that I do know what it means to "look in /dev/tty##" and figure it out.  I know that with the linux version this router is running that it would be "/dev/tts/#" for a serial port.  But how does USB show up... /dev/usb/# ?
 

I SSH into the router.. then what do I type to "look in" there?
# cd /dev
# ls     
 
Would that show?  Or is it some kind of command to "show devices" that are plugged in? 

Offline Gertlex

  • Supreme Robot
  • *****
  • Posts: 763
  • Helpful? 24
  • Nuclear Engineer · Roboticist
    • Index of Oddities
Re: Axon Driver on a (linux,hacked) router
« Reply #11 on: December 08, 2011, 06:47:32 PM »
Based on my experience in windows, I'd expect the device to show up in /dev/tty/, not /dev/usb (no idea if /dev/usb even exists, also)

When I look on a machine that I don't have root access to, ls or ll in /dev shows me a list of tty files that I can't open. ll -a will show hidden stuff.
I

Offline rbtying

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: Axon Driver on a (linux,hacked) router
« Reply #12 on: December 08, 2011, 07:44:15 PM »
USB comm devices usually show up as either
Code: [Select]
/dev/ttyUSB*
or
Code: [Select]
/dev/ttyACM*
where * is a number starting at zero.

Offline Rent2OwnTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Axon Driver on a (linux,hacked) router
« Reply #13 on: December 09, 2011, 12:43:32 PM »
I have the drivers and program to put on the router to make this work now. The files are on my desktop.  I'm connected via ethernet to LAN1 of the router, and I'm SSHd in and within the correct directory.

I can't use the instructions on the project I'm following because he uses the wget command to grab files from his site. (I cant connect to the internet when working on router)

So I tried to replace wget with mv, and wound up with this..

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

(I typed mv and dragged the files off my desktop)

Then I put this script into both Admin/Commands of the router's web GUI and into terminal to run.

insmod /jffs/kmods/usbserial.o
insmod /jffs/kmods/ftdi_sio.o
insmod /jffs/kmods/acm.o

*I get "File not found."

1) My command and file location probably need a "destination" on the router?  I'm trying to figure that out..  something like
# mv /Users/Home/Desktop/file > router directory

« Last Edit: December 09, 2011, 12:46:34 PM by Rent2Own »

Offline Rent2OwnTopic starter

  • Jr. Member
  • **
  • Posts: 39
  • Helpful? 0
Re: Axon Driver on a (linux,hacked) router
« Reply #14 on: December 12, 2011, 12:49:58 AM »
Ok.  I figured out how to install the drivers and ser2net program that I needed.

Here's the thread with answers incase anyone winds up doing this in the future.

http://www.linuxquestions.org/questions/linux-newbie-8/moving-drivers-from-macosx-to-linux-ddwrt-router-using-terminal-ssh-918100/

 


Get Your Ad Here

data_list