My Professional Profile

I am Johnson Augustine Sr.Software Engineer and System Architect. I have 10 Yrs of hands on expertise in ASP.net MVC 5 , Angular 5 , C# MVC Razor, WPF MVVM , Android , IOS Swift 3 , IOS11 MSSQL,MySQL Database,,PHP,C/C++/Visual C++/G++/QT++,Com,DirectX,Open CV,EMGU CV , embedded System Development , [Raspberry PI]. ,html,Javascript,Jquery,Ajax.CSS , Networking ,Cyber security, Ethical Hacking You can see my professional profile at http://linkedin.com/in/johnsontaugustine Email : johnsonaugustine@live.com

Saturday, 26 October 2013

Linux device driver


Linux Device driver programming 

To develop linux based device drivers you need to know the C language and pointers and  microprocessor programming .

User space and kernel space



When you write device drivers, it’s important to make the distinction between “user space” and “kernel space”.

Kernel space. Linux (which is a kernel) manages the machine's hardware in a simple and efficient manner, offering the user a simple and uniform programming interface. In the same way, the kernel, and in particular its device drivers, form a bridge or interface between the end-user/programmer and the hardware. Any subroutines or functions forming part of the kernel (modules and device drivers, for example) are considered to be part of kernel space.
User space. End-user programs, like the UNIX shell or other GUI based applications (kpresenter for example), are part of the user space. Obviously, these applications need to interact with the system's hardware . However, they don’t do so directly, but through the kernel supported functions.

Example

#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>

MODULE_LICENSE("Dual BSD/GPL"); // For loading the driver

static int hello_init(void) {
  printk("<1>Driver test by johnson : Hello world!\n");
  return 0;
}

static void hello_exit(void) {
  printk("<1> Bye, Johnson \n");
}

module_init(hello_init);
module_exit(hello_exit);
Next, you need to generate a makefile. The makefile for this example, which should be named Makefile, will be:

<Makefile>
inside make file

obj-m := hello.o

Unlike with previous versions of the kernel, it’s now also necessary to compile the module using the same kernel that you’re going to load and use the module with. To compile it, you can type:

$ make -C /usr/src/kernel-source-2.6.8 M=pwd modules

This extremely simple module belongs to kernel space and will form part of it once it’s loaded.

In user space, you can load the module as root by typing the following into the command line:

# insmod  hello.o

The insmod command allows the installation of the module in the kernel. However, this particular module isn’t of much use.

It is possible to check that the module has been installed correctly by looking at all installed modules:

# lsmod

Finally, the module can be removed from the kernel using the command:

# rmmod  hello

By issuing the lsmod command again, you can verify that the module is no longer in the kernel.


How to develop device driver for windows ?


What is Device Driver?

 a program that determines how a computer will communicate with a peripheral device

How to develop device driver?

There is a kit available for develop device driver for windows ( DDK tool kit ) . download and install then you can start developing .Now its called Windows Driver Kit (WDK) 8.1

 Please be take care that if your driver has any problems then it will crash the OS so better , you should test the driver in windows installed in virtual box .

Download and install OSR Loader 

This GUI-based tool will make all the appropriate registry entries for your driver, and even allow you to start your driver without rebooting. It's even got a help file, for goodness sakes! If you write drivers, this is another one of those utilities that's a must have for your tool chest. x86 architecture.

Install DebugView  for Debug and view the result.


Introduction

DebugView is an application that lets you monitor debug output on your local system, or any computer on the network that you can reach via TCP/IP. It is capable of displaying both kernel-mode and Win32 debug output, so you don't need a debugger to catch the debug output your applications or device drivers generate, nor do you need to modify your applications or drivers to use non-standard debug output APIs.

DebugView Capture

Under Windows 2000, XP, Server 2003 and Vista DebugView will capture:
Win32 OutputDebugString
Kernel-mode DbgPrint
All kernel-mode variants of DbgPrint implemented in Windows XP and Server 2003
DebugView also extracts kernel-mode debug output generated before a crash from Window's 2000/XP crash dump files if DebugView was capturing at the time of the crash.

DebugView Capabilites

