CAN IoT Card driver

I think we just need to update the sdef. We will check and post the updated sdef later today. Anyways this will work for us and we just need to update a couple of things which we will do by end of the day. :slight_smile:

Ok good !

can you send me the driver (.ko) for wp76 to my email box ?

I will test it

francis.duhaut@fr.enersys.com

@asyal can you provide me the sdef file or modification to do ?

Thanks

Hi,
I got a mangOH red board with the Talon CAN IoT board. Is there a simple (working ;-]) read example? I’ve tried the @Francis.duhaut code and it won’t compile. I also tried the KillSwitch Example compile but did not works. So I made a simple read code:

#include “legato.h”
#include “interfaces.h”

#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <linux/can.h>
#include <linux/can/raw.h>

int soc;
int read_can_port;

int open_port(const char *port)
{
struct ifreq ifr;
struct sockaddr_can addr;

/* open socket */
soc = socket(PF_CAN, SOCK_RAW, CAN_RAW);
if(soc < 0)
{
    return (-1);
}

addr.can_family = AF_CAN;
strcpy(ifr.ifr_name, port);

if (ioctl(soc, SIOCGIFINDEX, &ifr) < 0)
{

    return (-1);
}

addr.can_ifindex = ifr.ifr_ifindex;

fcntl(soc, F_SETFL, O_NONBLOCK);

if (bind(soc, (struct sockaddr *)&addr, sizeof(addr)) < 0)
{

    return (-1);
}
LE_INFO("CAN Is Set");
return 0;

}

void read_port()
{
LE_INFO(“Enter Read Function”);
struct can_frame frame_rd;
int recvbytes = 0;

read_can_port = 1;
while(read_can_port)
{
    printf("Read ... recv:%d\n", recvbytes);
    struct timeval timeout = {1, 0};
    
    fd_set readSet;
    FD_ZERO(&readSet);
    FD_SET(soc, &readSet);

    if (select((soc + 1), &readSet, NULL, NULL, &timeout) >= 0)
    {
        if (!read_can_port)
        {
            LE_INFO("Nothing Received");
            break;
        }
        if (FD_ISSET(soc, &readSet))
        {
            LE_INFO("Something Received");
            recvbytes = read(soc, &frame_rd, sizeof(struct can_frame));
            if(recvbytes)
            {
                LE_INFO("Can Received");
                printf("dlc = %d, data = %s\n", frame_rd.can_dlc,frame_rd.data);

            }
        }
    }

}

}

int close_port()
{
close(soc);
return 0;
}

COMPONENT_INIT
{
LE_INFO(“Open Port”);
open_port(“can0”);
LE_INFO(“Close Port”);
close_port();
LE_INFO(“ReOpen Port”);
open_port(“can0”);
LE_INFO(“Read CAN”);
read_port();
LE_INFO(“Quit App”);
}

It compile, I launch the shell script before running app but i got this error:

swi-mdm9x28-wp user.notice kernel: [ 96.220890] audit: type=1400 audit(315964898.251:4): lsm=SMACK fn=smack_inode_getattr action=denied subject=“app.testCan” object=“admin” requested=r pid=1952 comm=“testCan” path=“pipe:[9211]” dev=“pipefs” ino=9211

Any Idea on what appends? Or better a simple working example? Does someone have reached add a can-utils layer in the yocto configuration? It also lacks a lot of documentation about it.

Hello Jean,

Do you use the latest VM available on MangOH website to build the mangoHRed update ?

in the mangOH.sdef you need to uncomment this line:

// Uncomment to include support for the CAN IoT card
#include "sinc/can_iot_card.sinc" 

After you can flash the update file to the mangOH red.

I use this script to initiliaze the bus to 500kbps:

#!/bin/sh

export PATH=$PATH:/sbin

drv_file=`find /legato/systems/current/modules/ -name "*mcp251x.ko"`
drv=`basename $drv_file`
# remove the driver
rmmod $drv

# Take IoT card out of reset
echo 2 > /sys/class/gpio/export
echo out  > /sys/class/gpio/gpio2/direction
echo 1  > /sys/class/gpio/gpio2/value

