Bosch IoT Suite asserted error
응답
16. 5. 13 오후 4:05

Hello,

I am receving the following error when trying to flash the Bosch IoT Suite to my XDK:

 INFO | XDK DEVICE 1: asserted at Filename C:/XDK-Workbench/SDK/xdk110/Libraries/FreeRTOS/BCDS_Customization/../

FreeRTOS/source/portable/MemMang/heap_4.c , line no  309 

I was wondering if anyone else had run into this issue, and if so, how they went about fixing it.

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 5. 17 오전 11:48 as a reply to Jeremy Gatt.

Hello Jeremy,

I have successfully reproduced your issue. The  assertion occured when the application was running on the XDK. In this state the XDK was connected to the Wifi.
Did the assertion occur while building,compiling or running the example ?

Therefore the printed assertion is no error. It indicates that explicit assumptions are violated during the execution of the application. Unfortunatly the assertion indicates that there is a bug in the memory management of freeRTOS in this example.

I will give this to the developers. Therefore I have to ask you for patience till an appropriate solution is available.

Kind regards,
Franjo

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 5. 19 오후 12:11 as a reply to Franjo Stjepandic.

Jeremy and Franjo,

I have been looking into this issue a little bit and would like a bit more information from you.  I have two XDKs I have been using to try an understand this issue a bit better.  One XDK alwasy works properly while the other always fails.  In your cases do you ever see intermittent operation (i.e. does it works sometimes and fail other times or does it alwasy fail)?

Second can you both please open up the XDK (you will need a Torx Screwdriver size T5) and tell me the date stamp on the XDK board and the information located on the TI CC3100 Wi-Fi module?

Thank you for your help, Chris

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 5. 24 오전 11:01 as a reply to Christopher Koch.

Hello Chris,

We tried to launch the IoT Suite step by step following your tutorial. In all cases the XDK failed to connect to the local wifi network. We made the changes in the tutorial as recommended, of course.
I tryed to connect by using a microSD to set the SSID, but it still didn’t connect.

We fixed this bug by hardcoding the SSID and passphrase directly into the according connect function. A manual implementation of DHCP settings without callback was necessary too.

When both parameters are set directly in the .c file the XDK gets a connection to the local wifi network.

But the assertion error came all the time. So it didn't worked once.

The date stamp of our XDKs is:

2202016544-05LO

Kind regards
Franjo

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 5. 19 오후 4:47 as a reply to Franjo Stjepandic.

Franjo,

Thank you for the reply.  I believe you have sent me some info from the Wi-Fi module.  Can you please send me the copper markings located on the XDK board itself.  There should be three lines of text, the last being XDK110.  This should be located on the opposite side of the board from the Wi-Fi module.

With the issue with the microSD and ther SSID, I am glad you got to fix it.  Could you please share this fix with the community as others might run into the same issue.  I am not sure what you did with regard to the manual implementation of the DHCP settings and if I can I would like to add this to the .pdf docuemnt for others to see.

Thanks again, Chris

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 5. 20 오후 12:25 as a reply to Christopher Koch.

Hello Chris,

the informations of the XDK boards are:

04-15-365
1039N02739
XDK110

05-15-941
1039N02739
XDK110

Well, the problem with the SSID and the SDCard seems to be quite a bit bigger than expected.
In every test case the XDK didn't recognize if a SD card is inserted neither isn't inserted.

The issue with the wifi settings still occurs and I tried it with this dummy configuration.

 

#define  CFG_DEFAULT_WLAN_SSID         "mySSID"                                         
#define  CFG_DEFAULT_WLAN_PWD           "myPWD"                                         
#define CFG_DEFAULT_MQTT_BROKER_NAME    "mqtt.bosch-si.com"        
#define CFG_DEFAULT_MQTT_PORT            1833              
                   

            

As you can see in the uploaded picture the parameters for SSID and Wlan PWD didn't change from the default settings in the downloaded file.
Here I tried also several test cases including a clean downloaded version. The issue still remains. I only get the settings fixed when I use a “quick and dirty” hardcoding solution:

 

 if (WLI_SUCCESS == WLI_connectWPA(“mySSID”, “myPassphrase”, NULL))

 

