Can grpc communicate with mac address insted of ip - dart

Currently my program use the IP of the other device in order to communicate over grpc.
Unfortunately the IP is changing all the time and I cannot continue the connection between the devices without updating it manually.
The connection between the devices is only on LAN and should blocked access from WAN.
Locking the IP of the device in the rowter settings is not an option this time.
Does grpc have a way to communicate over LAN (inside my network) using identification number or mac address that does not change over time?.
Related questions I found:
grpc: Identify clients from same IP address
Reason for both a MAC and an IP address

In order to locate a machine based on its MAC address, you are talking about implementing ARP. This is something that is not supported in dart nor am I sure it would be advisable to go this route anyway. If setting a DHCP reservation on your router is not an option, are you able to skip DHCP and set a static IP on the receiving machine?
You could look into dynamic DNS which your router may support, or you may need to set up separately, but that will also require a static IP (for your DDNS server). If your machines can connect to the internet there are many DDNS services you can sign up for, but it sounds like that is not the case.

Related

Connect to a peer based on IP address and port

I've got an app that supports Bonjour and manually connecting to an IP (all within the same local network). I'm now looking at whether I can use MPC instead and while it obviously would be able to replace Bonjour, I haven't seen anything that allows me to replace the functionality around manually connecting to the IP. For context, my app runs in networks that have multicast disabled which is when users fall back to manually entering the IP address.
I could have the receiving app host a webserver and send a request there. Could I create a Peer based on the ip:port combination? That would allow me to make use of MPC for the MCSession aspect.
Is it possible to set up a Multipeer Connection based on an ip:port rather than having it automatically discovered via multicast?
I'll go with a solution based on NWConnection which uses NWEndpoint and can be created with both IP:port and a Bonjour-established service.
If I would've had access to the full Network.framework then I could've used that for both discovery & communication but due to SDK constraints I'll be using MultipeerConnectivity for the discovery aspect instead. By providing the device its IP & port when broadcasting the Bonjour service, another device can discover it automatically and then use the extra info to create an IP:port-based NWConnection.

Can I connect from an Android device to my router from anywhere (outside of LAN - not hosted database)?

TLDR: i'd like to connect from a mobile phone app to a database on my RPI from anywhere on the world. Is it possible without hosting an URL or udpating the IPs in the app and being it free?
Longer version: if I set a static local IP to my RPI, can I somehow connect to the router from anywhere on earth via the internet? I'm making an app for employees to log their work around our country and I would give them out the .apk to install, so I'd like to make it always working (even if router restarts, etc). Is it possible via code (C#) or is there a free service that could allow me to do it? (service to set a global static ipv6 to RPI?)
You can use https://ngrok.com/ or https://localtunnel.github.io/www/ (The default server for this is down these days) on your raspberry pi to receive a URL for a web service hosted on it.
If your router gets a public IP from your ISP, you can configure port forwarding on it to your raspberry pi, such that it forwards all connections to router-ip:port -> raspberrypi-localip:port and use a dynamic dns service like http://www.duckdns.org/ to give a "domain name" for your router instead of using the IP.
There are a lot of ways to do this really, but i say look into ngrok or if possible, the dynamic dns approach.

Identifying WiFi clients connected to ESP8266

I'd like to know that a specific device (phone/tablet) has joined my WiFi network created by ESP8266 microcontroller. It shouldn't require any installed apps on that phone/tablet, if possible, to simplify the whole setup.
So I think I need to somehow identify connected clients, and MAC is not an option because it is subject to change randomly on, say, Apple devices.
Maybe it's possible to collect host names of connected clients?
I know that Windows and Ubuntu clients send their host names when getting IP from DHCP server (see here). Also, it's possible to find such information on, say, home Wi-Fi router admin web page (i.e. host names, their IPs and MACs).
I'm running DHCP server on ESP8266, but I haven't found any API that allows to get peer host name (i.e. reverse DNS). Does ESP8266 support getting such information?

Delphi: Is there any way to use App Tethering with internet connection?

I'm using Embarcadero RAD Studio Delphi XE8.
Multi-Device Application app tethering components are designed for traditional WiFi and Bluetooth coupling. Does it support also Internet connections?
I would like to try to make small p2p app. I'm using App tethering via Wifi but I would like to connect App tethering via internet connection.
how to do that ?
Taken from the documentation
Connecting to Applications Outside Your Subnet
By default, both AutoConnect and DiscoverManagers perform the
discovery on the subnet of the local area network (LAN) where the
device running your application is. However, you can use their
optional parameter Target to override this behavior, and specify an IP
address or subnet: To specify an IP address to search for remote
managers, specify that IP address as the Target. To specify a subnet
of IP addresses, specify an IP address with a 0 as its fourth number.
For example, if you specify "192.168.4.0" as the Target, your manager
searches the 192.168.4.x subnet for remote managers. Note: You can not
specify wider subnets. For example, "192.168.0.0" is not supported.
In other words you need to use the IP address as the optional ATarget parameter of the mentioned calls. The differences to local tethering are minor, which I guess is why there are not many examples.
See the Embarcadero web site for more details
Try VPN connect two device. If your 2 device is same vpn (For ex: Softether , Openvpn). you can discover other device around the world. (Dont forget enable vpn server settings to discover other devices options)

iOS Bonjour Over the Internet

I know that iOS's Bonjour implementation (NSNetService, NSNetServiceBrowser) work out of the box on local networks.
The documentation says it is possible to set up a Bonjour DNS server to allow connecting users over the internet, so my questions are:
What is the Bonjour DNS server interface? is there a sample I can start from?
Does the DNS Server responsible for the initial hand-shaking\connection of the peers and the rest (send\rec data) will be directly between the peers?
Does the DNS Server provide a NAT hole-punching mechanism?
Thanks!
Bonjour local service discoveryis based on "multicast DNS". whenever some client wants to find out anything about the network or services on the network it uses the multicast address 224.0.0.251, meaning only clients within that multicast group can use bonjour together.
the 244.0.0/24 IP-Address space is defined as "Local Network Control Block" by RFC5771 and will not be forwarded out of your local network.
BUT really, Bonjour is just a DNS-based method - you can tell NSServiceBrowser to search in a non-local domain, which just requires the DNS server to respond to specific requests (as described in Manually Adding DNS-SD Service Discovery Records to an Existing Name Server)
This allows service discovery over the internet and even service registration if you get DNS Update working (Setting up a Bonjour Name Server), but nothing more - you have to care about hole-punching yourself.
So get yourself a BIND-server and start trying ;)

Resources