Skip to main content

Posts

Showing posts from 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 net

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: http://randomnerdtutorials.com/esp8266-dht11dht22-temperature-and-humidity-web-server-with-arduino-ide/ Get the components and assemble them. In India you can find these on VishaWorld.com NodeMcu ESP8266 | Link DHT22 |  Male-Male Jumper Wires |  Bread Board | Link MicroUSB cable |  Assemble the circuit as shown. Connect the Data pin of SHT22 to D2 of NodeMcu (which is referred to pin 4 in Arduino IDE) Install the driver for USB-Serial chip on your PC: http://www.silabs.com/products/mcu/pages/usbtouartbridgevcpdrivers.aspx Install Arduino on your computer and install support for ESP8266 Board, refer: https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/installing-the-esp8266-arduino-addon Install the DHT-sensor-library-master library as outlined here: http://randomnerdtutorials.com/esp8266-dht11dht22-temperature-and

Mounting ARM Linux (OLinuXino/Raspberry Pi) SD card .img files on Desktop PC to access its rootfs

Linux distributions for embedded ARM board like Raspberry Pi or iMX233-OLinuXino-MAXI are available as prebuilt SD card images supplied as raw .img files. For example, .img files for ArchLinux are available for Raspberry Pi and OLinuXino . These files can be written to SD cards using the program dd on Linux or Win32 Disk Imager on Windows. These files contain the image of the SD card as a whole including multiple partitions - bootloader/bootlets, rootfs, swap etc. At some point of time we might find ourselves wanting to access the files from the rootfs contained within one of the partition of these image files. Accessing the kernel headers folder for cross-compiling kernel modules for these boards can be one such situation. And one does not necessarily need to write the image to an SD card and mount it back on ones desktop to achieve this. Major Hayden has straightforward instructions here  on how to mount .img files which contain multiple partitions. So when I found myse

Compiling Linux Kernel modules on OLinuXino (ArchLinux ARM)

So if you have an OLinuXino and have installed the development tools on the board and successfully compiled userspace programs on it (refer this blog post ), and are feeling adventurous, you can try compiling kernel modules as well. (Make sure you have gcc setup – refer to the blog post linked to above) So at the OLinuXino console (Serial or SSH) logged in as root: Install kernel headers: pacman -S linux-armv5-headers In your home directory, create the main.c source file: nano main.c and type the following and save the file: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include <linux/module.h> //Needed by all modules #include <linux/kernel.h> //Needed for KERN_INFO int init_module ( void ) { printk(KERN_INFO "Hello world\n" ); //A non 0 return means init_module failed; module can't be loaded. return 0 ; } void cleanup_module ( void ) { printk(KERN_INFO "Goodbye world\n" ); } MODULE_A

Interface USB Mouse to your Arduino using CH375B

CH375B module. It is usually supplied with a 2 way jumper mounted on TXD and RXD pin. The TXD RXD pins are located next to the female USB receptacle. Please unmount the jumper before use. Get the following components: Arduino Nano  Male to female jumper wires  - 4 pieces USB Mouse CH375B module Download MeUsb.cpp and MeUsb.h from  https://github.com/xeecos/Me-USB-Host On your Windows computer which already has arduino installed, go to your documents folder. There you will find a folder called arduino and within that another folder called libraries. Inside this libraries folder create a new folder called "MeUsb" Place MeUsb.cpp and MeUsb.h in this folder In the arduino\libraries folder, create another folder called "SoftwareSerial_fix" And in this folder download and place SoftwareSerial_fix.cpp and SoftwareSerial_fix.h from the same link as above. Assemble the circuit on the bread board as follows: +5V of Arduino Nano to +5V of CH375B GND of Ar

Automatically rebooting Vstarcam HD C7838WIP Wireless IP Camera

I have 6 IoT devices in my house. Most of them are DIY and I have documented their build processes on this blog. One of them is a commercial product. Weather Station (OpenWrt) blogpost Energy Meter (OpenWrt) blogpost Ambient Sensors (Particle Photon) blogpost ADS-B Receiver (PiAware on RPi2) instructions on piaware DIY Security Camera (motionEye/RPi) blogpost Commercial Security Camera (Vstarcam HD C7838WIP) Out of these, the ADS-B Receiver and the Vstarcam (both running linux) kept losing connection to the cloud regularly. I have a few theories behind why this might be happening: Both these devices lie in the fringe area (near door/windows) of my house far away from the home router which is placed in the center of the house. The WiFi signal from my neighbors might be causing interference and decrease in signal quality for these devices and the WiFi driver might be trying hard to maintain connection before giving up. I know this because I looked up the system logs of th

Automatically rebooting piaware and prevent outage (avoid "not feeding ADS-B to FlightAware" emails)

A few months ago, I setup a Raspberry Pi 2 at my house in Pune to monitor the ADS-B signals from aircrafts passing overhead. I referred the build process outlined here to build my own PiAware setup. The problem is that roughly twice a week, I used to get this mail saying that my feeder was no longer feeding data to flighaware. Barring a few rare instances when the trouble was due to internet outage, most of the time it required me to reboot the Raspberry Pi. Eventually I got tired, like a few other users here . Apparently it is due to WiFi dongle hanging or losing connection to the WiFi Router. To get around that, I wrote a script and set it up as scheduled task that runs every 5 minutes. The script checks if the RPi is able to ping Google's Public DNS servers, if yes, then it exits. If the ping fails, it waits for 10 seconds, tries again to ping again and if it fails this time, it issues a reboot command. In both cases, it loges results to a text file (saved on SD car

MT7688 Duo getting started

Now days I am putting together a basic kit for an IoT course that I am designing. The kit consists of items purchased from Visha World . This is what it looks like at the moment. All of the above components - except MT7688 Duo - can be purchased online from Visha World . For MT7688 Duo, you can visit seeed studio and order it from them . Once I am done designing the course, the details will be available on our training website over at www.seekhow.in  and the kit as a whole will be made available at www.vishaworld.com . As of now, the kit consists of the following: MT7688 Duo [ Buy ] 4GB MicroSD Card 8 Channel Relay board controllable over USB [ Buy ] CH340G Based USB UART Breadboard [ Buy ] Breadboard patch cables 40 way Male to Female 200mm long [ Buy ] Breadboard patch cables 40 way Female to Female 200mm long [ Buy ] Breadboard patch cables 40 way Male to Male 200mm long [Buy] USB OTG Cable DHT11 Temperature Humidity Sensor [ Buy ] 0.96" OLED Display [ Bu

Simple chat server and client

Simple Chat IPv4 Server and Client code. Run the server on one computer and the clients on the same network. Whatever one client sents to the server, it is copied and sent to all the clients connected to it. The code is hosted on gist and embedded below.

Personal Analytics using DIY IoT devices and InitialState.com

Recently I have blogged about three DIY IoT devices that I have put up in my house. Some of these devices have been running for past 3 years and uploading data points to one of the three data brokers - Xively or ThingSpeak or Carriots. A few months ago I switch to InitialState.com which has a sleek interface and allows you to analyse your data in a much better visually intuitive way. So with the following 3 devices collecting data using sensors from inside my house... Weather station outside - installed in my balcony (temperature, humidity, pressure, light) Ambient sensors inside the house next too the bathroom (temperature and humidity) Electrical Energy Meter - Monitoring voltages, currents etc on all 3 phases  ...here are the few insights that I gleaned on from analyzing the data: Overview: This is what my tiles app looks like with the various data stream being fed from the 3 IoT devices Recently, InitialState.com made changes to their platform to allow d