Tuesday, December 20, 2016

Setting up TL-WPS510U Wireless Print Server

HP LaserJet 1020 plus working fine with TL-WPS510U wireless print server

We have an HP LaserJet 1020 plus which we wanted to share on our network. Since this is a printer which only has a USB port, it can be shared by connecting it to a windows computer and sharing the printer via homegroup. But this required us to keep the connected computer on all the time.

So I decided to try out the TP-Link Wireless Print Server TL-WPS510U. In India it costs around ₹5000 and so it makes sense for anyone to go for this device to retro fit your old printer into a a network capable one.

But there is a caveat. The supplied CD which allows you to configure the software won't work on any PC. The TL-WPS510U is configured to join an "Ad-Hoc" WiFi network named WLAN-PS. The supplied software on your CD, makes your PC join this Ad-Hoc network and then sends commands and credentials to the TL-WPS510U over this Ad-Hoc network and instructs it to join to your home/office's WiFi network (i.e. your WiFi Router which operates in infrastructure mode).

Now now all WiFi adapters support Ad-Hoc mode. So the software on the CD supplied with TL-WPS510U will not work on all computers. To check if the WiFi adapter on your PC supports Ad-Hoc mode, type the following command in the Command Prompt Window (Press the Windows Key + R and type cmd and press enter):

netsh wlan show drivers

I executed this command on two of the computers I have access to. Check the field "Hosted network supported". If it says "Yes" then your computer can host ad-hoc networks.
The Intel(R) Dual Band Wireless-AC 3165 does not support ad-hoc mode
 Intel(R) Dual Band Wireless-AC 3160 does support ad-hoc mode
Sometimes it might be possible to upgrade your WiFi Chipset drivers and have the ad-hoc capability enabled in the new drivers. But if that does not work for you, make sure you run the CD that came with TL-WPS510U only on a computer that supported hosted networks. Before you run the CD on a particular computer, will need to make sure that the computer has the target printers drivers pre-installed on it. To do that, connect the printer to your computer via USB to the computer and install the driver from the CD supplied with the printer. And once that is done, you can go ahead with setting up the print server for it.

Once you have configured the TL-WPS510U and gotten it connected to your network, you will need to go to each computer on the network and configure them to be able to use the printer. To do that, make sure you have the printer drivers installed on all the computers that you want should be able to print to the printer over network.

Now you can run the CD on each computer you wanted to connect to the printer. When you are doing so, make sure to select "Setup Wizard" instead of "Easy Setup". We use "Easy Setup" on on the first computer when we are trying to configure the TL-WPS510U to connect to our home/office WiFi. For all consecutive computers on which u want to use the printer, select the "Setup Wizard". Once the printer server has connected to the network, you no longer need the computers to support "Hosted network" to be able for it to print to the printer via the print server.
Select Setup Wizard on all consecutive computers

In case you want configure the computer to connect to a printer over the network via print server - without using the print server driver CD, go to "Devices and Printers" and click on "Add a printer". Click on "The printer that wasn't listed" and then from the following screen click on "Add a printer using TCP/IP address or hostname".

If you were using the CD, the support software would have automatically discovered the print server on your network. But while performing the steps manually, you will need to know the IP address of the print server. To do that, you can look up the list of devices and the IP addresses assigned to them from your WiFi router's admin console. It is recommended that you assign a static IP address to the print server during initial configuration (i.e. when you are running the CD to connect the print server to the network).

Once you go ahead with selecting "Add a printer using TCP/IP address or hostname", you will need to know the setting to use with the print server, here are the settings (Change the IP address to your own print server's IP address)

After this screen, it will ask you to select the make and model of the printer that is attached to the print server, make sure that you select the correct one.

Sunday, December 4, 2016

ESP8266 + DHT22 + Arduino + Web Server

So here is a modified version of how to get a DHT22 working on ESP8266 NodeMcu board using the Arduino IDE (not Lua)

The project is based on:

  1. Get the components and assemble them. In India you can find these on VishaWorld.com
    1. NodeMcu ESP8266 | Link
    2. DHT22 | 
    3. Male-Male Jumper Wires | 
    4. Bread Board | Link
    5. MicroUSB cable | 
  2. Assemble the circuit as shown. Connect the Data pin of SHT22 to D2 of NodeMcu (which is referred to pin 4 in Arduino IDE)
  3. Install the driver for USB-Serial chip on your PC:
  4. Install Arduino on your computer and install support for ESP8266 Board, refer:
  5. Install the DHT-sensor-library-master library as outlined here:
  6. You would need to download and place Adafruit_Sensor.h in this same library folder as well. Get that file from: https://github.com/adafruit/Adafruit_Sensor/blob/master/Adafruit_Sensor.h
    Click on "Raw" to get the file.
  7. Copy the code below, and download it into your ESP8266 NodeMcu board. Make sure to select the proper board and COM port.
To test:
  1. Connect your mobile to the WiFi hotspot created by ESP8266 : Temperature_Server
    Password is: vishaworld.com
  2. Make sure to turn off the 3G data connection on your phone. Andorid will report that the wifi network "Temperature_Server" does not provide internet access. Ignore the message.
  3. Open chrome and punch in in the URL field and ESP8266 will serve you with the latest reading from the temperature sensor.