Make a printer wireless using a router with USB running OpenWRT

Many recent printers have wifi capability built in for wireless printing. Older printers or even some recent printers do not have this feature, but one could purchase a wireless adapter to turn the printer wireless. The adapters aren’t cheap, and a search for a cheap adapter led me to configuring the TP-Link WR-703N with OpenWRT as an affordable alternative (plug printer into router with a usb cable and print to router via a usb print server).

First, flash the router to OpenWRT by logging into the router at tplinklogin.net using the username/password admin/admin; follow this guide for pictures in navigating the default Chinese interface. Once flashed, the router will have wifi disabled and the ethernet port could be used to log onto the LAN network. Log into the router using a web browser at the destination 192.168.1.1. Set up wifi and turn the ethernet port to WAN by following these instructions; I changed my default router IP address to 192.168.94.1 to avoid clashing with my default “home” network when I plug it into my home network for internet access. Plug the current router into another router with internet access via ethernet. Then ssh into the TP-Link router on its network: root@192.168.94.1. Install the usb printer:

opkg update
opkg install p910nd kmod-usb-printer

Start the print server:

/etc/init.d/p910nd start
/etc/init.d/p910nd enable

Now, on a laptop or computer, connect to the same wifi network as this mini router and add a printer at the router’s ip with port 9100 after plugging a printer into the usb port. Install the necessary printer driver on the laptop or computer.

This setup creates a separate network for usb wireless printing. If we want to have the printer join an existing wifi network, then just set up the router as the first post I referenced.

Amp and USB Chargers

This is a good article that explains how USB charging works. Basically, avoid cheap chargers. For any reasonably good charger, the amperage of the charger doesn’t really matter so long as it exceeds what the device requires; that is, use a charger with at least 0.5 Amp if the device requires 0.5 Amp (what the original charger uses). Thus, it’s OK to use my 2 Amp chargers on most of my mobile device so things charge faster!

USB NAS and print server

I assume you have a compatible router with usb ports with the Teddy Bear mod Tomato firmware installed.

These instructions show that the USB NAS portion is quite easy. Once the hard drives are connected, they are automatically mounted in the router’s Linux OS. A computer on the same network can connect to the router’s hostname/ip via the samba protocol or ftp (if enabled).

Printserver was less obvious since I wasn’t familiar with it. Tomato uses p910nd printer daemon. By default, only 1 instance is running on Tomato on port 9100. If you plan on connecting multiple printers (eg, adding through a USB hub), then you will need to run additional instances of p910nd in the startup script of the Tomato firmware:

 <pre class="src src-sh">/usr/sbin/p910nd -b -f /dev/usb/lp1 1

Continue to add 2, 3, …, if more printers are required. Reboot the router, and another instance is added to port 9101, etc. Note: the ordering is based on the proximity of the USB ports. Check the USB page on the router config site to determine the ordering.

To add a printer on a Windows machine, you will have to add it MANUALLY (auto-detect of any kind will not work). Following copied in case those links die:

HOW TO SET UP A PRINTER WITH TOMATO

  • I installed the printer the same exact way I do most USB print servers
  • GO TO ADD PRINTER
  • ADD A NETWORK PRINTER
  • SKIP AUTO DETECTION AND DO IT MANUALLY
  • ADD A PRINTER USING A TCP/IP ADDRESS…
  • DEVICE TYPE: TCP/IP DEVICE
  • HOSTNAME/IP: Your_Router_IP (ex: 192.168.1.1, mine is different), PORT NAME: let it auto-populate
  • UNCHECK the “Query the printer…”
  • Detection should fail…
  • On bottom, DEVICE TYPE click on CUSTOM, then SETTINGS
  • Leave all default ports and settings and click OKAY
  • Finish everything and print a test page.

On my Ubuntu, searching the printer on the router’s hostname/ip works. However, on all machines, you will have to select the type of printer manually.

softmod original xbox + xbmc

Now that I have a NAS set up as my file repository, I would like to access my media on the TV. I bought an original xbox (1) on craig’s list for $20, the xbox dvd remote on amazon for ~$6, an xbox usb connector on ebay for ~$2, and the original Mech Assault game at Game Stop for $2. I also needed a compatible usb drive, which I obtained by borrowing my sister’s Sandisk Cruzer 1gb flash drive.

Some easy things first. To get universal remote controls to work with the infrared (IR) dongle on the xbox, set the DVD player mode on the remote to RCA.

The goal is to get XBMC on it so I can stream media to it via my NAS (samba mount). Here is a quick outline. The directions I followed were these.

  1. Make sure the Dashboard version on the xbox is version 5960.
  2. Download the Action Replay software and Softmod Installer Deluxe or SID (including game saves, if not will have to get elsewhere) off bittorrent.
  3. Follow these steps to get the gamesaves and installer onto the compatible usb drive. This part took me the longest as I didn’t follow the directions fully (the usbview.exe, changing the driver, etc.). Once done, I can drag the gamesaves over. Also note that the USB drive is compatible if the xbox says it will erase it. Otherwise, it is not. All my USB drives were not compatible until I borrowed my sister’s.
  4. Plug in usb with game save to xbox along and copy the gamesaves to the hard drive. I couldn’t see copy, but look at link to find out how.
  5. Insert the Mech Assault game. In Campaign, load the Install Linux gamesave.
  6. Backup some stuff (MS Backup + Eeprom), then install softmod. Restart. Plug in ethernet (from router for my case).
  7. Turn off static ip, restart.
  8. FTP to the xbox (find out ip through xbox settings). Besides the drive folders, I couldn’t see any files. NOTE: On some xbox’s, I have trouble transferring files. In that case, I place XBMC and other apps in a dvd with BoXplorer, and transfer the files via SID, BoXplorer, or XBMC.
  9. Download T3CH XBMC. I downloaded the SVN build; be sure to read the README. Place the XBMC folder into a folder called APPS. Drag APPS over to E:\.
  10. To get the XBMC dashboard as default, followed these instructions. For EvoX dashboard (what we have), I needed to rename Team XBMC Shortcut.xbe to evoxdash.xbe and created a evoxdash.cfg with E:\AppsXBMCdefault.xbe inside. I placed these to files in C:, but it didn’t work. Rename E:\evoxdash.xbe to E:\evoxdash_org.xbe. Placed the two files in E:\ and things worked. Note that I messed this part up once, and I got a code 13 error. I had to insert the Mech Assault disc again and reinstalled the softmod. UPDATE: In the XBMC zip folder, there is a tools directory. Rename the xbe and cfg file in there to evoxdash.xbe and cfg and place them on the xbox’s E drive.

After adding a samba share, follow these instructions to get it to save the username and password.

In case anyone is interested, the xbox in my room is connected via ethernet (since my router is in the room). The xbox outside is connected to a router (wireless bridge). The xbox’s suffice my family for now since we don’t do HD content (yet) and the TV’s are old (RCA cables).