# FX30 with (WP77xx) with Talon mangOH CAN interface

**URL:** <https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362>\
**Category:** Uncategorized\
**Created:** [August 19, 2020, 2:01am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362 "2020-08-19T02:01:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [August 19, 2020, 2:01am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/1 "2020-08-19T02:01:35Z")

</div>

Hi all,  
I am trying to setup the CAN iot card from talon into the FX30 image.  
For this purpose I have just created a system which includes the kernel module which was found in this repo:

> **[mangOH/linux\_kernel\_modules at master · mangOH/mangOH](https://github.com/mangOH/mangOH/tree/master/linux_kernel_modules)**
>
> master/linux\_kernel\_modules

moduleSearch:  
{  
$LEGATO\_ROOT/drivers/mangoh/can\_common  
}

kernelModules:  
{  
can\_iot.mdef  
}

I can compile the system and to deploy to the target, but once I runt he start\_can.sh I get the error:  
Unload of module can\_iot.ko has been successful.  
sh: write error: Device or resource busy  
Aug 19 01:30:13 fx30s user.info Legato: INFO | supervisor[895]/supervisor T=main | kernelModules.c le\_kernelModule\_Unload() 1784 | Requested to unload module ‘can\_iot.ko’.  
Aug 19 01:30:13 fx30s user.info Legato: INFO | supervisor[895]/supervisor T=main | kernelModules.c le\_kernelModule\_Unload() 1826 | Unloading module, ‘can\_iot.ko’, was successful.  
Could not load the required module, can\_iot.ko. (LE\_FAULT)  
See the device log for details.  
Cannot find device “can0”  
ifconfig: SIOCGIFFLAGS: No such device  
root@fx30s:~# Aug 19 01:30:14 fx30s user.info Legato: INFO | supervisor[895]/supervisor T=main | kernelModules.c le\_kernelModule\_Load() 1720 | Requested to load module ‘can\_iot.ko’.  
Aug 19 01:30:14 fx30s user.info Legato: INFO | supervisor[895]/supervisor T=main | kernelModules.c ExecuteCommand() 244 | Execute '/sbin/insmod /legato/systems/current/modules/can\_iot.ko ’  
Aug 19 01:30:14 fx30s user.crit Legato: _CRT_ | supervisor[895]/supervisor T=main | kernelModules.c ExecuteCommand() 295 | /sbin/insmod /legato/systems/current/modules/can\_iot.ko exited with error code 8.  
Aug 19 01:30:14 fx30s user.err Legato: =ERR= | supervisor[895]/supervisor T=main | kernelModules.c le\_kernelModule\_Load() 1758 | Load module, ‘can\_iot.ko’, failed. (LE\_FAULT)  
Aug 19 01:30:14 fx30s user.err kernel: [1023.175549] can\_iot: version magic '3.18.140 preempt mod\_unload ARMv7 p2v8 ’ should be '3.18.44 preempt mod\_unload ARMv7 p2v8 ’

I can only find reference to the WP76 so I am wondering if the same process applies to the WP77.  
I am stuck now so any help or reference would help.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [August 19, 2020, 2:09am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/2 "2020-08-19T02:09:45Z")

</div>

did you use the correct toolchain for the compilation?  
Seems the version check has problem:

Aug 19 01:30:14 fx30s user.err kernel: [1023.175549] can\_iot: version magic '3.18.140 preempt mod\_unload ARMv7 p2v8 ’ should be '3.18.44 preempt mod\_unload ARMv7 p2v8 ’

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [August 21, 2020, 1:04am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/3 "2020-08-21T01:04:01Z")

</div>

[wp77xx] Toolchain dir = /opt/swi/SWI9X06Y\_02.32.02.00/sysroots/x86\_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [August 21, 2020, 1:20am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/4 "2020-08-21T01:20:01Z")

</div>

maybe it is not for FX30S.  
The latest FW for FX30S is R9.

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [August 21, 2020, 1:29am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/5 "2020-08-21T01:29:28Z")

</div>

do you have a link to that FW?  
Because this is the latest toolchain for 64bits I have found online…

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [August 21, 2020, 1:40am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/6 "2020-08-21T01:40:58Z")

</div>

No, I don’t have as the latest package from LEAF is for the R9 FW (FX30catM)

[https://source.sierrawireless.com/resources/airlink/software\_downloads/fx30-firmware/fx30-firmware-catm/#sthash.PzmOrYM1.dpbs](https://source.sierrawireless.com/resources/airlink/software_downloads/fx30-firmware/fx30-firmware-catm/#sthash.PzmOrYM1.dpbs)

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [August 21, 2020, 1:49am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/7 "2020-08-21T01:49:10Z")

</div>

Ok, so this is a problem with the toolchain not matching the latest firmware revision?  
How do I solve this?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [August 21, 2020, 2:04am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/8 "2020-08-21T02:04:05Z")

</div>

I don’t know if this is the root cause, but you can downgrade your module to the official one and use the toolchain in LEAF.

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [August 21, 2020, 2:35am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/9 "2020-08-21T02:35:06Z")

</div>

ok, I have actually manually installed my dev environment, have also installed leaf but I am working within the legato workspace and suing the “source bin./configlegatoenv”.  
Leaf is installed but I am not running the leaf init…

So… using the toolchain for the wp77xx: ( **FX30 and FX30S CatM** )  
[wp77xx] Toolchain dir = /opt/swi/SWI9X06Y\_02.32.02.00/sysroots/x86\_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi  
which firmware should I downgrade to?  
If I ssh into the FX30S and run the `cm info all` I see this is the firmware actually loaded into the target:  
Firmware Version: SWI9X06Y\_02.32.02.00 c2e98c jenkins 2019/08/30 07:28:21\*

which should match with the toolchain I am using, right?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [August 21, 2020, 5:57am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/10 "2020-08-21T05:57:02Z")

</div>

according to “leaf search”, the latest one is “swi-fx30-catm\_1.0.0”

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [August 21, 2020, 6:10am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/11 "2020-08-21T06:10:17Z")

</div>

oh, I understand but I am not currently using leaf…  
So my question is, if I am using the right toolchain and this matches the firmware in the target, this should not be a problem, correct?  
I can start using leaf, that is not a problem, but I would rather get the the bottom of this problem first as this is only one part of the application and I am working on something else as well…  
So I can save some time.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [August 21, 2020, 6:13am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/12 "2020-08-21T06:13:46Z")

</div>

as said before, I don’t know if this is the root cause, but worth to give a try to match the version check.

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [August 21, 2020, 6:28am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/13 "2020-08-21T06:28:34Z")

</div>

if I do a leaf search for the wp77 target, this is what I see.  
latest one is  
swi-wp77\_3.4.0 │ SDK for WP77 (Release 12 + Legato 20.04.0) │ latest,installed,wp77xx,dev  
Which is what I have installed

$ leaf search wp77  
┌─────────────────────────────────────────────────────────────────────────────────────────────┐  
│ 36 packages - Filter: only master and “wp77” │  
├─────────────────┬─────────────────────────────────────────────┬─────────────────────────────┤  
│ Identifier │ Description │ Tags │  
╞═════════════════╪═════════════════════════════════════════════╪═════════════════════════════╡  
│ swi-wp77\_1.0.0 │ SDK for WP77 (Release 9 + Legato 18.03.0) │ wp77xx,stable │  
│ swi-wp77\_1.2.0 │ SDK for WP77 (Release 9 + Legato 18.05.0) │ wp77xx,dev │  
│ swi-wp77\_1.2.1 │ SDK for WP77 (Release 9 + Legato 18.05.1) │ wp77xx,dev │  
│ swi-wp77\_1.3.0 │ SDK for WP77 (Release 9 + Legato 18.06.0) │ wp77xx,dev │  
│ swi-wp77\_1.3.1 │ SDK for WP77 (Release 9 + Legato 18.06.1) │ wp77xx,dev │  
│ swi-wp77\_1.3.5 │ SDK for WP77 (Release 9.1 + Legato 18.06.1) │ wp77xx,stable │  
│ swi-wp77\_1.4.0 │ SDK for WP77 (Release 9.1 + Legato 18.07.0) │ wp77xx,dev │  
│ swi-wp77\_1.4.2 │ SDK for WP77 (Release 9.1 + Legato 18.07.1) │ wp77xx,dev │  
│ swi-wp77\_1.5.0 │ SDK for WP77 (Release 9.1 + Legato 18.08.0) │ wp77xx,dev │  
│ swi-wp77\_1.6.0 │ SDK for WP77 (Release 9.1 + Legato 18.09.0) │ wp77xx,dev │  
│ swi-wp77\_1.6.1 │ SDK for WP77 (Release 9.1 + Legato 18.09.1) │ wp77xx,dev │  
│ swi-wp77\_1.6.2 │ SDK for WP77 (Release 9.1 + Legato 18.09.2) │ wp77xx,dev │  
│ swi-wp77\_1.7.0 │ SDK for WP77 (Release 9.1 + Legato 18.10.0) │ wp77xx,dev │  
│ swi-wp77\_1.7.4 │ SDK for WP77 (Release 9.1 + Legato 18.10.1) │ wp77xx,dev │  
│ swi-wp77\_1.7.8 │ SDK for WP77 (Release 9.1 + Legato 18.10.2) │ wp77xx,dev │  
│ swi-wp77\_1.7.10 │ SDK for WP77 (Release 9.1 + Legato 18.10.3) │ wp77xx,dev │  
│ swi-wp77\_1.9.0 │ SDK for WP77 (Release 9.1 + Legato 19.01.0) │ wp77xx,dev │  
│ swi-wp77\_1.10.0 │ SDK for WP77 (Release 9.1 + Legato 19.02.0) │ wp77xx,dev │  
│ swi-wp77\_1.11.0 │ SDK for WP77 (Release 9.1 + Legato 19.04.0) │ wp77xx,dev │  
│ swi-wp77\_2.0.0 │ SDK for WP77 (Release 11 + Legato 18.09.2) │ wp77xx,stable │  
│ swi-wp77\_2.0.1 │ SDK for WP77 (Release 11 + Legato 18.09.3) │ wp77xx,dev │  
│ swi-wp77\_2.0.2 │ SDK for WP77 (Release 11 + Legato 18.09.4) │ wp77xx,dev │  
│ swi-wp77\_2.1.1 │ SDK for WP77 (Release 11 + Legato 18.10.3) │ wp77xx,dev │  
│ swi-wp77\_2.3.0 │ SDK for WP77 (Release 11 + Legato 19.01.0) │ wp77xx,dev │  
│ swi-wp77\_2.4.0 │ SDK for WP77 (Release 11 + Legato 19.02.0) │ wp77xx,dev │  
│ swi-wp77\_2.5.0 │ SDK for WP77 (Release 11 + Legato 19.04.0) │ wp77xx,dev │  
│ swi-wp77\_2.7.0 │ SDK for WP77 (Release 11 + Legato 19.07.0) │ wp77xx,dev │  
│ swi-wp77\_3.0.0 │ SDK for WP77 (Release 12 + Legato 19.07.0) │ wp77xx,stable │  
│ swi-wp77\_3.0.1 │ SDK for WP77 (Release 12 + Legato 19.07.1) │ wp77xx,dev │  
│ swi-wp77\_3.1.0 │ SDK for WP77 (Release 12 + Legato 19.09.0) │ wp77xx,dev │  
│ swi-wp77\_3.2.0 │ SDK for WP77 (Release 12 + Legato 19.10.0) │ wp77xx,dev │  
│ swi-wp77\_3.2.1 │ SDK for WP77 (Release 12 + Legato 19.10.1) │ wp77xx,dev │  
│ swi-wp77\_3.3.0 │ SDK for WP77 (Release 12 + Legato 19.11.0) │ wp77xx,dev │  
│ swi-wp77\_3.3.1 │ SDK for WP77 (Release 12 + Legato 19.11.1) │ wp77xx,dev │  
│ swi-wp77\_3.3.2 │ SDK for WP77 (Release 12 + Legato 19.11.2) │ wp77xx,dev │  
│ swi-wp77\_3.4.0 │ SDK for WP77 (Release 12 + Legato 20.04.0) │ latest,installed,wp77xx,dev │  
└─────────────────┴─────────────────────────────────────────────┴─────────────────────────────┘

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [August 21, 2020, 6:32am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/14 "2020-08-21T06:32:29Z")

</div>

if you are going to use WP77 FW instead of official FX30 FW R9.1, then you can treat it as a WP77 module

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [August 21, 2020, 7:11am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/15 "2020-08-21T07:11:16Z")

</div>

I am lost… 🙂 and I need to understand what I am doing…  
So the whole reason to use leaf is to work outside of the legatoworkspace and still to have access to the CLI commands.  
If I am using leaf, is the compiler still using the same toolchain?  
leaf status  
┌─────────────────────────────────────────────────────────────────────────────────────────┐  
│ Workspace: /\*\*\*\*\*/mySystemAws │  
╞═════════════════════════════════════════════════════════════════════════════════════════╡  
│ Profile: FX30stable [current] (sync) │  
├──────────┬─────────────────────┬────────────────────────────────────────────────────────┤  
│ Packages │ Identifier │ Description │  
├──────────┼─────────────────────┼────────────────────────────────────────────────────────┤  
│ Included │ swi-fx30-catm\_1.0.0 │ SDK for FX30-CATM (Release 9.1.1.013 + Legato 18.06.1) │

I have run the mksys and then uploaded the files to the target, still same result when I run the start\_can.sh

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [August 21, 2020, 7:22am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/16 "2020-08-21T07:22:14Z")

</div>

just to make this obvious, this is how I have defined my system:

#include “$LEGATO\_ROOT/default.sdef”

moduleSearch:  
{  
$LEGATO\_ROOT/drivers/mangoh/can\_common  
$LEGATO\_ROOT/drivers/mangoh/can\_9x07  
}

kernelModules:  
{  
mcp251x.mdef  
can\_iot.mdef  
[//can.mdef](https://can.mdef)  
[//can-dev.mdef](https://can-dev.mdef)  
[//can-bcm.mdef](https://can-bcm.mdef)  
[//can-raw.mdef](https://can-raw.mdef)  
[//vcan.mdef](https://vcan.mdef)  
}

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [August 21, 2020, 7:53am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/17 "2020-08-21T07:53:19Z")

</div>

you can install the toolchain which is in this path  
owner@ubuntu:~/leaf/leaf-data/wp77$ ls /home/owner/leaf/leaf-data/wp77/wp77-toolchain  
environment-setup-armv7a-neon-poky-linux-gnueabi  
manifest.json  
site-config-armv7a-neon-poky-linux-gnueabi  
sysroots  
toolChainExtractor.sh  
version-armv7a-neon-poky-linux-gnueabi

And the usual legato framework will be in this path:  
/home/owner/leaf/leaf-data/wp77/fx30-catm-legato

So now you have the toolchain, legato framework, and your mangoh source for your compilation.

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [August 21, 2020, 8:27am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/18 "2020-08-21T08:27:42Z")

</div>

so to install this toolchain:  
poky-swi-ext-glibc-x86\_64-meta-toolchain-swi-armv7a-neon-toolchain-swi-SWI9X06Y\_02.32.02.00.sh  
in this folder which I have created  
~/leaf/leaf-data/wp77

then to setup the leaf on this folder:  
~/leaf/leaf-data/wp77$ leaf setup FX30 -p swi-fx30-catm\_1.0.0

and then at this point I move the folder where my system is here and compile again…?  
Can I ask what is going to be the difference?  
If I am using the same toolchain??

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [August 21, 2020, 8:53am UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/19 "2020-08-21T08:53:56Z")

</div>

I think you got the wrong toolchain version.  
The toolchain for swi-fx30-catm\_1.00 should be wp77-toolchain\_SWI9X06Y\_02.18.05.00-linux64.

owner@ubuntu:~/leaf/leaf-data/wp77$ ls  
fx30-catm-image fx30-catm-linux-image swi-vscode-support  
fx30-catm-legato swi-fx30-catm wp77-modem-image  
fx30-catm-legato-image swi-legato wp77-toolchain  
owner@ubuntu:~/leaf/leaf-data/wp77$ ls ./wp77-toolchain  
environment-setup-armv7a-neon-poky-linux-gnueabi  
manifest.json  
site-config-armv7a-neon-poky-linux-gnueabi  
sysroots  
toolChainExtractor.sh  
version-armv7a-neon-poky-linux-gnueabi  
owner@ubuntu:~/leaf/leaf-data/wp77$ ls ./wp77-toolchain -l  
lrwxrwxrwx 1 owner owner 61 Aug 20 12:08 ./wp77-toolchain → /home/owner/.leaf/wp77-toolchain\_SWI9X06Y\_02.18.05.00-linux64

---

<div class="post-metadata">

**Author:** ![cchenry](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cchenry](https://forum.legato.io/u/cchenry)\
**Post date:** [August 21, 2020, 5:24pm UTC](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362/20 "2020-08-21T17:24:56Z")

</div>

Hi there,  
You need to build the kernel and the module using the same toolchain. The simplest is to rebuild the FX30 yocto image with canbus enabled.

To do this pull the swi-fx30-catm\_1.0.0 leaf identifier to get the R9.1 source code.

The stock WP77 code will run on an FX30 but peripheral functions won’t work.

If you’re able to wait another week or 2, the R11 release is just about ready.

BR,  
Chris

[Next page](https://forum.legato.io/t/fx30-with-wp77xx-with-talon-mangoh-can-interface/5362.md?page=2)
