Hello there. 


I just got another new XDK 110 and it came with firmware 1.1.0. My previous XDK 110 was on version 0.0.9 and it broke, dropped it and the whole case came off. Now, I am now having trouble uploading my old source codes that I used previously on the old XDK, onto the new XDK 110. Whenever I try to flash the source codes on the 0.0.9, it works flawlessly, whereas on the 1.1.0, I always get compilation error. Please advice on how to get around this, or to downgrade the firmware version of the new XDK 110.

Currently, I am on workbench ver 3.1.0.

 

I also want the XDK 110 to save temperature data into SD card which is inserted into XDK. Then I want XDK 110 to scan the temperature data and find a temperature which exceeds (for eg: 40 degrees celcius). Once the temperature is reached, I want it to trigger and open up a 
link from a website of mine. I want to link this to the MQTT Paho, and Bosch XDK Portal demo. If this is possible, can you guide me on a way to reach to this point? Will appreciate it, thanks in advance!

Danial

Thanks in advance! 

 

Danial

0 (0 Votes)
RE: XDK firmware issues & SD card save data
Answer
1/8/18 1:15 PM as a reply to Danial Rohmat.

Hello Danial,

glad to hear that you have acquired another XDK to further improve your application.

Regarding the different versions of the XDK, could you please tell me the compilation error's message that appears in the console? In general, those version numbers reflect the bootloader version. The bootloader is only relevant when flashing and booting the application on the XDK.

The compilation process should have the same effect, regardless of the bootloader version. I assume, that you might receive the message Invalid Application when you try to flash the application onto your new XDK.

In that case, the most commonly used solution is:

  • right-click the project in the Project Explorer
  • browse down to Configure
  • select Add XDK Nature

In regards to your use case, I would recommend to read through the guides for SD Card and Sensors for any details on implementing the temperature sensor and writing data to the SD card. You can find the guides in the Learning section .

As for the other part of your use case, how do you intend to open up a link from a website . Do you mean to send an HTTP request to a specific website from the XDK? In that case, I would recommend to read through the HTTP / Rest guide, which you can also find in the Learning section. If this is not the case, could you please elaborate how you intend to access your website from the XDK?

If you intend to integrate this functionality into the MQTT Paho / Bosch XDK Portal demo, you have to keep in mind that you most likely do not have to initialize the temperature sensor or connect to WiFi again in the new code, since that is already part of those demos. Otherwise, extending the demos with your own implementation is definitely possible.

Please tell me if this was helpful, and do not hesitate to ask further questions.

Kind regards,
Franjo

 

0 (0 Votes)
RE: XDK firmware issues & SD card save data
Answer
1/8/18 4:38 PM as a reply to Franjo Stjepandic.

Hello.

 

Thanks for the reply. I have tried for quite some time and I realised that the source codes can only be used in the XDK Workbench 2.0.1 and not the latest one. Basically, in the new XDK Workbench that I had tried, with adding XDK nature, I got the codes to flash into the XDK but it will not run. No lights will show and in the XDK Workbench, there would be a C at the progress panel below, followed by Success and disconnect, and then connect as Application, but the code doesn't run in it.
I am currently re-downloading the XDK Workbench 2.0.1 from your website and it has been taking me almost 3 hours with only 344/536mb completed. Did this before and it failed while I left it overnight, hence I would like to kindly ask you to split up the files for me so I can download faster. Workbench 2.0.1 64 bit. 

 

About my other case, I am using httpexample with ThinkSpeak. I am sending temperature and light data from the XDK to ThingSpeak and then to my own website to "monitor the temperature and other equipments of the industry we are working on", but tentatively we are trying to get the XDK save the temperature data into the SD card which will be inserted into the XDK. It then scans the temperature and if it exceeds a certain temperature, it will then rigger a URL which will open up once the temperature hits the set limit. Basically it's like automated monitoring and then notification. 

I have also took my time to read the guides but I have yet to understand most of the parts on where to add in the souce code etc. Please do enlighten and guide me on this.

 

I also have one last final issue. The "https://bcds.bosch-si.com/" website for the XDK Portal is not working for about almost 5 days already for me, and on other computers too. We keep on getting the error as attached in the image. What is the issue here and how do I get a workaround to this? Please do advice and hope to hear from you real soon!

 

Best wishes

Danial

0 (0 Votes)
RE: XDK firmware issues & SD card save data
Answer
1/9/18 3:12 PM as a reply to Danial Rohmat.

