Tag Archives: mobilenetworksagriculture

SMS and Web Based Agriculture Information Delivery System For Pakistan

25 Jan

I will be sharing here the implementation details of agriculture information system which I have developed. Objective to share this information is to help others and give them a hint about the system. Although there is room for improvements.

This article covers the detailed implementation of components of system. All the technologies used in the project will also be explained in detail.




The features mentioned in the above sections are implemented.  Web portal is implemented using Java Enterprise Edition (J2EE). Implementation technology is Java Server Faces version 2.0 (JSF2.0) and PrimeFaces is used as component library. Some of pages are developed in Java Server Pages (JSP). Database used is MySQL which is an open source database and used widely for web applications. Integrated Development Environment (IDE) used for the development is NetBeans 7.2.0.

Why J2EE (JSF) is used?

First of all Java Enterprise Edition is used for huge scale applications. It is also portable and can be used for cross platform. The system which we have developed has a huge potential for subscription and the subscribers can be in millions. Therefore Java Enterprise Edition helps as it is used in situations where users are large in numbers. JSF2.0 follows MVC architecture which separates the business logic and view. MVC architecture is very helpful in creating large scale applications. One of the important factors is also the motivation for a mobile edition of the web portal in future, that could be easily developed in PrimeFaces.

Web Portal Users

There are four types of users of this web portal

  1. Seed Sellers
  2. Agricultural Advisories
  3. Farmers
  4. Administrator

1-    Seed Sellers

1.      Seed Seller Registration Module

Web portal contains a registration module where seed sellers/agricultural product sellers can register themselves by entering some specific information. Information will be saved in the database.


2.      Seed Seller Login Module

Seed seller can log on to the system by entering the credentials asked at the registration time. Credentials are username and password.


3.      Seed Seller Information Feeding Module

Main theme to bring seed sellers to web portal is information acquiring. Seed sellers can add the information about their seeds. Information entered by the sellers is stored in the database.  Initially seller can add information of only three crops; cotton, corn and rice but in future it will be extended to maximum crops.  Seed information is further categorized. PrimeFaces’ component “Accordion Pane” is used for the graphical user interface.


2-    Agricultural Advisories

Agricultural advisories in Pakistan carry out research pertaining seeds and production technologies. Agricultural advisories in Pakistan do not have a mechanism to share their research with farmers. Advisories module in the web portal is same as the seed seller’s module. So advisories can also share information on the web portal which is saved in the database.

1.      Seed Seller Registration Module

2.      Seed Seller Login Module

3.      Seed Seller Information Feeding Module

3-    Farmer

Farmers are the core users and the focal point of the system. The whole system is being developed for the information sharing to the farmers. Only registered farmers will be able to get agricultural updates. Farmers can subscribe to our system using two ways:

1.      Registration through SMS

Farmers in villages do not have access to computers; moreover most of them are computer illiterate. To facilitate the farmers and make system useful for the farmers, registration through SMS is introduced in the system. Farmers who want to subscribe to our system can type in SMS

  1. ‘Sub’ or ‘s’and sends it to 03348648921 (Not Operational. Will Make it Operation Soon).
  2. Farmer will get reply with instruction and sample SMS to register with system.
  3. By correctly replying to the information requested, farmer subscription request will be received at the web portal which later administrator will moderate (Accept/Reject).

2.      Registration at web portal

Farmers are also facilitated in registration by the web portal. Someone questions why registration through web portal is there? Answer is that there is chance that we can collect data from large number of farmers themselves and register them manually instead of using SMS registration method. Farmer is asked some specific information at the time of registration which is helpful for sending the updates to farmers later.


4-    Administrator

Administrator is also a very important user of the system specifically for the management of system. Administrator is the super user of the web portal. The entire user interface in the admin panel is developed in the PrimeFaces. The component of PrimeFaces used is “Tabview”. Administrator has the following functionalities at the web portal.


1.      SMS sending Module

Administrator can send SMS to farmers based on the Region, District and Crop.  E.g. administrator can select where region is Rawalpindi, District is Attock; also admin want to send SMS only to cotton farmers. SMS is automatically generated when administrator select the options. Administrator has the options to send SMS in English or Urdu.