DebugView has a powerful array of features for controlling and managing debug output.
Features new to version 4.6:
Support for Windows Vista 32-bit and 64-bit
Features new to version 4.5:
Support for log-file rollover: To better support long-running captures, DebugView can now create a new log file each day, optionally clearing the display when doing so.
Features new to version 4.4:
Support for Windows Server 2003 64-bit Edition and Windows XP 64-bit Edition for x64:DebugView now captures kernel-mode debug output on 64-bit versions of Windows.
Clock-time toggle: you can now toggle between clock time and elapsed time modes.
Features new to version 4.3:
Support for Windows XP SP2:DebugView now captures kernel-mode debug output on Windows XP SP2.
More highlighting filters: Many people have asked for more highlighting filters.
Log file wrapping: A new log file option has DebugView wrap around to the start of the log file when the specified size limit is reached.
Larger buffers: Larger Win32 and kernel-mode buffers lessen the chance of dropped debug output.
Clear-output string: When DebugView sees the special debug output string "DBGVIEWCLEAR" it clears the output.
Client minimize-to-tray: You can now run the client minimized in the tray.
Features new to version 4.2:
Kernel-hook bug fixed:DebugView sometimes mistakenly report that it couldn't hook kernel-mode debug output on Windows XP and Server 2003.
Client global-capture option: A new option allows the client to capture console Win32 debug output on Terminal Server systems when run from a non-console session.
Filtering improved: Filters can be much longer and now apply to Win32 process IDs when process IDs are included in the output.
Crash-dump support improved: Several bugs related to extracting kernel-mode output from crash dumps are fixed and DebugView now loads resulting log files.
More highlight filters:DebugView now has 10 highlight filters, up from 5.
Insert comments: A new menu item lets you insert comments into output.
New switches: New command-line switches allow you to specify history depth and load log files.
Better balloon tips: If an output line is wider than the screen its mouse hover balloon tip word wraps.
Features new to version 4.1:
Save and load filters: You can save and load filters, including the highlighting colors.
Load saved logs: You can now load a log file back into the DebugView output window.
Capture boot-time kernel-mode debug output: Under Windows 2000, you can use DebugView to capture debug output generated by drivers from the earliest point in the boot process.
Here is a list highlighting some of DebugView's other features:
Remote monitoring: Capture kernel-mode and/or Win32 debug output from any computer accessible via TCP/IP - even across the Internet. You can monitor multiple remote computers simultaneously. DebugView will even install its client software itself if you are running it on a Windows 2000 system and are capturing from another Windows 2000 system in the same Network Neighborhood.
Most-recent-filter lists:DebugView remembers your most recent filter selections, with an interface that makes it easy to reselect them.
Process ID option: Toggle the display of process IDs for Win32 debug output.
Clipboard copy: Select multiple lines in the output window and copy their contents to the clipboard.
Log-to-file: Write debug output to a file as its being captured.
Printing: Print all or part of captured debug output to a printer.
One-file payload:DebugView is implemented as one file.
Crash-Dump Support:DebugView can recover its buffers from a crash dump and save the output to a log file so that users can send you the output your Windows driver generated right up to the time of a crash.
The on-line help file describes all these features, and more, in detail.

Installation and Use


Simply execute the DebugView program file (dbgview.exe) and DebugView will immediately start capturing debug output. Note that if you run DebugView on Windows 2000/XP you must have administrative privilege to view kernel-mode debug output. Menus, hot-keys, or toolbar buttons can be used to clear the window, save the monitored data to a file, search output, change the window font, and more. The on-line help describes all of DebugView's features.

HCK for Windows 8.1 

Hardware Certification tool for sign the driver. The driver signing and certification tools are available in visual studio 2013 genuine version .

For driver development samples visit the link bellow




How to change or hide your actual ip address

Change or hide your actual ip address  by using any of the following applications for free of cost

hideip vpn
Proxpn
open vpn etc

How to warm up IP address and email for Deliverability

To warm-up IP address and email for Deliverability by  four steps

Step 1: Sign up for feedback loops

Step 2: Set up your authentication data

Step 3: Engage with your most active recipients

Step 4: Monitor

How do I tell search engines not to index content via secondary domain names or any folders

1) Configure settings in .htaccess file like bellow

RewriteEngine on
RewriteCond %{HTTP_HOST} \.b\.com$ [OR]
RewriteCond %{HTTP_HOST} \.c\.com$
RewriteRule ^(.*)$ http://a.com/$1 [R=301,L]

2) Configure settings in robots.txt file like bellow

User-agent: *
Disallow: /search
Disallow: /groups
Disallow: /images
Disallow: /news


Any of the above two steps will resolve what you need

How to take screen shot of a desktop using QT

#include<QPixmap>
#include<QDir>

QPixmap imgUrl;
    imgUrl = QPixmap::grabWindow(QApplication::desktop()->winId());
    QString format = "jpg";
    QString initialPath = QDir::currentPath() + tr("/untitled.") + format;
    imgUrl.save(initialPath, format.toAscii());

Works with GT GUI application only


Thursday, 24 October 2013

How to boot Windows 8 from pen drive/USB disk


How to boot Windows 8 from pen drive/USB disk

select  command prompt by typing at run -->cmd

c:> DISKPART
c:>list disk
c:>select disk [Disk number]
c:>clean
c:>create partition primary
c:>active
c:> format fs=ntfs
copy files to usb

How to assign " in to a string in QT

How to assign " in to a string in QT

