element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • 'Choose another store...'
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs Building your own webserver with EK-TM4C1294XL Launchpad
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: vish
  • Date Created: 6 Aug 2014 10:59 PM Date Created
  • Views 572 views
  • Likes 0 likes
  • Comments 0 comments
  • webserver
  • ti_connected_launchpad
  • iot
  • ek-tm4c1294xl
  • ti
Related
Recommended

Building your own webserver with EK-TM4C1294XL Launchpad

vish
vish
6 Aug 2014

Hello element14,

 

In this post, I'm going to explain you how to host a webserver from EK-TM4C1294XL Connected Launchpad from TI.

In this system, you can host your website from a pendrive and connect it to the dev kit to go on air image

 

With this webserver, you can

   * Host a website with static webpages.

   * Access the dev kit through command line via USB

   * Control the board via CGI handlers.

   * Logs all the page requests to "www.log" file at the root of filesystem

   * Logs all the serial commands to "cmd.log" file at the root of file system.

 

This is the test connections I used :

image

 

Here is video introduction to the system :

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

This video explains about the working :

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

This is a demo of how to control LEDs onboard. You'll be able to see that the USB card reader flashes with each request indicating that these requests are logged into "www.log" file.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

How to host your website?

1. Format your USB drive( preferably less that 4GB ) to FAT filesystem.

2. Copy your website to the drive.

3. You must have the index of your website at the root of the drive.

4. Plug the drive to dev kit and enjoy.

 

How to add your own controls?

To add your own control routines, you can go to "httpserver/cgiHandlers.h" and declare your CGI handler and define it in "httpserver/cgiHandlers.c". I already have included a sample CGI handler "hCGI_ioControl" in the file. After that, you have to add your handler to CGI lookup table in 'cgiHandlers.h' like this :

static const tCGI g_psConfigCGIURIs[] =
{
    { "/io_control.cgi", (tCGIHandler)hCGI_ioControl }, // CGI_INDEX_CONTROL
};

and you are done. Make sure that you cgi handler always return a file name( either a real filename on disk or a virtual one, as I did ).

 

The CCS project, sample website and detailed instructions are available at : https://github.com/v-i-s-h/uServer

 

Happy hacking,

vish

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube