I´d expected new functions/methods to implement this function. I’m working with LPC1768, but apparently this feature is not supported by the OS, even with latest platforms.
+2, I have been waiting also. I ran across a comment somewhere that it was supposed to be showing up in MBED OS 6.
I have been using the following since MBED OS 5.9. It’s not a long term solution as it could break down the road and a little bit of a brute force method.
I might be wrong but the friendly name is usually assigned to a host by DNS (Domain Name System/Server). However, for small local networks the mDNS (Multicast DNS) can be used as a workaround . A search for mDNS on Mbed pages returns several libraries. Maybe some of them work also with Mbed OS 6. I think it’s worth to try out.
I have only been able to go to 6.2.1 for a number of my solutions. There are quite a few problems with the 6.3 release (only tried the online compiler). I haven’t pulled 6.3 into mbed studio yet.
There is no official way of setting the host name in Mbed.
The proposed workaround uses Lwip which is a private dependency of Mbed’s IP network stack. It is not recommended to use internal dependencies in applications as it can change state in the back of the middleware that uses it. It is not unexpected to see different behavior version to version if an application touches these internal part.
To make such feature available to Mbed it would require adding a new method at the NetworkInterface level and propagates the call down the stack. We are not working actively on such feature but warmly welcome pull requests from the Mbed community.