2025-01-23 02:21 AM - last edited on 2025-01-23 02:41 AM by Andrew Neil
Originally a reply to this - split to a separate thread as it is a different STM32, different radio, and a new question.
Thank you for your answer. I may consider embenet as option.
Another thing that I'm trying right now is Contiki NG. I use STM32L152 Nucleo and S2-LP. I succesfully ran border router app and udp client. The next thing I'm trying to do is to run some other examples from contiki os repo like http-example. I removed udp-client file and cp[oed http-example.c file instead. I had to do some modifications in Makefile as. I also added
#define BORDER_ROUTER_SCENARIO 1
#if BORDER_ROUTER_SCENARIO
#include "net/ipv6/uiplib.h"
#define BORDER_ROUTER_SCENARIO_ADDRESS "aaaa::1"
#endif /*BORDER_ROUTER_SCENARIO*/
in the contiki-platform.c
I have output:
url http://www.contiki-ng.org host www.contiki-ng.org port 80 path /
Resolving host...
But i get the error "HTTP socket error: hostname not found"
So my questions are:
1. Should the end device(now running http-example) be connected to the internet, or some additional modification of the border router is required ?
2. How to resolve the error ?
2025-01-23 02:52 AM
Please see this (also this) for how to properly post source code. I've edited the post for you.
@faruk wrote:url http://www.contiki-ng.org host www.contiki-ng.org port 80 path /
Resolving host...
But i get the error "HTTP socket error: hostname not found"
"Resolving" a Host refers to converting the human-readable text address "www.contiki-ng.org" to its actual IP address.
This is handled by DNS - the Domain Name System:
https://en.wikipedia.org/wiki/Domain_Name_System#:~:text=An%20often%2Dused,locates%20the%20services.
@faruk wrote:1. Should the end device(now running http-example) be connected to the internet
Of course it must be - because:
@faruk wrote:2. How to resolve the error ?
You will need an internet connection, properly configured with a DNS server.
You're going to have to study the Contiki-NG documentation and/or ask on the Contiki-NG community for specific Contiki-NG support: