UART Raw Access - a very bad example!

The explanation of how to use the UART Raw Access sample is very poor - in particular that it makes no mention whatsoever of the fact that AT+WMFM has to be used to “disable” a UART before it can be “opened” by the sample! :angry:

See: viewtopic.php?f=78&t=4504&p=18186#p18186

Thus the UART specified in the AT+WDU command must be different from the one on which the command is issued!

This must also mean that the sample is unusable on any device with only 1 UART :question:

It also generates 3 warnings in the build - atoi, atol, and isalpha are not prototyped

/***************************************************************************/
/*  Mandatory variables                                                    */
/*-------------------------------------------------------------------------*/
/*  wm_apmCustomStackSize                                                  */
/*-------------------------------------------------------------------------*/
/***************************************************************************/
const u16 wm_apmCustomStackSize = 1024*3;

const adl_InitTasks_t adl_InitTasks [] =
{
    { mtInit, 4096, "MainTask", 2 },
    { stInit, 4096, "SecondTask", 1 },
    { NULL, 0, NULL, 0 }
};

As the application has an adl_InitTasks table, is wm_apmCustomStackSize really mandatory :question:

In fact, is it actually required at all :question: :confused:

It certainly isn’t documented in the ADL User Guide for Open AT® OS v6.21 :angry:
See: viewtopic.php?f=23&t=4514

But isn’t there a trace received when we try to open an already open UART through WDU command which states that this cannot be done…?? i Thought it did… :blush:

All the trace says is that it failed - it does not give any reason for the failure.

This is partly becuase the error reporting from the Device Service itself is pretty pathetic - there’s pretty much just one error code that covers all failures for all reasons! :angry:

oops…!! that means the developer has to waste a lot of time before he actually realizes that the problem is coz the uart was already opened which is certainly not acceptable…

Exactly!

See also: viewtopic.php?f=16&t=2733&hilit=wip+berr#p10154

In addition to the time wasted due to errors in the documentation: viewtopic.php?f=23&t=4521