Find "Network" IP adresses with SWIFT - swift

I try to find the IP adresse of a Raspberry PI (LINUX) that is connected to the same Network as the iOS device my code is running on.
Is there some way to "find all" ip adress in the network the device is currently joined via SWIFT?

If you ping the broadcast address, unless devices are specifically configured not to replay, they will do so. How you do that with Swift is another question.
This question+answer will work if you know your IP address, you need to probe all the probable addresses of course.
How to check Internet is working or not in ios

Related

Periodically the Internet disappears in the router Mikrotik

Good afternoon need help. There is a router Mikrotik. The Internet and wi-fi started to disappear, but the connection is periodically resumed. The Mac address is specified by my router in an error.
Error in logs : bridge port received packet with own address as source address (ee:ee:8c:0c:ee:fd), probably loop.
You need share a better environment description.
However, assuming you're using wireless interface, you can try proxy ARP on Wireless interface for avoid loops under WiFi bridge.
/interface wireless set arp=proxy-arp
More info here.

Can I plug a cisco phone directly into raspbx ethernet port

Can I plug a cisco SPA303 ip phone directly into the ethernet port of a raspberry pi running raspbx?
I have got raspbx setup and running using a wifi dongle to connect to the router. The system works with the Cisco phone plugged into the router. However, the router is on the other-side of my house and ideally, as the raspbx is wifi, I would like to plug the phone directly into the pi and have it as one unit I can have anywhere in the house.
I have spent a painful amount of hours trying to set this up and I am sure there is a simple fix I am overlooking. Any ideas would be greatly appreciated.
Yes, you can. But you should setup static ip on phone or setup dhcpd server on RPi
Also some cisco phones have double ports(internal simpler switch inside). If so, you can connect one-by-one upto 8 phones.
There are several layers to take into consideration:
Link layer MDI/MDI-X detection of crossover/patch ethernet cable detection.
Static IP address for Raspberry Pi and a DHCP server for the IP phone
TFTP server to provisionize the IP phone
A peer in asterisk for the IP phone

How to communicate between two embedded devices over ethernet?

I am not expert on this subject, need your suggestions. I have a few devices on ethernet/LAN. I wanted to have these devices communicate over LAN without going into their network configurations. Below is my plan, please let me know if this can be achievable:
1) I install TCP/IP stack on these devices
2) I give them their hostnames like device1, device 2 etc....
3) I configure these devices for local-link networking, so that they can configure themselves and get their IPs.
4) I use socket programming and access each device by using hostnames.
Please let me know if this can be done without much hassle, and let me know if I have missed out something in above mentioned points.
Thanks in advance.
This is basically a good approach.
If your embedded devices have a good IPv6 stack, I recommend using it instead of IPv4. link local addresses work better with IPv6. Most IPv4 stacks are configured to try to obtain an address from a DHCP server first, and only fall back to link local addresses if they can't get one. The link local address and DHCP address might be mutually exclusive, so the link local address doesn't become operational until after DHCP has been tried and timed out. The link local address might even be disrupted if DHCP periodically retries. Although the devices will normally be connected to each other and there won't be a DHCP server, you don't want to disable DHCP, because the devices probably should obtain a DHCP address if they are ever connected to a wider network. With IPv6 on the other hand, the link local addresses come up immediately when the interface comes up, and stay up continuously while other IP addresses (from autoconf or from DHCPv6) may come and go.
Link local addresses alone won't let the devices contact each other by hostname, but dns-sd (mDNS, zeroconf) will. If you are using Linux then you can use avahi as a dns-sd stack.
Better than using hostnames, consider having the devices probe for each other by dns-sd service type. If you are using a custom protocol between your devices, make up a unique service tpe name and have the devices advertise themselves it and probe for it with dns-sd.

How To Change DNS Address Of iPhone Through Program

I like to change DNS address of iPhone through my application. Is it possible ? Any one let me know how i can do it, it will be very helpful. Thanks in advance.
If by DNS address you mean the IP address of the DNS server the iPhone uses for queries to resolve the domain name you provide, then it is not possible in a non-jailbreaked device. The IP address of the DNS server is provided to the iPhone through DHCP. So you would therefore have to change the DHCP settings in the setup of the network you connect to, eg. the Wifi access point.
If you want to change the IP address assigned to the iPhone (and possibly provided to other devices through DNS) then again you would have to modify the DHCP settings on your server. This IP address is provided to the iPhone through DHCP and possibly coordinated with the DNS server in the network.
Unfortunately it's not possible from an app. Oh, and I believe you mean IP address, right?
there was a trick to reset an ip address by turning airplane mode on and off, but the ip address is assigned to you by the network you are connecting to. In the apps you don't have a way to request a "reset" like this. this is done on the system level and not exposed as a method an app can use
google up netinfo+ its an app for setting dns on iphone

What is the iPhone simulator IP address?

I have been looking for the answer to this question for some time. I am doing network programming for the iPhone and it is necessary for me to use the IP address of the device. This isn't a problem on the physical device as it has its own IP address on the network. However I was wondering what was the case with it on the simulator. Does it get assigned an IP address to be used?
The ip address of the machine you are running it on
should be 127.0.0.1