2.      Automated broadcasting

Administrator can set up the time for the periodic broadcast of a SMS. And location for sending the SMS selected from the list of options. SMS can be sent to all the districts or a specific district. To implement this feature PrimeFaces Poll component is used which provides the functionality to call an event again and again after specified interval.


3.      Automated web crawling

Administrator has the option to run the web crawler for the three crops initially Corn, Cotton and Rice. Only Corn crawling is working. Information is crawled from the Pioneer Seeds website. Information is fetched through an open source web crawler ‘Crawler4j’. Information is parsed after fetching and then stored in the database. Parser used for parsing the HTML page is the “JSoup “parser, which is an open source parser.


4.      User Management

User management is an important feature of admin module in the web portal. This feature covers the user management. Administrator can view the sellers, advisories and farmers registered in our system. Administrator can delete a specific seller, advisory or farmer.


5.      User statistics

Administrator can also check the statistics of farmers registered for a specific crop in graphical form. For graphs java script library “High Charts” is used. Administrator can also download and print the graphs.


6.      Subscription requests moderation

As described in chapter 3, farmer will be able to get registered directly through website but registration request from mobile phone will be moderated. The purpose to moderate is to avoid invalid and fake registration. At web portal it is ensured through validations. Validations are implemented through JSF built in validations support.  Administrator can approve/reject the request. On approval of removal of request farmer will be notified with SMS.


7.      Translation Module

We are developing this system for the farmers of Pakistan. Majority of farmers cannot understand English. So in order to make system effective and create value for the farmer translation module is included in the system. Translation module uses the Google translation API 2.0 which is used commercially. You have to purchase the key before you can use the translation API to translate in Urdu.

When administrator will click the Urdu tab, the text in the textbox will be translated to Urdu.


8.      SMS history

History of sent and received SMS from portal is maintained. Administrator can view the history in the sent and received messages tab.


9.      News updates

Administrator can share the recent news as well. Administrator will add the news in the news panel module and news will be shown in the new section at the home page of the web portal.


SMS Gateway

We will be using Kannel as an SMS gateway server. Kannel is installed on the Linux Ubuntu 12.04. Installation, configuration, sending and receiving SMS detail is already described in my previous posts.

Automated SMS query response system

Automated query response is implemented in Java Server Pages JSP. First of all farmer can subscribe to the service by registration through SMS. After registration farmer can query seed information for a specific crop. When system receives the request, first of all system checks the crop for which farmer is requesting the seed information for. After the evaluation of request, system checks the database and retrieves specific seed information about the crops.  SMS is generated from the retrieved information and reply is sent to the farmer.


Agriculture is the backbone of Pakistan. Half of the population’s direct source of income is agriculture. Agriculture is facing a lot of problems nowadays, which is resulting in increase in poverty ratio every year. We have first investigated the complete lifecycle of farming and have tried to find solutions to the problem faced by the farmer throughout the life cycle. The communication gap between farmers and agricultural information providers is the actual problem identified in our research. We have developed a platform where farmers and agricultural information providers can communicate with much more ease as compared to typical communication methods. System is using the medium of mobile phone communication. Information provider can share the information on this platform where it will be stored. The stored information will be delivered to farmers through SMS. System has the functionality of automated query response feature which is very useful for the farmers. The system developed is first of its type in Pakistan. These systems are working effectively in other countries like Kenya, South Africa, Thailand and India. Information systems are contributing in the agricultural productivity across the globe. The developed system is unique in the sense that it has unique features like:

  • Automated web crawling
  • Farmer categorization on location and crop
  • Translation of the information in Urdu

System is cost effective as it uses SMS as a medium of communication. SMS communication is  very cost effective and is available all across Pakistan.

In Pakistan, we can overcome the communication gap between the agricultural information providers and farmers with the use of this system. By using this system farmer would be able to get the latest and valuable agricultural information on their mobile phones. It will increase the efficiency and productivity in the agriculture sector of Pakistan. Our platform provides all the necessary features to bridge the communication gap.


