Software Archive
Read-only legacy content
17061 ディスカッション

Unable to Tun Sample Hello Word program

sunil_s_
ビギナー
1,159件の閲覧回数

Hi ,

I am very new in IOT. I tried to run sample "Hello IOT World" program using  Iotdevkit.

Here are the  steps which I followed.

1-)Boot pc using live usb image and connect galileo with that.

2-)Build the code successfully and transfer onto the board.

3-)When I am hitting the ip  of galileo board in web browser ,it is showing a default index.html page instead of "Hello Iot world"

so any one can help me out your early reply shall be greatly appreciated.

Thanks,

Sunil 

 

0 件の賞賛
8 返答(返信)
Sulamita_G_Intel
従業員
1,159件の閲覧回数

Hi Sunil

Great that you are trying our IoT Devkit.

To have the "Hello IoT World" page, you need to change the contents of the created hello world to the ones shown at step 5.1 at the Tutorial Guide. So you need to replace all the contents of myIOTproject.c for: 

#include <stdio.h>
#include <stdlib.h>

void main() {

    system("echo '<html><body><h1>Hello IOT world!</br>' > /www/pages/index.html");
    system("echo -n '</h1></body></html>' >> /www/pages/index.html")
}

 

Let us know if you already did that. 

Sulamita

Matthias_H_Intel
従業員
1,159件の閲覧回数

Under the hood it's a lighttpd webserver running on the IoT devkit image which could obviously host advanced dynamic webpages as well. Feel free to adapt to your needs.

sunil_s_
ビギナー
1,158件の閲覧回数

Hi Sulamita,

Yes, I followed the same code and compiled  then copied onto the board as per suggested steps.

But i think there are some lighttpd server configuration is needed ?

Thanks,

Sunil

 

sunil_s_
ビギナー
1,159件の閲覧回数

Hi Sulamita,

Can you provide your inputs?

 

Thanks,

Sunil

Sulamita_G_Intel
従業員
1,159件の閲覧回数

Hi Sunil

In my initial trials there was no configuration change needed for lighthttpd, but I am waiting for confirmation from some colleagues, maybe there were different versions. 

Can you check if the content of /www/pages/index.html is the 'Hello IoT World'? If not, there is an indication that the application wasn't deployed correctly on the board. 

Sulamita.

sunil_s_
ビギナー
1,159件の閲覧回数

Hi Sulamit,

I checked index.html and find there are a default code instead of mine .Here is the summary which I did.

1-)Build the code on IotDevkit using ICC  toolchain.

2-)Then transfer binary into the galileo board and set the permission.

3-) then copied the binary into /usr/lib

Is there any steps is missing ?

Thanks,

Sunil

Sulamita_G_Intel
従業員
1,159件の閲覧回数

Hi Sunil

Did you also executed the binary?

That binary changes the content of the index.html. Since it sounds like you transferred the binary manually, you also have to execute it. 

It may be a misunderstanding of the documentation, this binary is not triggered when you access the page. It rather has to be executed before so you see a changed page after that. 

Let me know, Sulamita.

sunil_s_
ビギナー
1,159件の閲覧回数

Hi Sulamita,

Thanks for prompt response.Let me check.

Thanks,

Sunil

返信