Identifying a Modem’s COM Port in Windows-XP

Windows usually communicates with a modem via a COM Port interface - whether that’s a “real” serial port, or a “virtual” serial port for an integrated modem or via USB.

To find what COM port Windows is using, start by locating the modem in Device Manager:

Device Manager

Right-click the required modem in the list:

Modem right-click menu 

Choose Properties to open the modem properties:

Modem Properties - General

Now choose the ‘Modem‘ tab:

Modem Properties - 'Modem' Tab

Note that the Port is identified at the top of the panel - in this case, it’s COM3.

So you’re thinking of starting with ‘C’…?

This entry contains much of the same material as Things you should’ve learned in ‘C’ class: 0 - Introduction  - but aimed at those who have not (yet) taken a ‘C’ class.

Many people seem to adopt the jump-in-at-the-deep-end-and-hope-you-learn-to-swim-before-you-drown approach to start developing in ‘C’.

While it is, of course, possible to learn a programming language by yourself, it requires a good deal of disciplined study and practice to learn it well. Therefore I thoroughly recommend a taught class as the best way to go.
I can recommend the following local training providers:
http://www.doulos.co.uk
http://www.feabhas.co.uk/

Other providers are, of course, available; eg,
http://www.netrino.com/Embedded-Systems/Training-Courses
http://www.ganssle.com/classes.htm 

And some offer “self-study” options; eg,
http://www.netrino.com/Boot-Camp-Box 

If you do intend to go ahead with a DIY approach, the first thing you will need is a good textbook - or textbooks. ‘C’ is a very long-established and widely-used language - so there are plenty to choose from!

Some general books are listed here: http://www.keil.com/books/genbooks.asp

The Association of C & C++ Users (ACCU) website has a section dedicated to book reviews: http://accu.org/index.php/accu_documents/book_reviews

A free online ‘C’ textbook can be found here: http://publications.gbdirect.co.uk/c_book/

A complete set of ‘C’ programming course notes is available here: http://www.eskimo.com/~scs/cclass

Answers to a range of Frequently-Asked Questions about ‘C’ programming can be found here: http://c-faq.com/

A description of all the functions provided by the standard ‘C’ library can be found here: http://www.cplusplus.com/reference/clibrary/

Things you should’ve learned in ‘C’ class: 0 - Introduction

I see a worryingly large number of posts from ‘C’ users on internet forums displaying a lack of understanding of the basics of  ‘C’ development in the Real World.

Many of these are standard, classic ’C’ issues - applicable to any environment in general - and some are specific to Embedded development in particular.

This is intended to be the first in an occasional series to address some of these issues.

Hopefully, educators may also find these posts useful in considering whether any changes in their material or presentation might be beneficial…

As a starter, let’s consider some basic reference materials to keep at hand:

The first must, of course, be a good ‘C’ reference book such as The ‘C’ Programming Languageby Brian Kernighan and Dennis Ritchie - available through any good book shop, as well as online bookstores.
Some further book recommendations can be found here: http://www.keil.com/books/

A free online ‘C’ textbook can be found here: http://publications.gbdirect.co.uk/c_book/

Answers to a range of Frequently-Asked Questions about ‘C’ programming can be found here: http://c-faq.com/

A description of all the functions provided by the standard ‘C’ library can be found here: http://www.cplusplus.com/reference/clibrary/

In my opinion, you can’t beat a good, taught class. I can recommend the following local training providers:
http://www.doulos.co.uk
http://www.feabhas.co.uk/

Other providers are, of course, available; eg,
http://www.netrino.com/Embedded-Systems/Training-Courses
http://www.ganssle.com/classes.htm 

And some offer “self-study” options; eg,
http://www.netrino.com/Boot-Camp-Box 

Hot Tips for Cold Starting

The cold weather is with us again here in Southern England.  Well, we call it “cold”;  others may differ - including those further North in the UK!

First snow of the 2010-11 winter

These conditions put extra strain on a car’s electrics, and can lead to starting problems. 
So here are some Hot Tips for Cold Starting:

The important thing to remember is that, once the engine has stopped, there is nothing putting any power into the battery - therefore anything electrical at all that’s left on after the engine’s stopped will be flattening the battery.
So the first tip is:

Before you stop the engine:
Be sure to turn off everything electrical; lights, demister, blower, etc.
Close electric windows before stopping the engine.

The second tip is the converse of the first:

Do not switch anything on before the engine has started. 
Start the engine as soon as possible after turning on the ignition - don’t wait with just the ignition on unless the car requires it(check handbook for details; eg, a diesel with glowplugs).

