UART not reliable on legato 19.07

We are working on new project and we were testing our app on mangOH Red with processor WP8548 and legato 18.6.3. We compiled the project for legato 19.07 and uploaded it to mangOH yellow. We have noticed, we have got massive problem with UART on mangOH yellow. The code which was working on mangOH red without problems has become unreliable on mangOH yellow.
Symptoms:
When we send 5-8 bytes to mangOH yellow via UART1 ( IoT slot ) event UartHandler fires but no data is read (read function returns 0 bytes ‘No Data’ straight away )

void UartHandler(int FD, short Event)
{
	if (Event & POLLIN)
	{
		uint8_t u8RxByte;
		if (read(FD, &u8RxByte, sizeof(u8RxByte)) > 0)
		{
			LE_INFO("Byte read");
		}
		else
		{
			LE_INFO("No Data");
		}
	}
}

When we send small packets ( 5-8 bytes ) of data every 500ms, first packet or first bytes are ignored, but later system works fine and next packets of data are read correctly
When we send small packets ( 5-8 bytes ) of data every 60s usually everything is ignored. The event fires but no data coming to the system.

The problem does not exist on mangOH red as I said before.

I do not know if the problem is related to unit or legato framework, so I have also created a topic on mangOH forum.

I think, it is legato 19.07 problem, not the unit. I have uploaded legato 18.6.1 to mangOH yellow and it is ok now.

UPDATE:
I have come back from legato 18.6.1 to legato version 19.07. When I installed 19.07, UART started to work without issues. Luckily I have got 2 mangOH yellow. First mangOH yellow has got original legato 19.07, second one has got legato 19.07 which I have just reinstalled (from 18.6.1). UART on device with original legato does not work correctly, but works ok on device with reinstalled legato 19.07.
I tried to keep UART awake and I used Power Managment functions:

le_pm_NewWakeupSource
le_pm_StayAwake
and
le_fdMonitor_SetDeferrable

NO EFFECT.

I have got 2 the same units with legato 19.07. One works fine second does not. There are settings somewhere to keep UART awake.

@TheGod,

From where you have got the new legato 19.07?
Can you share the result of “legato version” for both mangoh_yellow please?

Hi,
I have got mangOH yellow. The mango comes with Legato 19.07.0_c8105fef6769b17540226029a5d23d44_modified (it does not work correctly . I reinstalled legato 19.07 form VScode.

@TheGod, after that you kept the mangoh apps? or you lost them?

I lost mango and Octave apps.

Hi, here are the steps to follow to build a mangoh_yellow image :

Start by installing leaf , if you haven’t already, and add the mangOH Yellow leaf “remote” repository URL to your leaf configuration as @asyal mentioned above (and I’ll now repeat):

leaf remote add mangOH https://downloads.sierrawireless.com/mangOH/leaf/mangOH-yellow.json --insecure

You only have to do that once, and future releases that we post there will automatically become available to you and appear when you search for mangOH packages.

note: Don’t be alarmed by the --insecure option to the leaf remote add command. That just tells leaf not to use GPG to verify the integrity of the downloaded files. TLS is still being used to “secure” the download connection.

To “search” for the latest mangOH leaf packages:

$ leaf search -t mangOH
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                             1 package - Filter: only master and +mangOH                                                              │
├────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────┬──────────────────────────────────────────────┤
│         Identifier         │                                       Description                                        │                     Tags                     │
╞════════════════════════════╪══════════════════════════════════════════════════════════════════════════════════════════╪══════════════════════════════════════════════╡
│ mangOH-yellow-wp77xx_0.2.3 │ SDK for mangOH yellow with wp77xx, based on Legato version 19.07.0 and wp77xx release 12 │ latest,installed,mangOH,yellow,wp77xx,Octave │
└────────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────────────┘

To set up the current directory as a workspace for mangOH yellow development:

  1. Make it a leaf workspace, configured with the mangOH Yellow development package:
    $ leaf setup -p mangOH-yellow-wp77xx_0.2.3
  2. Clone the mangOH source code into it:
    $ git clone --recursive https://github.com/mangOH/mangOH
  3. Download a copy of the Bosch Bsec library (which is needed by the environmental sensor app) and unpack it under mangOH/components/boschBsec :
    $ cd mangOH/components/boschBsec
    $ wget https://community.bosch-sensortec.com/varuj77995/attachments/varuj77995/bst_community-mems-forum/44/1/BSEC_1.4.7.2_GCC_CortexA7_20190225.zip
    $ unzip BSEC_1.4.7.2_GCC_CortexA7_20190225.zip

Now you’ve got everything you need onto your PC, but before you run the build, you need to set up your shell environment correctly. You can do this by entering the leaf shell:
$ leaf shell
This will automatically configure your shell to know where your Legato, toolchain, etc. are all located.

Now you’re ready to build. Change directory to the root of the mangOH directory and run
$ make yellow