FM Radio with GNU Radio

This FM Radio project works with NooElec Hardware (NESDRMini2).

fm_radio
FM Radio project source: https://github.com/gnudeep/GNURadio/tree/master/FMRadio


How to set a Tomcat Filter in WSO2 Servers

Create your filter Jar and update the Carbon Tomcat web.xml to pick then new filter.

$CARBON_HOME/repository/conf/tomcat/carbon/WEB-INF/web.xml

<!-- Filter implementation -->
    <filter>
        <filter-name>SetCustomCookie</filter-name>
        <filter-class>com.piedpiper.CustomCookie</filter-class>
        <init-param>
            <param-name>mode</param-name>
            <param-value>DENY</param-value>
        </init-param>
    </filter>
<!-- Filter maping --> 
    <filter-mapping>
       <filter-name>SetCustomCookie</filter-name>
       <url-pattern>/*</url-pattern>
    </filter-mapping>

How to build WSO2 Carbon 4.0.0 from source

First user has to build orbit related to Carbon 4.0.0.

Take a checkout from WSO2 carbon orbit 4.0.0 tag

svn co http://svn.wso2.org/repos/wso2/carbon/orbit/tags/4.0.0/

build useing maven3

mvn clean install

Now user can build the Carbon Kernel.

Take a check out from Carbon Kernel 4.0.0 tag.

svn co http://svn.wso2.org/repos/wso2/carbon/kernel/tags/4.0.0/

Now build using maven3.

mvn clean install


How to setup Apache Flume

Apache Flume is a distributed logging system. Flume supports local file systems and HDFS file system.

Flume has three component. Those are Master , Collector and agent. Master node does the coordination among the log cluster nodes. Collector acts as the log collecting agent. Log collector does the log storing task. Flume can can sink logs to different file systems. Users can develop their own sink plugins to support their storage log systems. Log agent does to log extraction and push the logs to collector.

Following configuration allow Flume to extract tail out of a log file and push to a log collector that writes logs to a local storage.

Start Master

./flume master

Start Collector

Sink to Local File system

./flume node -1 -n dump -c "dump: collectorSource() | collectorSink(\"/tmp/flume/collected\","server");" -s

Sink to HDFS file system

./flume node -1 -n dump -c "dump: collectorSource() | collectorSink(\"hdfs://node0:9000/flume/collected\","server");" -s

Start agent with tail to given log file

./flume node_nowatch -1 -s -n dump -c 'dump:tail("/home/hadoop/flume_log_gen_server/wso2as-4.5.0-SNAPSHOT/repository/logs/wso2carbon.log") | agentBESink("node0");'

Howto setup Xen 4.1 with Ubuntu 11.10 and run a VM (domU)

Ubuntu 11.10  released with the Linux 3.0.0. Now Linux  has the Xen dom0 support.

setup steps:

1. Install Xen hypervisor

apt-get install xen-hypervisor-4.1-amd64

2. create a domU configuration. ( node0.cfg )

disk = [ 'file:/mnt/vm/xen/vm_images/node0.iso,hda,w',
'file:/media/mnt/vm/xen/iso_files/oneiric-desktop-i386.iso,hdc:cdrom,r' ]

memory=1024 vcpus=1 name="node0"
vif=[ 'type=ioemu,bridge=virbr0' ]
builder = "hvm"
device_model = "/usr/lib/xen-4.1/bin/qemu-dm"
vnc=1 vncunused=1
apic=0
acpi=0
pae=0
serial = "pty" # enable serial console
boot="dc"
on_reboot = 'restart'
on_crash = 'restart'

3. Start the domain

xm create /pathto/node0.cfg

In the first boot vm boots from cdrom and user can install new OS to vm.
by changing the boot order to boot=”c” user can boot from the hard disk.

4. List running domains.

xm list

PS:
Ubuntu 11.10 still need some path fixes to run user domains /vms ( domU ).
You may get an error in your /var/log/qemu-dm-node0.log saying :

Could not read keymap file: ‘/usr/share/qemu/keymaps/en-us’
create symbolic link named qemu-linaro in /usr/share with the name qemu.

For bridge networks default bridge may not include your default NIC.
If your vms ( domUs ) can not communicate with out side networks add
NIC to bridge.

brctl addif virbr0 eth0


Application Development with WSO2 Relational Storage Service ( WSO2 RSS )

WSO2 Relational Storage Service is a data storage service provided by WSO2 Stratoslive PaaS. WSO2 RSS supports MySQL and Amazon RDS as the back end data store.

Creating data bases with WSO2 RSS is a simple task. StratosLive Data Server has the easy RSS user interface that helps to add / manage databases.

Steps to create database using WSO2 RSS.

1.  Add Database.

2. Create Database User and add user to a database privileged group.

3. Create tables / mange data using  WSO2 RSS DB console.

RSS based data stores are accessible with in StratosLive PaaS.

Users can use Java application development methods to access RSS Data stores.

WSO2ConRSS application is a webapp deployed in StratosLive Application servers and it uses a RSS based data store to retrieve data. Source code related this sample available in OT svn.


Howto configure PRLINK PHS300 HSUPA modem on Ubuntu 10.04 Lucid Lynx

Edit Network connections and create Mobile Broadband connection with correct details.

Find the model and the vendor of the modem

#lsusb -v | less  and find for PROLINK.

You will find vendor : idVendor 0x1e0e

and model : idProduct 0x9100

# rmmod usbserial

#modprobe usbserial vendor=0x1e0e product=0x9100

You can load the module in the boot by adding

usbserial vendor=0x1e0e product=0x9100

line to the /etc/modules