Tip for cars with manual transmission:

Depress the clutch pedal (”let the clutch out”) while starting.
This reduces the load on the starter and, hence the battery - thus increasing your chances of starting successfully

If you do need a “jump” start, remember that modern cars have lots of electronics in them; therefore be very sure to follow any directions in the handbook to avoid damage. If in doubt, leave this to a professional assistance service.

Do not be tempted to “jump” start a car using a so-called “Leisure” battery - as used for camping, caravans, etc. These are just not designed to give the huge “kick” required to start an engine (especially a diesel), and are likely to be damaged by it. (If you have a freshly-charged leisure battery, connecting it to the car battery for 5-10 minutes might charge the car battery sufficiently for a start; but be sure to disconnect it before starting and, again, follow any handbook directions).

Final tip, after a “jump” start:

Take the car for a good run - say, 15-20 minutes.
The reason you needed a jump start was that the battery was flat; if you don’t take steps to ensure that the battery gets well charged, the same will happen again!
More charge is generated at higher engine speeds (within reason), so the “open road” at “cruising speed” will be better than around town, if possible.
It is not recommended to leave the engine “idling” for long periods, nor to “rev” it while stationary. Again, be sure to follow any directions in the handbook to avoid damage and, if in doubt, seek professional advice.

Of course, if the car has persistent starting problems, it should be checked for faults in the battery and the charging and starting systems. Remember that batteries have a finite life.

Disclaimer: This post is presented in the hope that it may be of some use and/or interest; it is given “as-is” and entirely without any warranty of any sort whatsoever - any use of it is entirely at your own risk. If in doubt, seek advice from your vehicle provider, maintainer, or other reputable source.

Didn’t we have a loverly time the day we went to Earl’s Court

Embedded Live 2010 (formerly the embedded systems show),
Earl’s Court, London, England: 

Earl's Court - Embedded Live 2010

I had visited the Embedded Systems Show (as it then was) at the NEC in Birmingham for many years. Attendances had been dwindling of late and, last year, it moved to FIVE in Farnborough (home of the famous Airshow).

This year, the show was under new ownership, rebranded as Embedded Live, and at a new venue - Earl’s Court in London.

We were most grateful to receive a special “opening offer” from UBM, the new organisers, to have a stand in the Connected M2M Devices pavilion at a very favourable introductory rate:

Antronics Ltd

This was our first time exhibiting at a show like this and, I must say, it was a fairly painless experience - thanks to the guys (and gals) at UBM.

We had a reasonable stream of visitors - it was good to meet some old friends, and to make some new contacts.

Special thanks to ARM for providing free drinks on the Wednesday night!

Some people doubt the value of exhibitions in this Web age, but I still think there’s a place for seeing stuff “in the flesh” and meeting real people face-to-face. So I hope next year’s show will be bigger and better…

Our

Didn’t we have a loverly time the day we went to Intech…

Wired Wessex, a local advice, news, support and networking group, held a meeting at the INTECH Science Centre near Winchester on 30 September 2010.

After drinks, nibbles, and networking, Dr Andy Stanford-Clark, IBM Futurist, Distinguished Engineer and Master Inventor, gave an excellent talk entitled, “Innovation for a Smarter Planet”

Andy Stanford-Clark’s “day job” at IBM is with their “Smarter Planet” initiative: http://www.ibm.com/smarterplanet - hence the title of his talk! The Big Idea here is instrumenting everyday objects, connnecting them so that they can communicate, and applying intelligence to the resulting data to make things “Smarter” - and, hence, more efficient, greener, etc, etc,…

IBM’s work, of course, does this on a corporate scale; but Andy illustrated his talk with his own “home-made” gadgets controlling and monitoring things in his own house - like the fountain in his pond, and his mousetraps!

It was a very interesting, entertaining, informative and thought-provoking presentation.

This was the first time that Wired Wessex had sought sponsorship for one of their events. After Googling Andy Stanford-Clark, I thought that he seemed to be into just the kinds of things that Antronics Ltd is doing these days - so decided make this our first ever sponsorship deal. I was glad to be joined by my good friend Clive Andrews of Aleka Design as co-sponsor:

Andy Neil, Andy Stanford-Clark, Clive Andrews

The meeting was well attended with plenty of interest in our displays during the networking times:

Antronics Ltd display

I would certainly recommend this to anyone considering suchan opportunity.

Modem Diagnostics in Windows-XP