To do this use / symbol before "

eg Qstring str="this is very /"interesting/" story"

Thursday, 10 October 2013

what is xpcom compoenets

XPCOM is a cross platform component object model, similar to Microsoft COM. It has multiple language bindings, letting XPCOM components be used and implemented in JavaScript, Java, and Python, in addition to C++. Interfaces in XPCOM are defined in a dialect of IDL called XPIDL.


Writing plug-ins for Mozzila Gekko engine

Writing Plug-ins


  1. Once you decide what you want your plug-in to do, creating it is a simple process. A basic overview of the plug-in development process is given in the following steps.

  2. Plan your plug-in: decide on the services you want the plug-in software to provide and how it will interact with the browser and the special media for which the plug-in is created.
  3. Decide the MIME type and file extension for the plug-in (see Registering Plug-ins).
  4. Set up your development environment properly. You can use a variety of environments to create a plug-in, but make sure that you have the necessary files from the mozilla source or from the plug-in SDK.
  5. Create a plug-in project.
  6. You can either start from one of the samples provided for your operating system in the mozilla source directory, where plug-ins samples are already being built, or you can construct a new plug-in project in your own development environment using SDK-provided files. See the README in the plug-in SDK for more information about using the SDK and using the samples provided there.
  7. Write your plug-in code and implement the appropriate Plug-in API methods for basic plug-in operation. You'll find an overview of the Plug-in API methods in this chapter, as well as separate chapters for all of the major functional areas of the Plug-in API. Also see Making Plug-ins Scriptable for more information about making plug-ins accessible from the browser.
  8. Build the plug-in for your operating system. See "Building Plug-ins"
  9. Install the plug-in in the plug-in directory for your operating system. See Installing Plug-ins.
  10. Test your plug-in and debug as necessary.
  11. Create an HTML page and embed the plug-in object. For information about the HTML elements to use, see Using HTML to Display Plug-ins. To see your plug-in in action, simply display the HTML page that calls it in the browser.

Registering Plug-ins

Gecko identifies a plug-in by the MIME type it supports. When it needs to display data of a particular MIME type, the browser finds and invokes the plug-in object that supports that type. The data can come from either an object element in an HTML file (where the object or embed element either specifies the MIME type directly or references a file of that type), from a separate non-HTML file of that MIME type, or from the server.

The server looks for the MIME type registered by a plug-in, based on the file extension, and starts sending the file to the browser. The browser looks up the media type, and if it finds a plug-in registered to that type, loads the plug-in software.

When it starts up, the browser checks for plug-in modules for the platform and registers them. It determines which plug-ins are installed and which types they support through a combination of user preferences that are private to the browser, the contents of the plug-ins directory or the registry on Windows.

A MIME type is made up of a major type (such as application or image) and a minor type, for example, image/jpeg. If you define a new MIME type for a plug-in, you must register it with IETF (Internet Engineering Task Force). Until your new MIME type is registered, preface its name with "x-", for example, image/x-nwim. For more information about MIME types, see these MIME RFCs:

RFC-2045: "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies"
RFC-2046: "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types"
RFC-4288: "Media Type Specifications and Registration Procedures"

Create simple plugi n for google chrome browser - Plug-in development

Create simple plugi n for google chrome browser - Plug in development

Plug ins are addons that will give additional fecilities in to applications than built in . To create a simple plug in we need to do simple two steps

Create a minifest.json file
Create an html file

manifest.json

{
  "name": "my test menu",
  "version": "1.0",
  "manifest_version": 2,
  "description": "The first extension that I made.",
  "browser_action": {
    "default_menu": "First Menu",
    "default_popup": "popout.html"
  },
  "permissions": [
    "http://api.flickr.com/"
  ]
}

popout.html file

<html>
<html>
<label><b>This is a plugin</b></label>
</html>
</html>

To execute plugin in test mode Go to menu --> settings -->extensions -->tick developer mode -->click load unpack extension

This will execute your plugin

To pack the plugin click on pack plugin

This is a simple plugin



How to convert mp4 to h264 in debian linux or raspberry pi

Installation

sudo apt-get update
sudo apt-get install gpac
y

Usage
MP4Box -add  file1.mp4   output.h264

how to convert h264 to mp4 in debian linux or raspberry pi?

Installation

sudo apt-get update
sudo apt-get install gpac
y

Usage
MP4Box -add  file1.h264   output.mp4

Monday, 7 October 2013

How to find system names ,ip and mac address in a network or lan

How to find system names ,ip and mac address in a network or lan .

 To do this you shoud use any network scanners in windows or use the following ways .

1) open run ( in windows) --> type cmd ---> then type arp -a will list all systems with mac and ip.

2) Use network map from network sharing center

3) Use Advanced ip scanner from the bellow link

http://www.advanced-ip-scanner.com/