System we developed so far is only providing information related to seeds. System can also be extended to provide all the information necessary for farming. Information related to crop selection, land preparation, use of fertilizer and pesticides, weather forecast and market is most needed by the farmers. The system we have developed is so well designed that it can be extended to implement the various features which will provide all the other required information using SMS. Proposed extensions are

  1. Weather forecast
  2. Pest attack warnings
  3. Market rates update
  4. Schedule of water availability in the canals
  5. Personalization of information for the individual farmers
  6. Addition of agricultural experts in the system
  7. Mobile application for simple Nokia Symbian’s mobile phones
  8. Query response through voice mail
  9. Collaboration with Pakistan government

The system with proposed extension can be a mile stone in changing the life style of farmers and may lead to increased agricultural productivity in Pakistan. Real value of the system is that a large number of farmers facing similar problems can acquire the latest and pertinent information regarding the problem they are facing and its solution. This system can also help the agriculture product sellers to change their marketing strategies. Agriculture product sellers spend millions in printing the literature for advertisement of the products. With use of this system they can market their product efficiently and cost effectively. Use of Information Technology (IT) in agricultural information flow is completely a new field in Pakistan and it can play a significant role in achieving excellence in agriculture productivity.

Need your suggestions and feedback.

It is soley my own work. Please get permission before copying.

Copy Rights @Mahtab


Using mobile technology to improve farming skills in Thailand

19 Nov

Food of thought for Pakistanis

If Thailand can implement this system (described below ) successfully why not we? Agriculture is our back bone and we can educate our farmers through this type of service.

I need your suggestion / comments

Can this system be implemented in Pakistan?

If not what are the reasons?

Thai farmers can access useful information on agricultural developments by using the dtac service “*1677 Farmer Information Superhighway”.

Mrs Rungnabha Yordmai, a 36 years old rice farmer and subscriber of *1677, has received daily information on ‘rice cultivation’ since May 2009.

Free agricultural SMS updates

The subscription service “*1677 Farmer Information Superhighway” is free for Happy (dtac’s youth brand) and dtac customers. By subscribing to the service, farmers will receive SMSes to their mobile phones every day, containing updated agricultural information on

  • market trends
  • commercial crops
  • new farming techniques
  • interesting know-how
  • important news update
  • warnings on weather conditions etc.

The farmer’s can subscribe to three different topics: rice, fruits & vegetables and livestock & fishery.

By using this service, farmers gain knowledge to advance their farming skills and techniques that help them improve productivity, reduce costs, and increase income while also getting maximum benefits from mobile phone usage.

“I’m eager to learn about farming and agricultural techniques, but I seldom have the chance to attend any training courses. So I think it’s great to learn from *1677 as the info is sent daily to my mobile phone,” says Mrs Rungnabha Yordmai, a 36 years old rice farmer and subscriber of *1677. She has received daily information on ‘rice cultivation’ since May 2009. “It’s a convenient approach of providing information, but can also be a good comforting support to farmers.

Developed into a Mobile Application
The SMS service was introduced in 2008 by the Telenor Group Thai mobile operator dtac together with the Rak Ban Kerd foundation and the Ruam Duay Chuay Kan DFM Radio Station.

In 2012, the service was extended with a “Farmer Information” application available on iPhone and iPad. The application offers up-to-date agricultural information such as comparing product prices at the major markets in Bangkok. This enables farmers and consumers to keep track of the market development and to make the right buying and selling decision at the right time. The application aims to pave the way for online marketing or e-commerce in the future.

Experts’ consultation at help centre
Subscribers of the service may also access the information through the farmers’ help centre. The information centre, accessible across the nation, provides access to the network of 123 successful farmers and academics for experts’ consultation.

Traditional farming techniques
Thailand is an agricultural country with over 60 % of the population working in this sector. However, more than 80 % of the Thai farmers are still poor and in debt. This is because most of them still base their productivity on outdated farming processes and follow traditional farming techniques which imply:
•    high production costs
•    no marketing knowledge to sell their product
•    inefficient know-how to improve the farming techniques