# Enable level shifter on the CAN IoT card
echo 13 > /sys/class/gpio/export
echo out  > /sys/class/gpio/gpio13/direction
echo 1  > /sys/class/gpio/gpio13/value

# Bring driver back & iproute2 add in CAN
insmod $drv_file
ip link set can0 type can bitrate 500000 triple-sampling on
ifconfig can0 up  

See example of code to manage socketcan

COMPONENT_INIT
{
    can_connect("can0");
    // ...
}

File can.c

#include <net/if.h>
#include <sys/ioctl.h>
#include <linux/can.h>
#include <linux/can/raw.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>


#define INTERFACE_NAME_SIZE 15
#define	CHG_TX_STS			0x610
#define	CHG_TX_ACT			0x611
#define	BMS_CHRGR_CTL		0x618
#define	BMS_SOC_DATA		0x302
#define	BMS_BATTP_DATA	0x306
#define	BMS_BATP_DATA		0x308
#define	BMS_BATU_DATA		0x309

int bitrate;
int sdw;					// socket descriptor write
int sdr;					// socket descriptor read
int nbytesReceive;
bool canwrite;
char name[INTERFACE_NAME_SIZE];
struct can_frame frameRead;
struct can_frame frameWrite;

   int can_connect(const char *interface);
   int can_disconnect(void);
   int can_send(void);
   int can_receive(void);

   void can_sendSensorData (void);

int can_connect(const char *interface)
{
	struct sockaddr_can addr;
	struct ifreq ifr;
    int sock_buf_size;

    sock_buf_size = 1000;


	// if interface string is long we will cut it
	if(strlen(interface)>INTERFACE_NAME_SIZE)
	{
		memcpy(name,interface,INTERFACE_NAME_SIZE);
		name[INTERFACE_NAME_SIZE-1]='\0';
	}
	else
	{
    	strcpy(name,interface);
	}

	// SOCKET FOR READING
	if ((sdr = socket(PF_CAN, SOCK_RAW, CAN_RAW)) < 0)
	{
		return SOCKET_ERROR;
	}

    addr.can_family = PF_CAN;

	strcpy(ifr.ifr_name, name);
	if (ioctl(sdr, SIOCGIFINDEX, &ifr) < 0)
	{
		return SOCK_IOCTL_ERROR;
	}

	addr.can_ifindex = ifr.ifr_ifindex;


	if (bind(sdr, (struct sockaddr *)&addr, sizeof(addr)) < 0)
	{
		return SOCK_BINDING_ERROR;
	}

    // Filter
    struct can_filter rfilter[7]; int i = 0;
    rfilter[i].can_id  = CHG_TX_STS;
    rfilter[i].can_mask = CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG; i++;
    rfilter[i].can_id   = CHG_TX_ACT;
    rfilter[i].can_mask = CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG; i++;
    rfilter[i].can_id   = BMS_CHRGR_CTL;
    rfilter[i].can_mask = CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG; i++;
    rfilter[i].can_id   = BMS_SOC_DATA;
    rfilter[i].can_mask = CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG; i++;
    rfilter[i].can_id   = BMS_BATTP_DATA;
    rfilter[i].can_mask = CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG; i++;
    rfilter[i].can_id   = BMS_BATP_DATA;
    rfilter[i].can_mask = CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG; i++;
    rfilter[i].can_id   = BMS_BATU_DATA;
    rfilter[i].can_mask = CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG; i++;
    setsockopt(sdr, SOL_CAN_RAW, CAN_RAW_FILTER, &rfilter, sizeof(rfilter));

    // SET SOCKET BUFFER SIZE
    setsockopt(sdr, SOL_CAN_RAW, SO_RCVBUF, (char *)&sock_buf_size, sizeof(sock_buf_size));

	// SOCKET FOR WRITING
	if ((sdw = socket(PF_CAN, SOCK_RAW, CAN_RAW)) < 0)
	{
		return SOCKET_ERROR;
	}
    addr.can_family = PF_CAN;

	strcpy(ifr.ifr_name, name);
	if (ioctl(sdw, SIOCGIFINDEX, &ifr) < 0)
	{
		return SOCK_IOCTL_ERROR;
	}
	addr.can_ifindex = ifr.ifr_ifindex;


	if (bind(sdw, (struct sockaddr *)&addr, sizeof(addr)) < 0)
	{
		return SOCK_BINDING_ERROR;
	}

    // SET SOCKET BUFFER SIZE
    setsockopt(sdw, SOL_CAN_RAW, SO_SNDBUF, (char *)&sock_buf_size, sizeof(sock_buf_size));

    //READ SOCKET NON-BLOCKING
    int flags;
    if (-1 == (flags = fcntl(sdr, F_GETFL, 0))) flags = 0;
    fcntl(sdr, F_SETFL, flags | O_NONBLOCK);

    return 0;
}

