10 years, 10 months ago.

Never prints "Hello World!"

I'm expecting that console shows "Hello World!" string but didn't. Here is the output I observed during the program run:

Initialising... IP Address is 192.168.0.184 Sending at 4 seconds Received: 255 0 0 Received: 255 255 0 Received: 255 510 0 Received: 255 765 0 Received: 50 1020 0 Received: 0 1070 0 Sending at 5 seconds Received: 255 0 0 Received: 255 255 0 Received: 255 510 0 Received: 255 765 0 Received: 50 1020 0 Received: 0 1070 0 Sending at 6 seconds Received: 255 0 0

Question relating to:

1 Answer

10 years, 10 months ago.

If you look in main.cpp it is not supposed to send the "Hello World!" string. At a first glance it seems to me to be correct in what it is doing. HelloWorld is just a generic name for simple example programs, it does not necesarily print Hello World.

Hi Erik, thank you so much for your answer. I understood that there is no "Hello World!" string in the source code, but code is accessing the following site, and their contents is "Hello World!": "www.mbed.org/media/uploads/mbed_official/hello.txt"

I put following code to print the received stirng, but it prints HTML code, instead of "Hellow World!":

buffer[result] = '\0'; printf("result=%s\n\r", buffer); Added this code.

Do you have any clue to print real contents of the page which should be "Hello World!".

Thanks.

posted by Hisakazu Ishiguro 01 Dec 2014

You would need code which parses that HTML code. I haven't used that myself, but maybe there is example code available. Otherwise it is probably fairly doable to make yourself some code which obtains the text from a webpage from the html code.

posted by Erik - 01 Dec 2014