element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
  • Settings
In the Air Design Challenge
  • Challenges & Projects
  • Design Challenges
  • In the Air Design Challenge
  • More
  • Cancel
In the Air Design Challenge
Blog Carbon Footprint Monitoring - CC3200 Remote Debug Console
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: xever
  • Date Created: 13 Feb 2015 10:46 AM Date Created
  • Views 375 views
  • Likes 2 likes
  • Comments 0 comments
  • iot_footprint
  • in_the_air_design_challenge_2014
  • in_the_air
Related
Recommended

Carbon Footprint Monitoring - CC3200 Remote Debug Console

xever
xever
13 Feb 2015

This is a continuation of the last post and highlights a quick guide on how to have a quick remote debug console for the CC3200.  One can use UART connection for debugging or can use a socket to send debug messages to a remote console server.

 

Starting from the TCP Socket CC3200 sample project, I have decoupled the WLAN and TCP Client parts inside main.c and encapsulated them into a more portable and reusable code fragments.  The main.c has now been transformed as:

 

void main()
{
    BoardInit();
    UDMAInit();

    Hardware_Init();

    /* WLAN Connect */
    WLAN_Initialise();
    WLAN_Connect(SSID_NAME, SECURITY_KEY, SECURITY_TYPE);


    /* We are connected to the network, setup a TCP Client
    * and connect to the server
    */
    TcpClient_Init();
    ConnectToTcpServer(IP_ENDPOINT, IP_PORT);


    while (true)
    {
        /* Send some data to remote server */
        TcpClient_Write("Can be debug message...", 23, 0, 0);
        /* stall for a second */
        Delay(1000);
    }

}

 

The remote console is really a TCP server running on a Desktop machine or Beagle Bone.  For the TCP server running on the Desktop, a quick Google search will result in a few TCP tools for Windows, MAC or Linux, or you can roll your own using C# .NET with this sample program ready to go.  Using the Beagle Bone is quite easy as well by writing a simple nodeJS script in Cloud9 IDE of the Beagle Bone.

image

Using the files is quite straightforward and hope the API are self-explanatory.  One thing to note though, when connecting to a TCP server, the IP address argument is of an array of 4 bytes representing the endpoint IP address.  i.e. to connect to a TCP server with address 192.168.1.60 on port 40000, you can do the following:

 

uint8_t endPoint[4] = {192, 168, 1, 60};
uint16_t port = 40000;
TcpClient_Connect(endPoint, port);

 

Disclaimer:

The attached code in this blog post is shared to the community as is.

Attachments:
cc3200.zip
  • 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 © 2025 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