int can_disconnect(void)
{
	close(sdw);
	close(sdr);
	return 0;
}


int can_send(void)
{
    int nbytesWrite;

    // USE SEND STANDARD FRAME
    frameWrite.can_id = 0x600;
    frameWrite.can_id &= CAN_SFF_MASK;

    frameWrite.can_dlc = 8;
    strcpy((char *)frameWrite.data, "MGATE");

    if ((nbytesWrite = write(sdw, &frameWrite, sizeof(frameWrite))) != sizeof(frameWrite))
	{
        canwrite = false;
        LE_INFO ("Writing error");
		return SOCK_WRITING_ERROR;
	}

    can_sendSensorData();

    canwrite = true;
	return 0;
}

int can_receive(void)
{
	nbytesReceive = 1;
	while (nbytesReceive != 0)
	{
		if ((nbytesReceive = read(sdr, &frameRead, sizeof(frameRead))) != sizeof(frameRead))
			{
				return SOCK_READING_ERROR;
			}
		    else
		    {
		    	LE_INFO("Receive message %X %X %X %X %X %X %X %X %X", frameRead.can_id, frameRead.data[0], frameRead.data[1], frameRead.data[2], frameRead.data[3]
				 , frameRead.data[4], frameRead.data[5], frameRead.data[6], frameRead.data[7]);
		    }
	}


	return 0;
}


void can_sendSensorData (void)
{
	int i;
	int nbytesWrite = 0;

	for (i=0; i< 10; i++)
	{
		
		{
			frameWrite.can_id = 0x600 + i + 1;
			frameWrite.can_id &= CAN_SFF_MASK;
			frameWrite.can_dlc = 8;
			memset(&frameWrite.data[0], 0x00, 8);
			frameWrite.data[0] = 0x01;
			frameWrite.data[1] = 0x02;
			frameWrite.data[2] = 0x03;
			frameWrite.data[3] = 0x04;
			frameWrite.data[4] = 0x05;
			frameWrite.data[5] = 0x06;
                    // ...

			if ((nbytesWrite = write(sdw, &frameWrite, sizeof(frameWrite))) != sizeof(frameWrite))
			{
			        canwrite = false;
			        return;
			}
		}
	}
}

Hi,
Thanks for your fast Response. :slightly_smiling_face:
I did not use the VM. I’ve follow this:

Tutorial

To set my dev environnement. The example you give me did not compile cause of:
cc1: all warnings being treated as errors

Even with cflags:{ -Wno-error} in my cdef.

Including those kind of errors:

warning: implicit declaration of function ‘LE_INFO’ [-Wimplicit-function-declaration]
LE_INFO (“Writing error”);

Edit: Sorry I did not add legato.h now I don’t have LE_* errors.

I will give it a try Thanks a lot.

I have uncommented the line sinc/can_iot_card.sinc in mangOH.sdef, I’ve used the shell script you provide.

The two lines:

echo 2 > /sys/class/gpio/export
echo 13 > /sys/class/gpio/export

Tells me “sh: write error: Device or resource busy”
can0 is shown in ifconfig i can set down/up, also the ip link command works.

But I cannot receive or send CAN frame. No errors just no Frames (I use a PEAK can/usb with can-utils tools, candump, cansend, … to monitor the bus)

nbytesReceive stay at -1 so I think the socket is not binded and the read() function always fail.

Is a way to have more debug option (gdb?) than printf? Or not use Legato at all?

Edit: the log when device busy append:

