Router with integrated Raspberry Pi.


46 posts   Page 1 of 2   1, 2
by Lob0426 » Wed Aug 10, 2011 2:39 am
The starting point will be Linksys WRT54GS ver. 7.2. 10/100 Mb with wireless a/b/g
A Model B Raspberry Pi will be integrated through Ethernet port #4. The Raspi will be inside the WRT54 case. There will be a an external (USB) 320Gb HDD for storage.

I plan on using Ubuntu in conjunction with Apache web Server for software. I have a web camera that may wind up in this build.

We will see where it goes from there. The Linksys WRT54GS is currently stock with stock firmware. It is rather limited in what can be accomplished with DD-WRT as it only has 2 MB of ROM with 16MB RAM. This only allows a micro build of DD-WRT. All needed connectors will have to be brought out to connectors in the side of the WRT case. I have a 12v 2 amp brick that will have plenty of power for it all. The HDD may have to slung under the WRT case. Because of the reduced internal volume I plan on adding a cooling fan into the case.

I plan on a headed installation, but this system will be ran headless thereafter.

Please comment on this project!
I will be posting pictures when the Raspi becomes available to start.
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by Lob0426 » Thu Aug 11, 2011 5:35 pm
It appears I will have to solder a CAT5 pigtail underneath the linksys board. Of course I could just make a very short cable and bring it out the bottom and up to port#4. I do no not want to do any soldering to the RasPi at all. I found breakout cables from a HP that has 2 USB a composite and a 3.5 mm earphone jack that can be installed into the linksys case. I will be taking the power for the RasPi internally from the linksys board and carrying in to the RasPi with a barrel (coax) connector from radio shack. I will also be powering a 40mm x 10mm fan from internal power. For the HDMI I will be trying to place the board so exits the case directly. A modified (shortened) USB cable will exit the bottom of the case to connect the 320GB seagate drive. I am still trying to figure a way to get the HDD inside the case as well.

I would like to find a way to have more direct control of the router by the RasPi. Would this be possible through a serial interface?

Is Apache web server going to work on top of a stripped Ubuntu desktop?

An advantage to this setup is that it will can act as a wireless device. All you need is power. I have a logitech quick cam that could easily be added into the mix later. May also have investigate adding a powered hub but the 12v2amp power I have will probably not have enough juice to run all of that.
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by Gert van Loo » Thu Aug 11, 2011 5:41 pm
I would like to find a way to have more direct control of the router by the RasPi. Would this be possible through a serial interface?

Yes, we have a serial port. As you are talking short distance you do not need RS323 conversion chips. 1-to-1 should work. You can also use SPI or I2C we have both masters and slaves.
User avatar
Moderator
Moderator
Posts: 1839
Joined: Tue Aug 02, 2011 7:27 am
by eggn1n3 » Thu Aug 11, 2011 5:43 pm
I do not understand exactly why you use the WRT54GS and Raspberry Pi in one case? What's the purpose of the Raspberry Pi then? The WRT54GS for the wireless/router part, the Raspberry Pi for the HDMI output?

Has anyone a clue how the Raspberry Pi would perform when it acts as a router? Using model B and an extra USB to Ethernet adapter so you can route traffic between them? Would 70Mb/s be feasible?
Posts: 106
Joined: Fri Jul 29, 2011 10:36 am
by abishur » Thu Aug 11, 2011 5:53 pm
While the answer is it ultimately depends on how much you're running on it, how efficient the built-in ethernet port is (how efficient the USB one is), so forth and etc. In terms of raw numbers then yes, the USB 2.0 standard should be more than able to handle the 70 Megabits per second.