Hello Danial,

I am always glad to help.

Regarding the new XDK-Workbench, I guess that you have tried to import a project from the XDK-Workbench version 2.0.1 to 3.X.X.

If that is the case, then you need to adapt the main.c file of the project, you want to import into the XDK-Workbench 3.X.X. This is necessary because the way the application starts up had changed during the update from the XDK-Workbench 2.0.1 to 3.0.0. This makes the content of main.c from 2.0.1 unusable in 3.0.0+. The easiest approach is to create a new empty XdkApplicationTemplate and to copy the content of the automatically generated Main.c file into the main.c file of your old project.

Additionally, you need to adjust the signature and implementation of appInitSystem() as follows:.
 

void appInitSystem(void * CmdProcessorHandle, uint32_t param2)
{
    if (CmdProcessorHandle == NULL)
    {
        printf("Command processor handle is null \n\r");
        assert(false);
    }
    BCDS_UNUSED(param2);
   // Your code here
}

Additionally, the header-file of the appInitSystem() function needs to be included in main.c and requires a prototype declaration of appInitSystem() and the following defines.
 
#define TASK_PRIO_MAIN_CMD_PROCESSOR          (UINT32_C(1))
#define TASK_STACK_SIZE_MAIN_CMD_PROCESSOR    (UINT16_C(700))
#define TASK_Q_LEN_MAIN_CMD_PROCESSOR         (UINT32_C(10))

void appInitSystem(void *param1, uint32_t param2);

With these changes, your migrated project should run on the XDK in the XDK-Workbench 3.X.X, too.

If you still want to implement your use case on the XDK-Workbench 2.0.1, I can, of course, provide spit downloads of the XDK-Workbench 2.0.1 installation file. Please give me a short response on that and I will prepare the split downloads for you.

Regarding your understanding issues of the guides, could you please go more into detail on which parts of the guide cause difficulties for you and why?

Furthmore, the Bosch XDK Portal demo is officially no longer supported and available as download due to imcompatibilities with the latest XDK-Workbench 3.X.X and the release of the BoschXDKCloudConnectivity example. Due to that, the XDK Portal dashboard was taken offline as well.

Please let me know if that was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo

 

0 (0 Votes)
RE: XDK firmware issues & SD card save data
Answer
1/10/18 2:37 PM as a reply to Franjo Stjepandic.

Hi there.

I have followed the instructions u told me to do but still I have errors. I did as u said for main.c and below are the attached two pictures of how the code looks like. It does not compile though. Please advice. 

Also, will my Bosch XDK Portal file work with my AWS which I used with previously? What do I have to do to make it work? 

Following the guide, the part that I have issues with it the one where I am not sure where to place the source code in which area of the http. It is to send temperature data to my website, but once a limit is reached, it will "trigger an alert to visit a http link" which is my website. 

Now, I also faced another problem. I do not know how to save the sensors data of the XDK that I received in MQTT Paho, into the SD card inserted. If possible, please enlighten me with step by step guide too! It'll be easier then. 

Finally, as for the Bosch XDK Portal page, I am sorry it has to be taken away. I am now currently making use of BoschXDKCloudConnectivity and it is working fine for me with the SD card. 

Thanks and hope to hear from you real soon! 

Danial

0 (0 Votes)
RE: XDK firmware issues & SD card save data
Answer
1/10/18 5:05 PM as a reply to Danial Rohmat.

Hello Danial,

I am glad to hear that you were able to migrate your project and to solve some of your issues by yourself.

You should remove the implementation of appInitSystem() in your main.c file. The declaration at the top is alright and it will work that way just as well as if you had used a header-file for that. The issue may be the implementation of the function at the bottom (as seen in your second screenshot). It is probably a duplicate, since you should have it in your other implementation files already. I advise to remove that from main.c.

Regarding the integration of the functionality to writing data to SD card, I can, of course, give you a short introduction on how to implement it.

I assume you are using the entire MQTT paho demo for your use case. The easiest way would be to extend the functions sensorInit() and sensorStreamData() in the implementation file mqttSensor.c.

All initialization steps for the SD card need to be added into the function sensorInit(). That would allow to initialize and mount the SD card, directly at the beginning when the sensors are initialized as well. The necessary code you need to add is described in section 4.3 of the SD card guide.