6 04:30:52 swi-mdm9x28-wp user.debug kernel: [12623.612579] gpio_sync_ri: RI owner is Modem
Jan 6 04:30:52 swi-mdm9x28-wp user.debug kernel: [12623.612602] gpio_map_name_to_num: find GPIO 38
Jan 6 04:30:52 swi-mdm9x28-wp user.debug kernel: [12623.612612] export_store: Export GPIO: 38
Jan 6 04:30:52 swi-mdm9x28-wp user.debug kernel: [12623.612625] gpio-38 (sysfs): gpiod_request: status -16
Jan 6 04:30:52 swi-mdm9x28-wp user.debug kernel: [12623.612634] export_store: Status -16
Jan 6 04:30:52 swi-mdm9x28-wp user.debug kernel: [12623.613250] gpio_sync_ri: RI owner is Modem
Jan 6 04:30:52 swi-mdm9x28-wp user.debug kernel: [12623.613269] gpio_map_name_to_num: find GPIO 76
Jan 6 04:30:52 swi-mdm9x28-wp user.debug kernel: [12623.613279] export_store: Export GPIO: 76
Jan 6 04:30:52 swi-mdm9x28-wp user.debug kernel: [12623.613291] gpio-76 (sysfs): gpiod_request: status -16
Jan 6 04:30:52 swi-mdm9x28-wp user.debug kernel: [12623.613301] export_store: Status -16
Jan 6 04:30:52 swi-mdm9x28-wp user.warn kernel: [12623.645099] spi1.0 supply vdd not found, using dummy regulator
Jan 6 04:30:52 swi-mdm9x28-wp user.warn kernel: [12623.645190] spi1.0 supply xceiver not found, using dummy regulator

Do you use the spibus spi1.0 on the mangoh?

it seems to have conflict…
I will have a look next monday with a mangohRed + WP7607

The script to start the can have changed on latest mangoh build.
The driver name is now “can_iot.ko”

You can find the script in mangOH/linux_kernel_modules/can_common/start_can.sh

#!/bin/sh



# It seems that taking the IoT card out of reset fails in the core

# mangOH driver - but placing things after user-space has fully started

# and through the SWI gpiolib-sysfs code works - TODO fix and move into

# the core driver so no shell script is needed.

# Thus, we remove the inserted chip driver and bring it back.



usage () {

    echo "\"$0 board [slot]\" where board is \"green\" or \"red\" and slot is \"0\" or \"1\""

}



if [ "$#" -lt 1 ]; then

    usage

    exit 1

fi



if [ "$#" -gt 2 ]; then

    usage

    exit 1

fi



drv="can_iot.ko"

# remove the driver

kmod unload $drv



board=$1

if [ "$board" = "green" ]; then

    slot=0

    if [ "$#" -eq 2 ]; then

	slot=$2

    fi



    if [ "$slot" -eq 0 ]; then

	# Output 1 to IoT slot 0 GPIO2

	echo 33 > /sys/class/gpio/export

	echo out > /sys/class/gpio/gpio33/direction

	echo 1 > /sys/class/gpio/gpio33/value

	# Route SPI to IoT slot 0

	mux 4

	# Reset IoT slot 0

	mux 15

    elif [ "$slot" -eq 1 ]; then

	# Output 1 to IoT slot 0 GPIO2

	echo 7 > /sys/class/gpio/export

	echo out > /sys/class/gpio/gpio7/direction

	echo 1 > /sys/class/gpio/gpio7/value

	# Route SPI to IoT slot 1

	mux 5

	# Reset IoT slot 1

	mux 16

    else

	echo "Invalid or unsupported slot $slot"

	exit 1

    fi



elif [ "$board" = "red" ]; then

    # Enable level shifter on the CAN IoT card by driving IoT GPIO2 high

    echo 13 > /sys/class/gpio/export

    echo out > /sys/class/gpio/gpio13/direction

    echo 1  > /sys/class/gpio/gpio13/value



    # Take IoT card out of reset

    echo 2 > /sys/class/gpio/export

    echo out > /sys/class/gpio/gpio2/direction

    echo 1  > /sys/class/gpio/gpio2/value



    # Give a bit of time for the IoT card to come out of reset before loading drivers

    sleep 1