I actually plan on using one r-pi for exactly this purpose! I'm still debating about hooking it up into a true router or just a regular switch past that point.
Dear forum: Play nice ;-)
User avatar
Moderator
Moderator
Posts: 4221
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by eggn1n3 » Thu Aug 11, 2011 5:57 pm
Yeah, but I am not sure if the internal bus of this Broadcom media processor (SoC) could handle the traffic. Maybe Eben knows?
Posts: 106
Joined: Fri Jul 29, 2011 10:36 am
by Lob0426 » Thu Aug 11, 2011 7:29 pm
In this I am using the RasPi as a web server and NAS I do not intend for it to be a firewall or as the router itself. It would be nice to be able to change router settings without accessing the routers web interface seperately. It will be able to stand alone as a web camera with its own storage and use the wireless to contact my existing network. I also would like to explore it as a web servers outside my network in between the ADSL modem and my WRT 310N router nothing like have multiple firewalls to keep the ID10T's at bay. The Linksys WRT54GS will not be a huge loss if I damage it. The reason I want to fit everything inside is portability. Unplug it and move it to where it is needed next. No juggling a bunch of peripherals, just pick up and go!
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by liz » Thu Aug 11, 2011 7:43 pm
My sense is that you'd have no problem at all handling the sort of traffic you'd get with a household router through the SoC, but I don't think I'd like to rely on it for an enterprise router. (And frankly, nothing could be shonkier than the ancient DLink box I'm using at the moment!)
User avatar
Foundation
Foundation
Posts: 3898
Joined: Thu Jul 28, 2011 7:22 pm
by Lob0426 » Thu Aug 11, 2011 7:53 pm
Hey a "throw down" Linksys always comes in handy. I am not sure of how many I have given away. You can have this one when somebody comes out with an 8 port gigabit wireless router (that isn't $964). I found a 10/100 port wireless from Dlink I think but no gigabit!
eggn1n3: As to why stuff it all in there? my version of case modding. Small is beautiful baby!
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by eggn1n3 » Thu Aug 11, 2011 8:32 pm
Cannot wait to see it ;-)
Posts: 106
Joined: Fri Jul 29, 2011 10:36 am
by Lob0426 » Fri Aug 12, 2011 4:31 am
My brother just reminded me of another plus to this set up. With the right settings I can pick up wireless also. So I can hook into the WAN port to get internet from say a hotel wire or wireless hotel internet. Another words the RasPi becomes wired and wireless ethernet. Not just a stand alone web server/device. I knew he was usefull for something! and hotel Tv's usually have at least composite video. This could really be fun.
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by Lob0426 » Fri Aug 12, 2011 12:21 pm
looking at 1.8" HDD's like this:
http://www.amazon.com/Samsung-.....B0052Y8ROK

Found this micro SATA drive cable:
http://cgi.ebay.com/Micro-SATA.....968wt_1120

The cable will have to shortened.
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by Lob0426 » Fri Aug 12, 2011 10:05 pm
It appears that the best way to mount it will be to invert the board. The video connectors will come out the front of the router. To access the SD Card you will have to open the router. The power connector will be against the right side of the case so it will have to be set left a little for clearance. I am hoping to run the USB and the sound connectors out the right side of the case as you look at the front. Alll of this would have been easier with the original design I saw. Nothing on the sides just each end. still hoping to mount the HDD above the linksys board on the left inside the case, But have to be carefull of blocking the vents as the linksys board does produce some heat. the board will actually be mounted to the front face.
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by Lob0426 » Wed Aug 17, 2011 12:03 am
Here are some pictures of the equipment I have started gathering
http://www.raspberrypi.org/wp-content/uploads/2011/08/r60i9-start.jpg
This is an overview. A 12 volt 2 amp power adaptor, A WRT54GS ver7.2 router, Blue CAT 5E and a USB 2 port pigtail to bring the USB to the outside. Currently the plan is to mount the RasPi bottom up and put the video connectors out the front. The USB's and the SD card slot will be towards the back. The power input will be towards the center. The audio and Ethernet will be towards the right side. still trying to figure out how to get the 2.5" 320GB in there someplace.

http://www.raspberrypi.org/wp-content/uploads/2011/08/c1s20-power.jpg
12 volt 2 amp power

http://www.raspberrypi.org/wp-content/uploads/2011/08/pfw15-position.jpg
This is approximately where the RasPi will be placed inside
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by Lob0426 » Wed Aug 17, 2011 12:08 am
Here are some inside veiws.
http://www.raspberrypi.org/wp-content/uploads/2011/08/vds38-top.jpg
The front of the router open.

http://www.raspberrypi.org/wp-content/uploads/2011/08/hhp5c-board-open.jpg
Case completely opened. The antennas are part of the rear/bottom case.

http://www.raspberrypi.org/wp-content/uploads/2011/08/4bk78-board-bottom.jpg
This is the bottom of the board. In the upper right you can see the four square solder pads. That is where the older antenna attached. To the left of that is three pads. These are the power pads I will solder in here to carry power to the RasPi through a pigtail with barrel connector. Just left and slightly lower is the Ethernet port #4 solder pads. I will have to figure out the lines as I intend to Solder in an Ethernet pigtail to plug into the RasPi board.
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by Lob0426 » Sat Aug 20, 2011 8:36 pm
Soldered in a RJ45 pigtail and a 12v barrel connector today.

http://www.raspberrypi.org/wp-content/uploads/2011/08/9fsw8-RJ45-and-power-soldered-to-board.jpg
Soldering to those post sticking out of the board was not any fun! The trick was to tin the
wires and post. Only 4 wires are needed for 10/100. Orange/White to pin 1, Orange to
pin 2, White/Green to pin 3 and Green to pin 6. The row nearest the back is odd the row
farthest from the back of the cae is even.

http://www.raspberrypi.org/wp-content/uploads/2011/08/23tj4-soldered-board.jpg
The power leads were a lot easier! The strain releif was removed from the CAT5E
connector. the wires travel under the router board up to the front.

http://www.raspberrypi.org/wp-content/uploads/2011/08/3iqg1-IMG_0451.JPG
The open router is plugged into a Emachine netbook.
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by Lob0426 » Sat Aug 20, 2011 8:42 pm
The router is working just fine, as you can see here!

http://www.raspberrypi.org/wp-content/uploads/2011/08/800jw-connection-works.jpg
Now I need to figure out where to put the dual USB jacks through the case. Put female ends on the wires to the USB . Put the 3.5mm audio jack through the case and build the adaptor for it. Little steps forward to complete the project.

OH! and have a RasPi to put in it.
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by Lob0426 » Sat Aug 27, 2011 7:35 pm
Well today I reflashed the WRT54GS to DD-WRT. This router only has 2 MB flash so you can only use a micro generic build on it. The flashing was successfull. I then setup client mode. This allows it to act as wireless access for the (future) RasPi. I used my Emachines netbook to accomplish the reflash and the client setup. I am able to connect to the internet using the modified Router (WRT54GS) in client mode which then connects wireless to my WRT310N.

So when the RasPi gets here it will be wireless as soon as I plug it in. With the RasPi inside I will have (1) WAN port, (3) 10/100 ports and (2) USB ports. a whole lot of connections for such a small computer/router.

I have not decided if I am going to hardwire the USB HDD to a USB A male connector yet. What do all of you think about doing that?
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by liz » Sat Aug 27, 2011 7:45 pm
Eben's not logged in at the moment, but leans over my shoulder to say that he thinks hardwiring the two together would make good sense. :)
User avatar
Foundation
Foundation
Posts: 3898
Joined: Thu Jul 28, 2011 7:22 pm
by Lob0426 » Sat Aug 27, 2011 10:00 pm
Booted the netbook into Lubuntu and the wireless client mode works just fine. No problem getting to the internet.
Experimented a bit with it. I was able to connect to the internet wired but had to turn off client mode and plug into the WAN port. DD-WRT has a setting to turn the WAN port into a standart port when in client mode. So you could have 4 ethernet ports. The RasPi will have port #4. If the RasPi were turned off you would still have 4+1 as a simple router. I placed a connector in the port to block it when in use by the internal CAT5E.
Looking at 1.8" HDD options. Probably 120GB or 160GB micro SATA. They get rediculous in price after that.

With a RasPi inside you have some other connection options for peripherals, like this.
http://www.addonics.com/produc.....25hdu2.asp
You should be able to connect to this easily as a network drive. It also has an FTP of its own. Also has a USB printer port. That will save a USB from RasPi. It will not work as a boot drive but that is not needed in a Raspi. The one downside is it can not be used as a swap file either if you need one. If you just need disk storage for say a camera it should work fine.
I will have to look at bootloader option for this setup. I would like to be able to run it as a web server and as a standalone web device like a web camera. It would also be nice to use it as a standalone programming tool or portable desktop.

looking at where to mount the external USB port. 1 USB will be taken up by the HDD. I will probably use a wireless keyboard/mouse combo as I have a couple of them sitting around. When used as a web camera/web server I will use RDP.
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by amiga65 » Sun Aug 28, 2011 12:42 am
Great start, I've been watching this thread and wish You all the luck on it's progress, and yes I will have to copy Your idea. :)
Posts: 70
Joined: Wed Jul 27, 2011 10:59 pm
by Lob0426 » Sun Aug 28, 2011 5:43 pm
OK time for a little of the theoretical here. If you could replace the routers FLASH with DRAM, my theory is that you could use the RasPi to write to DRAM each time the router boots. You could then boot it with an image of client mode or a Site Survey mode. You would also be able to program your own settings into the router. So would you set the firmware to to boot from the RasPi? or just create an interface to directly write to the routers memory?
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by Lob0426 » Tue Aug 30, 2011 11:08 pm
picture
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by Lob0426 » Tue Aug 30, 2011 11:17 pm
erased post
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by Lob0426 » Tue Aug 30, 2011 11:22 pm
erased post.
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.