How to get wvdial and gammu sms app

Hello
We are using a GSM 3g modem connected via ACM driver support and pppd is working , we can get connection and IP address from the provider. But the pppd dialing is within our app. c code and it blocks whole operation and the program does not continue below. I searched the net and find quote which says “pppd dialing is obsolote”
so where can i get wvdial or how can i obtain its code to cross compile and run on my toradex module? Similar issue is about the sms (short message feature). As you will know Gammu is an app for Sms. how can I get working those packages on my toradex module.

HI @abobow

Thanks for writing to the Toradex Support.

Could you provide the version of the Software of your module?
Which carrier board are you using?

I searched the net and find quote which says “pppd dialing is obsolote” so where can i get wvdial or how can i obtain its code to cross compile and run on my toradex module?

You would need to create a custom image and include the wvdial package into this image.

As you will know Gammu is an app for Sms. how can I get working those packages on my toradex module.

Same as above, add this into the custom image.

You might have a look into our developer article about building a custom image using OpenEmbedded build.

Best regards,
Jaski

Hello @jaski.tx
thank you for response. the linux version which i use on my som is irrelevant, shall we use thud or rocko which is the better choice ? which one do you suggest. The carrier board is colibri eval board but anyhow i will design my own carrier board in the near future. i am a bare metal developer and kind of new to linux. is there a step by step guide for openembedded ? kind regards

Hi @abobow

You are welcome.

shall we use thud or rocko which is the better choice ?

You should use thud with newer kernel and better support.

i am a bare metal developer and kind of new to linux. is there a step by step guide for openembedded ?

Yeah, just follow the developer article above. Further you can also look into the Yocto Manual.

Best regards,
Jaski

Hi @jaski.tx
I did followed the steps mentioned in the manuals above and created and sync my oe-core repo directory. edited local.conf for my colibri-imx6ull machine type.
so how to add wvdial and gammu for my distro and most important how will i configure the kernel for usb - acm driver support? i am really lost please guide me or suggest me some example documents to follow on. warm regards

for being more precise i got the rocko distro installed to my local

Hi

so how to add wvdial and gammu for my distro

You can add the package with the following entry:

IMAGE_INSTALL_append = " wvdial"

Please note the space between " and the package name.

how will i configure the kernel for usb - acm driver support

This will depend on your modem. You might need to create a custom kernel as explained here.

Best regards,
Jaski

hi @jaski
Can you tell me where to add(which file)
IMAGE_INSTALL_append = " wvdial"
and also is it possible to make menuconfig (config kernel) after bitbake build?.. thank you

You need to add this to local.conf.

also is it possible to make menuconfig (config kernel) after bitbake build?

No, you need to do it before bitbake build if you want to do in the bitbake environment. But I strongly recommend you do kernelconfig in the git branch for kernel sources only. For rocko, you need the kernel 4.9.2.3.x branch.

Best regards,
Jaski

Hi @jaski.tx
I have OpenEmbedded and its prerequisites installed. In order to achieve my goal, i need to add image_install_append for wvdial and gammu as you mentioned above. what comes next i really dont know.
how will i get kernel 4.9.2.3.x into my oe-core directory in order to build my linux image with kernel configured before bitbake? Pls elaborate, your instructions are very appreciated. best regards.

HI @abobow

I have OpenEmbedded and its prerequisites installed. In order to achieve my goal, i need to add image_install_append for wvdial and gammu as you mentioned above. what comes next i really dont know.

This is perfect. Next step is to do the compilation (this will take some hours depending on your machine) which will give you an complete image. This image can be installed on the SoM.
Once you boot the SoM with this image, then you need to check if your modem is found by the SoM. This will depend on the modem. Could you tell me which Modem (Company Name, Model, Interface, …) are you using?

Best regards,
Jaski

Hey @jaski.tx
The modem is quectel ug95 interfaced from usb. I managed to get the modem work with a linux distro on toradex som earlier. I downloaded the source code from
git clone -b git://git.toradex.com/linux-toradex.git and made the kernel configuration to apply cdc-acm driver support. But working with pppd blocks our application. I searched the net and wvdial can be used instead of pppd call.
So my problem is, i dont know how to build the linux image via openembedded. I followed the instructions on your web site, and get to a point : how to get the proper linux source codes from git repo and make menuconfig on kernel and build my linux image with wvdial and gammu support. Is bitbake necessary to get wvdial on linux image?
Please guide me
Best Regards