*1677 empowers the farmers with knowledge
The Thai farmers living in remote areas tend to be too far away to gain new knowledge on agriculture. The *1677 Farmer Information Superhighway is thus adopted in order to solve these problems and empower the farmers with knowledge in their hands through the use of mobile phones.

Improving farming skills and techniques
Based on the techniques Mrs Yordmai has received from *1677 Farmer Info, she has applied self-made biological fertilizer on the same plot of land. The production cost and the cost of fertilizer have been significantly reduced with 67 % while gaining an increased production capacity of 40 %.

300,000 active subscribers
Since the launch of the service on 12 August 2008, there are more than 300,000 active subscribers in June 2012.

Seminars and workshops to establish farmers’ network
Apart from sending SMSes and having the service available as a mobile application, dtac and partners have also organized seminars and workshops to help the Thai farmers establish the “farmers help farmers’ network” and learn agricultural techniques based on the “sufficiency economy”. The workshops and seminars have been held in every region and there are more than 20,000 farmers from all over the country have joined the activities so far.

Samnuek Rakbankerd Farmer Awards
Once a year, dtac and its partners Samnuek Rakbankerd Foundation and Ruamduaychuaykan DFM Radio Network is handing out the Samnuek Rakbankerd Farmer Award. The award is granted to ten farming communities from every region of Thailand innovating agricultural products.  In 2011, there were more than 30 farming practices that submitted the applications for consideration. The winners of the award will be part of the network sharing knowledge and agricultural practices through the *1677 Farmer Information Superhighway services.

Shared value for the society
Studies by the Boston Consulting Group and Deloitte show that the telecom industry makes an important contribution to economic and social welfare and is an important driver of social and economic development.
“The “1677* Farmer Information Superhighway” is an excellent example showing how we successfully extend information and telecommunication technologies to the benefit of the society as a whole,” said Perapong Klinla-or, Vice President for Corporate Social Responsibility at dtac.

Award winning service

dtac and the *1677 Farmer Information Superhighway service has won several awards:

dtac wins ICT awards 2011

dtac wins ICT Excellence Award 2009

dtac wins Corporate Social Responsibility  award 2008

Socio-economic impact of telecommunication

Telenor Group has commissioned studies on the socio-economic impact of mHealth, mobile financial services, the Internet and of mobile communications. The findings show that the telecom industry is an important driver of social and economic development.

This article is copied from Telenore Thailand website.


Improvement in Agriculture Pakistan using Mobile Phone Networks

3 Nov

Pakistan is an agrarian economy and 70% of the economy is dependent upon agriculture. Pakistan loses 30-40% of its crops annually due to lack of awareness amongst the farmers and use of out-dated techniques. Information regarding seeds, weather, trusted pesticides, fertilizers, crop diseases and their solutions, comparative pricing of crops and marketing techniques are most needed by the farmers. Government agricultural staff and agents of seed/pesticide companies are unable to reach all the farmers to guide them about benefits of using quality seeds, expected diseases and their remedies. Therefore one of the major problems faced by Pakistani agriculture industry is the lack of information amongst the farmers due to the communication gap between the information provider and the farmer.

Today, mobile phones have penetrated throughout the rural areas and are available to most of the farmer across the country. Other mechanisms such as TV and radio programs do not match the schedule of farmers and newspapers are also not available in rural area. Hence, the information delivery in Urdu through mobile phones is most suitable for the farmers.

This problem can be solved by developing a system through which farmers can get the required information (especially about seeds) using mobile phones communicating directly with our system. System will be composed of mobile phones and a web portal. System will deliver information using two ways, first periodic broadcasts of seed information from web-portal through SMS on mobile phones of farmers depending upon the season. Second, farmer can query the system by sending names of the crops in SMS and our system will automatically reply with the available seed information of the crop. All information will be delivered in Urdu as well as English language which is comfortable for farmers.  Therefore, farmers will be able to get information on their mobile phones at a reasonable cost as compared to expenses incurred in travelling to agricultural offices. Moreover, wastage in time is also an issue that will be solved through this system.