Therefore I wouldn't recommend to include this in the Bosch IoT Suite tutorial. This solution is only a fix to check if the Wifi connects. The problem with the upcoming assertion still remains.

I hope this could help you.

Kind regards,
Franjo

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 5. 20 오후 1:39 as a reply to Franjo Stjepandic.

Franjo,

Thank you for that information.  I will continue to look into the assert issue.  In the meantime could you try and use one of these XDKs and use the LWM2M Example that comes with the XDK workbench?  The XDK I have in the office that fails is also of the 04-15 build, but I noticed on this board it won't connect to any server solution I have (i.e. MQTT via Paho and the Bosch IoT Suite, or LWM2M).  If you also cannot connect to these other solutions, it will be quite telling where the error may be.

With the SSID and PWD fields, you are replacing the SSID and PWD fields with your specific wifi network settings correct?  Using yourNetworkSSIDHere and yourNetworkPWDHere won't connect to a network.  These are just place holders that must be overwritten.

Also what are the names of the text files you place on the SD card?  This name has to match exactly what is written in the tutorial (NCONFIG.txt and DCONFIG.txt).

 

Chris

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 5. 20 오후 4:46 as a reply to Christopher Koch.

Franjo,

Can you pleas replace your sdsActivateWifiMqtt function from the SDS_main_cc.c file with the following code and report back to me the information given in the console window from the new printf function?  This won't fix the issue, it is just giving me some diagnostic information.

 

#include <stdio.h>

static void sdsActivateWifiMqtt(void) {

	OS_taskDelay(5000);
	
    //Example for getting version:
    _u8 pConfigOpt;
    _u8 pConfigLen;
    SlVersionFull ver;
    pConfigOpt = SL_DEVICE_GENERAL_VERSION;
    sl_DevGet(SL_DEVICE_GENERAL_CONFIGURATION,&pConfigOpt,&pConfigLen,(_u8 *)(&ver));
    printf("CHIP %lu\nFW %lu.%lu.%lu.%lu\nPHY %u.%u.%u.%u\nNWP %lu.%lu.%lu.%lu\nROM %u\nHOST %lu.%lu.%lu.%lu\n",
            ver.ChipFwAndPhyVersion.ChipId,
            ver.ChipFwAndPhyVersion.FwVersion[0],ver.ChipFwAndPhyVersion.FwVersion[1],
            ver.ChipFwAndPhyVersion.FwVersion[2],ver.ChipFwAndPhyVersion.FwVersion[3],
            ver.ChipFwAndPhyVersion.PhyVersion[0],ver.ChipFwAndPhyVersion.PhyVersion[1],
            ver.ChipFwAndPhyVersion.PhyVersion[2],ver.ChipFwAndPhyVersion.PhyVersion[3],
            ver.NwpVersion[0],ver.NwpVersion[1],ver.NwpVersion[2],ver.NwpVersion[3],
            ver.RomVersion,
            SL_MAJOR_VERSION_NUM,SL_MINOR_VERSION_NUM,SL_VERSION_NUM,SL_SUB_VERSION_NUM);

	/**** Initialize WIFI ****/
    WNS_initialize();

    /**** Initialize MQTT Client ****/
    MQTT_init();
}

 

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 5. 23 오전 10:27 as a reply to Christopher Koch.

Hello Chris,

I flashed the LWM2M example on the XDK and it connected without any issues. I used the recommended example files for the SD card with the proper values. I passed in the correct wifi information, of course. It isn’t a typo, because the return parameter of the CFG_getWlanSsid function is “yourNetworkSSIDHere”, all the time. Similary with the CFG_getWlanPwd function.  Additionally the wifi connects when I hardcode the SSID and passphrase and the assertion occurs after successfully connecting.
It seems that an object is generated twice during the initialization and triggers the assertion.

I implemented your requested code and got the following line as output:

 INFO | XDK DEVICE 1: FW 0.536895312.536895312.536895320
 INFO | XDK DEVICE 1: PHY 144.3.0.32
 INFO | XDK DEVICE 1: NWP 42405.0.536961356.0
 INFO | XDK DEVICE 1: ROM 25420
 INFO | XDK DEVICE 1: HOST 1.0.0.1