is it the “bitbake -k console-tdx-image” which downloads the source codes from openembedded?

HI @abobow

I followed the instructions on your web site, and get to a point : how to get the proper linux source codes from git repo and make menuconfig on kernel and build my linux image with wvdial and gammu support.

This with menuconfig is not important at the beginning.

Is bitbake necessary to get wvdial on linux image?

Yes. To save time, you could also just create the .ipk package and install it on a regular Bsp 2.8 (rocko) using opkg install wvdial.

Regarding Quectel modem, please have a look here.

Best regards,
Jaski

Hello @jaski.tx

i build earlier “bitbake -k console-tdx-image” and saw wvdial and gammu in archieves under the deploy directory. thats understood and ok.

I am following this article in order to make menuconfig for kernel and customize device tree for my target som.(Patching Kernel in OpenEmbedded). In this article directory “stuff” means “layers” i think and “meta-toradex” is divided to meta-toradex-nxp , meta-toradex-bsp-common … etc.

So to follow patching kernel article , which layer directory is responsible for the kernel or how can i find out the kernel version in order to clone it from git repo and modify it? and then build it of course.
best regards

Hi @abobow

So to follow patching kernel article , which layer directory is responsible for the kernel or how can i find out the kernel version in order to clone it from git repo and modify it? and then build it of course. best regards

Actually there are two ways:
One way is to download the kernel branch in a different folder and compile it using the instructions of this page. This does not involve the Oe-Build and its layers. The kernel branch versions vs Bsp version are listed here.

The other way is use Oe-Build, where the kernel recipe is located here: ./layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_4.9-2.3.x.bb.
To make kernel changes in Oe-Environment follow the Blog you already mentioned.

Best regards,
Jaski

hi @jaski.tx
i am pretty sure i am asking silly questions about this topic but i really lost my way in to building my custom image. I am an application developer and dont know much about customizing kernel and device tree and other stuff about tweaking the hardware configs.
What i want and cant do is,
add wvdial and gammu apps to my zimage,
add ppp filtering support for my GSM modem
and add 2 more uarts and enable some GPIOs in the device tree.
what path should i follow, is there a practical way to do it without openemmbedded/yocto. Or should I insist to over come the steep learning curve of yocto stuff.
please help me. kind regards

hey @jaski.tx

finally i gave up for now with yocto build. you mentioned earlier ;
“Yes. To save time, you could also just create the .ipk package and install it on a regular Bsp 2.8 (rocko) using opkg install wvdial.”
I think you mean I could get the regular linux sources from toradex git repo, do my kernel config, modify device tree and then get packages for wvdial and gammu and install them on my target. right? if so please elaborate how to build and get those packages on my target system?
regards

Hi @abobow

No, there are no silly questions.

What i want and cant do is, add wvdial and gammu apps to my zimage,

wvdial and gammu app is a user application, which is added to the root file system and not to zImage which is the kernel

add ppp filtering support for my GSM modem

For this you need to change the kernel config.

add 2 more uarts and enable some GPIOs in the device tree

For this you will need to do the devicetree customization.

. what path should i follow, is there a practical way to do it without openemmbedded/yocto.

Yocto is just needed to get the wvdial and gammu app. The rest can be done outside Yocto.

Best regards,
Jaski

Hi @abobow

you mentioned earlier ; “Yes. To save time, you could also just create the .ipk package and install it on a regular Bsp 2.8 (rocko) using opkg install wvdial.”

You can type bitbake wvdial and bitbake gammu, to build the packages only. The created packages ( .ipk ) should be under deploy folder as you wrote earlier: i build earlier “bitbake -k console-tdx-image” and saw wvdial and gammu in archieves under the deploy directory. thats understood and ok.

Once you got these packages, then you need to copy them to SoM and install these packages using opkg install wvdial command. For this a regular Bsp (For ex. 2.8b6) should be already installed on the SoM.

I think you mean I could get the regular linux sources from toradex git repo, do my kernel config, modify device tree and then get packages for wvdial and gammu and install them on my target. right?

The kernel sources are only for customising the kernel and don’t contain any application.

if so please elaborate how to build and get those packages on my target system? regards

You don’t build the packages on the SoM, but do the cross compilation using Yocto Environment.

I hope this answers your questions. I understand that at the beginning there is lot of new things you will have to handle, but you will get familiar with all this after following step by step our developer articles.

Let me know, if you have any other questions.

Best regards,
Jaski