Raspberry PI get the local IP address lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- bartdereu · 2014-01-06 17:23 Hi all, i've been googling for a while whitout any succes. I'm trying to find a way to get the local IP address. Since i can't use winsock, i'm pretty stuck at this. Any ideas? Thanx. ---------------------------------------------------------------------- mica · 2014-01-06 17:54 http://synapse.ararat.cz/doc/help/synamisc.html GetLocalIPs or parsing /proc http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html ---------------------------------------------------------------------- motaz · 2014-01-06 20:13 GetLocalIPs gives only 127.0.0.1 ---------------------------------------------------------------------- jwdietrich · 2014-01-06 21:21 You could try to use the following function (requires the unit Process): Code: [Select]function GetIPAddress: string; var   theProcess: TProcess;   AddressString: AnsiString; begin   try     theProcess := TProcess.Create(nil);     theProcess.CommandLine := 'hostname -I';     theProcess.Options := [poUsePipes];     theProcess.Execute;     if theProcess.Output.NumBytesAvailable > 0 then     begin       SetLength(AddressString, theProcess.Output.NumBytesAvailable);       theProcess.Output.ReadBuffer(AddressString[1], theProcess.Output.NumBytesAvailable);     end;     GetIPAddress := AddressString;   finally     theProcess.Free;   end; end; ---------------------------------------------------------------------- mica · 2014-01-08 05:48 You can try this too https://www.mail-archive.com/synalist- public@lists.sourceforge.net/msg03470.html https://www.mail-archive.com/synalist- public@lists.sourceforge.net/msg03470/getlocalips.lpr