I hope this could help you.

Kind regards,
Franjo

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 5. 23 오전 11:40 as a reply to Franjo Stjepandic.

Franjo,

Thank you for that information.  When you flashed the LWM2M example, how did you confirm connection with the LWM2M server?  Where you able to go log onto the Leshan Server client and view your XDK device?  The output from the XDK can be confusing here as to whether you have connected to the Server or not.  Could you please send me the XDK output into the console so I can confirm.  Please let the device wait a couple of minutes before collecting all the console information.

That is odd that the CFG_getWLanSsid always reports yourNetworkSSIDHere.  This should not be the case and indicats the SD Card files are not being read.  I am not sure what is could be keeping the SD Card from not reading.  The CFG_getWlanSsid reports the SSID being used.  This will report the SD Card value unless the SD Card is not recognized.  I will have to see if I can replicate this issue or not.

Finally, thank you for the information regarding the Wi-Fi module.  This is pretty different from all the modules I am using.  My next step will be to flash the Wi-Fi module with an updated firmware and see if that fixes the issue with my board.  I will get back to you as soon as this is done (hopefully friday as I am on travel the rest of the week).

Thank you, Chris

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 5. 25 오전 8:51 as a reply to Christopher Koch.

Hello Chris,

I confirmed the established connection via the output in the console. Unfortunatly I have no access to a leshan server to make further confirmation. As requested follows the output of the console.

 INFO | XDK DEVICE 1: INIT Starting up
 INFO | XDK DEVICE 1: wlanConnect
 INFO | XDK DEVICE 1:   Ip address of the device 192.168.10.55
 INFO | XDK DEVICE 1:  Network Initialization done
 INFO | XDK DEVICE 1: PAL_initialize
 INFO | XDK DEVICE 1: PAL Initialization done
 INFO | XDK DEVICE 1: PAL_socketMonitorInit
 INFO | XDK DEVICE 1: PAL SocketMonitor done
 INFO | XDK DEVICE 1: IP Address of the Device is 192.168.10.55
 INFO | XDK DEVICE 1: Lwm2mInterface Initialization start
 INFO | XDK DEVICE 1: Lwm2m_initialize
 INFO | XDK DEVICE 1: done
 INFO | XDK DEVICE 1: Lwm2m Interface done
 INFO | XDK DEVICE 1: Lwm2m Interface start with given port
 INFO | XDK DEVICE 1: coap without encryption
 INFO | XDK DEVICE 1: Lwm2m Interface started
 INFO | XDK DEVICE 1: LCA Initialization Done
 INFO | XDK DEVICE 1: Registration process has started
 INFO | XDK DEVICE 1: Registration succeeded

Why is it necessary to confirm this example? I’m not sure but I guess the LWM2M example is based on CoAP and has nothing in common with MQTT except that both use Wi-Fi and TCP. We confirmed that our Wi-Fi chips work, because we implemented other protocols like http, udp and got server connections without any bugs.
As I before explained the Wi-Fi connection establishes when I hardcode the necessary parameters. Therefore I wouldn't suggest that the Wifi hardware or their firmware causes the upcoming issue.

Kind regards
Franjo

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 5. 25 오전 11:55 as a reply to Franjo Stjepandic.

Franjo,

I asked this because the XDK that I have showing this same issue won't connect to any server.  I have tried LWM2M and different versions of MQTT and it always fails.  I can always establish a Wi-Fi connection, but it never connects to the server regardless of the code I am using.  To me, this suggests that the issue is with the Wi-Fi chip or the simplelink stack and not the Bosch IoT Suite code.  I am simply trying to track down where the issue is. 

I have two XDKs that never have an issue with this connection and one that always has this issue.  The FW of the Wi-Fi module is different between these XDKs which lead me to believe that the problem could be with the FW on the Wi-Fi chip.  I also used the J-Link Debugger to walk through the code and the error happens within the simpleink code while the XDK is trying to establish a connection with the MQTT Broker.  This lead me to further believe it could be with the Wi-Fi module or the stack.