fi





# Bring driver back & iproute2 add in CAN

kmod load $drv

ip link set can0 type can bitrate 125000 triple-sampling on

ifconfig can0 up

Hi,
Thanks for your help but it still did not work. I got thoses errors with the new start_can.sh:

Jan 6 01:01:36 swi-mdm9x28-wp user.warn Legato: -WRN- | UNKNOWN[1900]/framework T=main | LE_FILENAME le_ref_CreateMap() 149 | Map name ‘refle_kernelModule_ClientHandlers’ truncated to ‘refle_kernelModule_ClientHandle’.
Jan 6 01:01:36 swi-mdm9x28-wp user.info Legato: INFO | supervisor[855]/supervisor T=main | kernelModules.c le_kernelModule_Unload() 1515 | Requested to unload module ‘can_iot.ko’.
Jan 6 01:01:36 swi-mdm9x28-wp user.info Legato: INFO | supervisor[855]/supervisor T=main | kernelModules.c le_kernelModule_Unload() 1557 | Unloading module, ‘can_iot.ko’, was successful.
Jan 6 01:01:36 swi-mdm9x28-wp user.debug kernel: [ 66.849204] gpio_sync_ri: RI owner is Modem
Jan 6 01:01:36 swi-mdm9x28-wp user.debug kernel: [ 66.849235] gpio_map_name_to_num: find GPIO 76
Jan 6 01:01:36 swi-mdm9x28-wp user.debug kernel: [ 66.849246] export_store: Export GPIO: 76
Jan 6 01:01:36 swi-mdm9x28-wp user.debug kernel: [ 66.849276] gpio_sync_ri: RI owner is Modem
Jan 6 01:01:36 swi-mdm9x28-wp user.debug kernel: [ 66.849290] gpiod_export: sierra–find GPIO,chipdev = -824016368,chipngpio = 80,chipbase = 0
Jan 6 01:01:36 swi-mdm9x28-wp user.debug kernel: [ 66.851253] gpio_sync_ri: RI owner is Modem
Jan 6 01:01:36 swi-mdm9x28-wp user.debug kernel: [ 66.851279] gpio_map_name_to_num: find GPIO 38
Jan 6 01:01:36 swi-mdm9x28-wp user.debug kernel: [ 66.851291] export_store: Export GPIO: 38
Jan 6 01:01:36 swi-mdm9x28-wp user.debug kernel: [ 66.851317] gpio_sync_ri: RI owner is Modem
Jan 6 01:01:36 swi-mdm9x28-wp user.debug kernel: [ 66.851331] gpiod_export: sierra–find GPIO,chipdev = -824016368,chipngpio = 80,chipbase = 0
Jan 6 01:01:37 swi-mdm9x28-wp user.warn Legato: -WRN- | UNKNOWN[1904]/framework T=main | LE_FILENAME le_ref_CreateMap() 149 | Map name ‘refle_kernelModule_ClientHandlers’ truncated to ‘refle_kernelModule_ClientHandle’.
Jan 6 01:01:37 swi-mdm9x28-wp user.info Legato: INFO | supervisor[855]/supervisor T=main | kernelModules.c le_kernelModule_Load() 1451 | Requested to load module ‘can_iot.ko’.
Jan 6 01:01:37 swi-mdm9x28-wp user.info Legato: INFO | supervisor[855]/supervisor T=main | kernelModules.c ExecuteCommand() 211 | Execute ‘/sbin/insmod /legato/systems/current/modules/can_iot.ko’
Jan 6 01:01:37 swi-mdm9x28-wp user.debug kernel: [ 67.926232] gpio_sync_ri: RI owner is Modem
Jan 6 01:01:37 swi-mdm9x28-wp user.debug kernel: [ 67.926263] gpiod_export: sierra–find GPIO,chipdev = -824016368,chipngpio = 80,chipbase = 0
Jan 6 01:01:37 swi-mdm9x28-wp user.warn kernel: [ 67.929046] spi1.0 supply vdd not found, using dummy regulator
Jan 6 01:01:37 swi-mdm9x28-wp user.warn kernel: [ 67.929160] spi1.0 supply xceiver not found, using dummy regulator
Jan 6 01:01:37 swi-mdm9x28-wp user.info Legato: INFO | supervisor[855]/supervisor T=main | kernelModules.c InstallEachKernelModule() 952 | New kernel module ‘can_iot.ko’
Jan 6 01:01:37 swi-mdm9x28-wp user.info Legato: INFO | supervisor[855]/supervisor T=main | kernelModules.c le_kernelModule_Load() 1485 | Load module, ‘can_iot.ko’, was successful.
Jan 6 01:01:37 swi-mdm9x28-wp user.info kernel: [ 67.943947] can_iot_init: mcp2515 (gpio:79 irq:131).

