Software Archive
Read-only legacy content
공지
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 토론

Unable to Tun Sample Hello Word program

sunil_s_
초급자
1,197 조회수

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,197 조회수

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

0 포인트
Matthias_H_Intel
1,197 조회수

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.

0 포인트
sunil_s_
초급자
1,196 조회수

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

 

0 포인트
sunil_s_
초급자
1,197 조회수

Hi Sulamita,

Can you provide your inputs?

 

Thanks,

Sunil

0 포인트
Sulamita_G_Intel
1,197 조회수

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.

0 포인트
sunil_s_
초급자
1,197 조회수

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

0 포인트
Sulamita_G_Intel
1,197 조회수

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.

0 포인트
sunil_s_
초급자
1,197 조회수

Hi Sulamita,

Thanks for prompt response.Let me check.

Thanks,

Sunil

0 포인트
응답