All that being said, your XDK doens't have an issue with the LWM2M example, like mine does, which makes me wonder if I was going down the right path or not.  I will continue to look into all the possiblities.

Chris

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 6. 1 오전 11:18 as a reply to Christopher Koch.

Franjo

I have requested your email address from our community administrator.  I have a program I'd like you to run for me to see if it fixes the issue.

I was successful in updating the Wi-Fi module firmware on my XDK and the problem seems to be resolved.  This program will allow you to read the FW version information and upgrade the Wi-Fi module.  It this also solves the issue on your end we will publish the solution on the community.

Christopher Koch

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 6. 14 오후 1:00 as a reply to Christopher Koch.

All,

The latest update of the workbench to version 1.5.2 in conjunction with the latest release of the Bosch IoT Suite Code (found on the website) should fix the asserted error described thorughout this thread.  If anyone notices the issue persisting please let this forum know and we can continue to dive into the issue.

Please update the workbench to version 1.5.2 and follow the pdf for installing the Bosch IoT Suite.

Franjo et al., thank you for your patience and help in solving this issue.

Christopher Koch

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 8. 8 오전 5:48 as a reply to Christopher Koch.

Hello,

Support required.

I am using the latest workbench 1.6.0.

After flashing Bosch_IoT_Suite_v3, first the Yellow LED is lit with Ip address and Mac address displayed in console ( also WiFi Ok ), and after some time, it goes to the same assert error.

asserted at Filename C:/XDK-Workbench/SDK/xdk110/Libraries/FreeRTOS/BCDS_Customization/../FreeRTOS/source/portable/MemMang/heap_4.c , line no  309


Note : latest Bosch_IoT_Suite_v3 used, and just my SD card has config files for Bosch_IoT_Suite and config files for Datalogger ( As I am trying to make one generic application.)

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 8. 8 오후 2:29 as a reply to Kiran Gundmi Srinivasa.

Kiran,

The asserted error would typically indicate that the information for the MQTT Broker is wrong.  We have recently updated this code to version 0.4.0 also, so if you can please download this when it is available on the website over the next couple of days.  This was tested on version 1.6 and working as of this morning.  In the meantime you should check that your Broker name and port number are correct.

Christopher Koch

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 8. 8 오후 11:31 as a reply to Christopher Koch.

Christopher,

Thanks. I will use the latest suite once uploaded for Workbench 1.6.0.

I found that the same XDK once powered On/Off some 2-3 times, then it starts working properly ( Orange LED is ON, and Yellow turns OFF ). So this is a random issue.

Also, once connected I can see the data in IoT application ( Here : The communication is very bad, losses the connection often and is very slow. Note, I am in DC-IA, Wujin, China )

To debug XDK, unfortunately i dont have jTAG adapter and debugger that needs to be purchased. Can you recommend a free version ?!

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 8. 9 오전 11:34 as a reply to Kiran Gundmi Srinivasa.

Kiran,

I am curious about the random asserted error.  Hopefully the updated code will take care of this (which is now up).

The communication issues with the dashboard is likely due to some latency caused by the server location (US) and your location.

For the debugger, I don't know of any free debugger on the market, in all honesty.  So the best I can recommend you do is use printf statements and debug through the console window in the XDK Workbench.  Though I have to warn you for debugging this isn't the best means, as I have noticed sometimes the printf don't always print.

Christopher Koch

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 8. 9 오후 10:26 as a reply to Christopher Koch.

Christopher,

Yes, I am just using printf commands for console, also i observed it does not print some, specially the continous printf commands. Only the last printf executes ( we need to have some logic before any printf )

0 (0 투표)
RE: Bosch IoT Suite asserted error
응답
16. 8. 10 오전 9:30 as a reply to Kiran Gundmi Srinivasa.

Hello Kiran, hello Chris,

As Chris already mentioned, I don’t know of any free debugger either.
If you take care of the printf specifics, printf debugging is possible.
Most important is:
 

  • every printf statement ends with “\n\r” 
  • a delay at the beginning of the code block that you want to debug. This is required because the serial connection needs a short time to be established
  • keep in mind that printfs are not thread safe in embedded environments 


Kind reagards,
Manuel

0 (0 투표)