I think this is the relevant part:

Jan 6 01:01:37 swi-mdm9x28-wp user.warn kernel: [ 67.929046] spi1.0 supply vdd not found, using dummy regulator
Jan 6 01:01:37 swi-mdm9x28-wp user.warn kernel: [ 67.929160] spi1.0 supply xceiver not found, using dummy regulator

Does anyone can provide a simple read/write exemple for the mangOH red wp7607 with CAN board? With all the conf files (*.sdef, *.adef, *.cdef) than I’m pretty sure I missunderstood. And also the start.sh script, and the version of the legato firmware it works on. Or something more reliable than pieces of code in a forum not able to handle code quotes?

I must feel angry but your help is very appreciated and Im complaint about Legato/Sierra not forumers. :wink:

Hi,
Thanks all for your appreciate help.

1 Like

Hello,

I have a Talon CAN bus IoT board working on an FX30 3G (WP85xx).
Now I’m trying to migrate the system to an FX30 LTE (WP7702), but I’m having issues bringing the interface up.
I compiled the system with the Kernel Modules specified for this chip and I got it loaded, but I cannot find the correct GPIO that brings the board up.

root@swi-mdm9x28-wp:~# lsmod
Tainted: G
mcp251x 9636 0 - Live 0xbf004000 (O)
can_iot 1072 0 - Live 0xbf000000 (O)

[ 14.658633] can_iot_init: mcp2515 (gpio:79 irq:131).
[ 14.731595] spi1.0 supply vdd not found, using dummy regulator
[ 14.731692] spi1.0 supply xceiver not found, using dummy regulator

I tried to set the same GPIOs that I have before for the WP85xx (33 and 6), but the system shows me:

root@swi-mdm9x28-wp:~# ip link set can0 type can bitrate 500000 triple-sampling on
Cannot find device “can0”

Is there anyone that could help me with that?

Thank you very much!

Hi,

Just an update. I could figure out the issue doing multiple testings.
Here is the script that I have to use with the WP7702 on FX30:

#!/bin/sh

# It seems that taking the IoT card out of reset fails in the core
# mangOH driver - but placing things after user-space has fully started
# and through the SWI gpiolib-sysfs code works - TODO fix and move into
# the core driver so no shell script is needed.
# Thus, we remove the inserted chip driver and bring it back.

drv=“can_iot.ko”
drv2=find /legato/systems/current/modules/ -name "*mcp251x.ko"
# remove the driver
/mnt/legato/system/bin/kmod unload $drv
/sbin/rmmod mcp251x

# Take IoT card out of reset
echo 6 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio6/direction
echo 1 > /sys/class/gpio/gpio6/value

# Enable level shifter on the CAN IoT card
echo 33 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio33/direction
echo 1 > /sys/class/gpio/gpio33/value

# Give a bit of time for the IoT card to come out of reset before loading drivers
sleep 1

# Bring driver back & iproute2 add in CAN
/mnt/legato/system/bin/kmod load $drv
/sbin/insmod $drv2
/sbin/ip link set can0 type can bitrate 500000 triple-sampling on
/sbin/ifconfig can0 up

Hello

I have restart project with wp7607 firmware R12 and legato 19.01.
I use it the same script and it work fine.

I just uncomment in mangoh.sdef file the latest line.

Francis.

Hi, did you resolve this problem? I uncommented the last line of mangoh.sdef file, but this is the result:

I don’t understand which is the cause :pensive: