Select Legato Packages


#1

Hello Guys,
I’m new here. I have issue about how to select packages from legato.
For example: In legato-17.07.1 has a 3rdParty pjsiip. How build it in my legato system?

Regards,
Allyson


#2

Hi @Allyson,

the pjsip is not yet used by any Legato app, but we should have a sample app that uses it soon.


#3

Hi @CoRfr
Ok, But how build this lib?

And I have other problem.
I was re-write module WP8548 and now the system run kernel but get error when initilize filesystem.

How I go to bootloader again to re-write rootfs?

Regards,
Allyson


#4

Hi @Allyson,

for the pjsip lib, you can use externalBuild: http://legato.io/legato-docs/latest/defFilesCdef.html#defFilesCdef_externalBuild

Here is a sample Component.cdef for pjsip:

bundles:
{
    file:
    {
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjlib-util.so /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjlib-util.so.2 /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjmedia-audiodev.so /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjmedia-audiodev.so.2 /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjmedia-codec.so /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjmedia-codec.so.2 /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjmedia.so /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjmedia.so.2 /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjmedia-videodev.so /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjmedia-videodev.so.2 /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjnath.so /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjnath.so.2 /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjsip-simple.so /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjsip-simple.so.2 /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjsip.so /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjsip.so.2 /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjsip-ua.so /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjsip-ua.so.2 /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpj.so /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpj.so.2 /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjsua2.so /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjsua2.so.2 /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjsua.so /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libpjsua.so.2 /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libsrtp.so /usr/lib/
        ${LEGATO_BUILD}/3rdParty/pjsip/lib/libsrtp.so.2 /usr/lib/
    }
}

externalBuild:
{
    "mkdir -p $${LEGATO_BUILD}/3rdParty/pjsip"
    "cp -rf $${LEGATO_ROOT}/3rdParty/pjsip/* $${LEGATO_BUILD}/3rdParty/pjsip"
    "cd $${LEGATO_BUILD}/3rdParty/pjsip && LD= && ./configure --host=$$($$CC -dumpmachine) --prefix=$${LEGATO_BUILD}/3rdParty/pjsip --disable-libwebrtc --disable-sound --disable-resample --disable-oss --disable-video --disable-small-filter --disable-large-filter --disable-speex-aec --disable-l16-codec --disable-gsm-codec --disable-g722-codec --disable-g7221-codec --disable-speex-codec --disable-ilbc-codec --disable-sdl --disable-ffmpeg --disable-v4l2 --disable-openh264 --disable-opencore-amr --disable-silk --disable-opus --disable-libyuv --enable-shared && make dep && make clean && make && make install"
}

As for the bricked WP85, if you are using a mangOH Green, you should be able to put it back into recovery mode through TP1_BOOT on switch 7 @ SW401, cf http://mangoh.io/uploaded-documents/Reference/mangOH%20Green/Discover/Hardware%20User%20Guide/mangOH%20Dev%20Kit%20User%20Guide%20-%20HTML5-Responsive%20HTML5/#t=mangOH_Dev_Kit_User_Guide_-_HTML5%2FHardware%2FHardware.htm&rhsearch=switch&rhhlterm=switch&rhsyns=%20#XREF_26954_SW401_Module

Upon reboot it should be in some kind of ‘recovery mode’ which should allow you to use fdt or swiflash (https://source.sierrawireless.com/resources/airprime/software/swiflash/) to flash a .cwe or .spk that overrides the faulty rootfs.


#5

BTW if you want to have a look at the associated sample app: https://github.com/legatoproject/legato-af/commit/f9d266fb1b24e55c1482d259464a8ec67be56a9b


#6

I can run the application with the following commands on WP76:
app restart streamMedia
app runProc streamMediaTest --exe=rtpTest – AUDIO_PEER 192.168.2.3

After that I install PJSIP 2.7.2 on Ubuntu, and I can hear the microphone from module to transfer to Ubuntu PC via application ./pjsip-apps/bin/samples/x86_64-unknown-linux-gnu/streamutil.
But the sound quality is not good and not clear.

Has anyone tried on WP module with Ubuntu PC for PJSIP audio streaming before?


#7

If I remember correctly, a significant delay is expected given that the whole audio path is quite long and not optimized, even in the app itself.

But as for the audio quality, I can’t remember that being an issue. Do you mean the sound is not well define (bit rate issue?) or does it ‘cut’ from time to time?