Regarding writing data to the SD card, you only need to insert the writing logic, which is explained in section 5.4 of the SD card guide. Here I recommend exchanging the passed parameter FA_OPEN_EXISTING | FA_WRITE in the function f_open() with FA_OPEN_ALWAYS | FA_WRITE. This will ensure that a new log file is generated if the log file does not exist.

Regarding the Bosch XDK Portal demo, you can of course reuse the source code from the demo for your own purpose on AWS. The original configuration of the demo sends the sensor data to the Bosch XDK Portal broker, but you can change this configuration (i.e. broker address, broker port and the publishing topic) as well and send the data to an MQTT broker to AWS.

After all, the Bosch XDK Portal's dashboard only visualized the data, but generally, you can use any other means of visualizing the data.

If you look for a similar data representation dashboard as the XDK portal dashboard, then I recommend taking a look at the proposed dashboards here, maybe you find a suitable one for your use case.

Keep in mind that these dashboards may expect another JSON scheme than the one the Bosch XDK Portal demo application on the XDK provides. You may have to restructure the strings that are generated to adapt to the new dashboard's specifications.

Please let me know if that was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo

0 (0 Votes)
RE: XDK firmware issues & SD card save data
Answer
1/10/18 5:45 PM as a reply to Franjo Stjepandic.

Hi there. 

Thanks for the answer. Followed the steps which means copy from the XDKApplication template Main.c all and paste over the main.c of my IBM Bluemix MQTT Paho only, without adding anything else. I am now receiving compilation error to flash in my XDK. I have also added XDK nature but still the same. No idea why. Below is the 2 pics of my current main.c file of my IBM Bluemix MQTT Paho.

PS: Tried it on 2.0.1, no compilation error at all. 

Thanks in advance!

Danial

0 (0 Votes)
RE: XDK firmware issues & SD card save data
Answer
1/11/18 6:23 PM as a reply to Danial Rohmat.

Hello Danial,

There is one piece missing in the Main.c yet. Create a header file called appInit.h in the same directory as Main.c. Add the following code, which I mentioned ealier, into it:

#define TASK_PRIO_MAIN_CMD_PROCESSOR          (UINT32_C(1))
#define TASK_STACK_SIZE_MAIN_CMD_PROCESSOR    (UINT16_C(700))
#define TASK_Q_LEN_MAIN_CMD_PROCESSOR         (UINT32_C(10))

void appInitSystem(void *param1, uint32_t param2);
Finally, include the header file in Main.c , remove the line which includes XdkApplicationTemplate.h , save the project and build.

The project should now compile with Main.c producing any errors.

Please let me know if that was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo

 

0 (0 Votes)
RE: XDK firmware issues & SD card save data
Answer
1/11/18 7:20 PM as a reply to Franjo Stjepandic.

Hello there Franjo


I have tried all sorts of method but to no success. Still experiencing compilation error on XDK Workbench 3.1.0 now. Both my MQTT_Paho (Bluemix IBM) and Bosch_XDK_Portal (Amazon Web Services) are on the same boat, compilation error. I tried what you told me to do, and re-do again about 4 to 6 times but still same results. 

Is there any way I can contact you personally and send you my code there? It would be easier for you to check for me in that case. Only these 2 brought over from XDK Workbench 2.0.1 had this problem. The other two HttpExampleClient and BoschCloudConnectivity can be used, compiled and flash perfectly. 
Please do let me know once this has been sorted out. Thanks in advance and hope to hear from you real soon!

 

Best wishes

Danial

0 (0 Votes)
RE: XDK firmware issues & SD card save data
Answer
1/12/18 4:36 PM as a reply to Danial Rohmat.

Hello Danial,

I think it would be best if you directly send me the project. Like this, I can only make guesses as to what went wrong. At least the Main.c looks correct now. Could you please post your email address in this thread here, so that I can contact you to send me the project?

Kind regards,
Franjo

0 (0 Votes)
RE: XDK firmware issues & SD card save data
Answer
1/12/18 4:50 PM as a reply to Franjo Stjepandic.

Hi there.


The email that I am using is danialz1998@gmail.com .

Do let me know. Thanks in advance!

 

Danial

0 (0 Votes)
RE: XDK firmware issues & SD card save data
Answer
1/15/18 5:10 PM as a reply to Danial Rohmat.

Hello Danial,

I have sent you an email to the address you posted.

Kind regards,
Franjo

0 (0 Votes)