Windows-XP (among others) can maintain a log of all commands sent to a modem, and responses received from a modem. This can be very useful in diagnosing problems with dial-up networking, etc

Start by locating the modem in Device Manager:

Device Manager

Right-click the required modem in the list:

Modem right-click menu 

Choose Properties to open the modem properties:

Modem Properties - General

Note that the Troubleshooting button here is not what we want - instead, go to the Diagnostics tab:

Modem Properties - Diagnostics

Check Append to log to enable logging of all commands sent to the modem, and all responses received from the modem.
The View Log button, as the name suggests, can be used to view this log (note that it’s just a text file - once you know where it is, you can view it with any application you like)

The Query Modem button sends a number of commands to the modem, and captures the responses (if any).
While this is happening, the following message is displayed:

Modem Diagnostics - Communication in progress

When complete, the commands sent & responses received are shown:

Modem Properties - Diagnostics (with responses)

These will also have been recorded in the log - press the View Log button to see:

Modem Diagnostic Log

(for details of the commands and responses and their meanings, you will need to consult the particular modem’s documentation).

Now, as long as you leave the Append to log option checked, all commands sent to the modem, and responses
received from the modem, will continur to be recorded in the log. Therefore, if you get any error messages from Dialup Networking, etc, you can look at the log to see exactly what happenned…

Note that the log only records modem commands & responses in creating and clearing connections - it does not record the data passed through the modem once the connection is established.

Happy New Year!

Welcome to 2010!

This is the first time in around 30 years that we’ve actually had a white Christmas here in South-East England:

White Christmas?

I wonder what other surprises the year will hold…?

So What’s All This “Firmware” Stuff, Anyhow?

Most people who have any contact with a computer these days will probably have come across the terms “hardware” and “software”:

“Hardware” is physical stuff - things you can touch, and see, and would hurt if you dropped them on your toe!

If you need to change “hardware” it means getting out screwdrvers and suchlike, and fiddling with cables, plugs, and other such mechanical & electrical stuff.

“Software” is more nebulous; in the old days, it at least came on a disk (or disks) in a box with a big manual (that you never read); but, nowadays, you can just download it - so it has no physical existence at all.

“Software” can be changed - added, removed, reconfigured - with just a few clicks of the mouse; no effort or tools required at all! It is this eas of changeability that gives rise to the “soft” in “software”

So where does “firmware” come in? “Updating firmware” is a topic that sometimes appears in the obscure pages at the back of the instructions for some high-tech gadgets; or, if your gadget is misbehaving, you might be asked about its “firmware version”…

As the name might suggest, “firmware” is a kind of hybrid; somewhere in between “hardware” and “software”.  Firmware is a special type of software that is fixed into a piece of hardware.  Thus it is not so easy to change (or update) as software, but easier to change (or update) than hardware; to put that another way, it is “harder” than software, but “softer” than hardware!

Firmware is usually associated with Embedded Systems (see previous blog entry), as they tend to lack the interfaces and storage of a “normal” computer for loading & storing software in the “normal” manner - hence their operating programs (or “software”) have to be fixed into the hardware as “firmware”!

 All clear now?

Andy.

PS.
Beware that your spell-checker doesn’t accidentally change your firmware into
formwork - which is something completely different…!

So What’s All This “Embedded System” Stuff, Anyhow?

When people ask me what I do, if I mention “embedded systems”, it usually just produces a blank look!

So let’s start this blog with a plain-words description of what an “embedded system” means.

It has been said that there is more computing power in your car today than was used to put men on the moon in the Apollo missions - but you wouldn’t think of  your car as a computer, would you?

This is the key to an embedded system: it is something that provides computing power, but is hidden - or “embedded” - within something that is not a computer!

So, back at the car, where is this “not-a-computer” hiding? Where is it “embedded”? In fact, there is not just one - there are many! The key one, central to the operation of the car itself, is the engine management computer; another one manages the anti-lock brakes; one for the air conditioning; one for the central locking; one in the radio; and, probably, several more…

These days, embedded systems are increasingly taking over things that used to be done by mechanical controls: washing machines; central heating timers; etc, etc…

Quite possibly, the free toy with the kids meal from a hamburger restaurant contains a tiny embedded system to flash the lights and play the annoying tune!

Hopefully this has given some meaning to the term “embedded system”. They can be big, they can be tiny; they can be essential, they can be trivial - but they are all around us in the modern world!

So long for now,

 Andy.

Antronics Ltd - Embedded Systems Specialists
http://www.antronics.co.uk