GCDAsyncUdpSocket UDP communication over internet - cocoa-touch

I have a problem using GCDAsyncUdpSocket over internet. Everything works fine when I am doing test on my local computer.
I try to to send UDP message between a computer connected to internet with a 3G key and an Ipod connected through wifi. Unfortunately the message are not transmitted. I tried to do the same test with the example of GCDAsyncUdpSocket : UdpEchoClient and UdpEchoServer, and it is also not working.
To know the address IP of my computer with the 3G key, I looked on system preferences -> network, I also looked on http://whatismyipaddress.com/ , I saw that the adresses were different. With both it is not working.
My Ipod connected through wifi is behind a NAT/Firewall, but according to this website : https://www.gotroot.com/blogpost4-Why-your-should-never-forward-UDP-out-of-your-firewall It shouldnt be a problem.
Is it possible to send message between 2 devices without opening any port?
Why do you have two different IP addresses on my computer with 3G?

Related

Reverse Engineering HTTP API between iOS device and wifi device on same network

I have a device that connects wirelessly to my network. This deivce has a dedicated iOS app but it hasnt been updated in a while and I worry it is no longer supported/updated and therefore it will eventually stop working.
What I would like to do it try to capture the data between the app and the device and reverse engineer the API so write my own app.
I can see that the device has port 8080 open so I am hoping that it is a HTTP based API but on a non standard port.
Ive looked and both Fiddler and Postman but cant quite seem to work out whether their proxy will capture the data from from port 8080 or just 80/443.
Any thoughts how to do this?
Thanks

testing - not able to create IPv6 network on Mac

For testing purposes I tried to create IPv6 network from my Mac. I followed this tutorial: https://developer.apple.com/library/archive/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html
Except one thing. Instead of Thunderbolt Ethernet I used only Ethernet. WiFi was successfully created and I am able to use it.
However it seems, that the created WiFi is still not IPv6.
I ran this test: http://ipv6-test.com and in results it says Not supported under IPv6 connectivity
What is the problem? Why is my network still IPv4? How can I create proper IPv6 network?
The NAT64 test network that Apple advises you to create does not provide global IPv6 connectivity. It provides only local IPv6 connectivity between your iOS device connected to the WiFi access point and your Mac. The Mac then uses NAT64/DNS64 to send any Internet traffic via IPv4 (which is similar to what some mobile carriers do). This is why an IPv6 testing website shows you that IPv6 is not supported.
The purpose of this setup is to test IPv6 compatibility of your iOS applications on a physical device. You may download an iOS app which will show whether your device is correctly obtaining an IPv6 address from your Mac (because iOS doesn't natively show this info).

How do I browse a local network if my IP is an IPv6

Previously I could browse my localhost machine on a mobile device connected over wifi using my ip which was IPv4.
In developing a webapp or website this is very handy. I don't have to deploy changes to a live website/host.
previously this worked like this http://11.22.33.44/ entering this on the mobile then loaded the development workspace in the device.
Of course the ip was the one given by my ISP now the IP is a IPv6 one and this technique no longer works. I have tried various things like square brackets around the number http://[1111:2222:3333:4444]/this doesn't seem to work ?

What is the best way to send data to PC from "MCU + Wifi Module"?

I don't know anything about wireless protocols. With this quick setup i want to get inside. I just want to write a windows desktop application which receives only a couple of bytes of data from a mcu+wifi module "NodeMCU" which is connected to the same router. I can write a simple desktop app with visual studio. But sending data over ip has many methods as far as i read.
What is the simplest way to achieve? (I'm experienced in STM32 mcu's and electronics except internet protocols.)
You can send the data from the embedded board (with the mcu) to a TTL-To-WiFi module. Then from your PC application you should open a socket and connect to the module IP to listen in the correct port the data from your board.. There are a lot of module in the market used as "bridge" or converter: you have only to setup in it the local IP address, the destination IP (your PC) and the TCP port where you want to send data. From point of view of the board you use a standard USART and the message is sent to the destination IP. In your PC application you should be able to create a socket and connect it to the wi-fi module.

Send datagram from gray ip to white ip

I have two computers, the first computer receives interenet via Ethernet and gives wi-fi to the second computer. First computer have etho(not 192.168.x.x) and wlan0(192.168.150.1). Second computer have wlan0(192.168.150.5). I run a simple chat, and have a situation2 Computer: message sent from 192.168.150.5 to 192.168.150.1
1 Computer: message received from 192.168.150.51 Computer: Message recovering back to 192.168.150.1Of course message is not received on the second computer. As I understand it sends through eth0 and the message is not delivered. How can I fix this situation?
So, your situation is you have two computers. One computer is connected to the internet via Ethernet while supplying internet via WiFi adhoc network to your second computer, correct?
-Computer A: 192.168.1.2 (example - Ethernet machine)
-Computer B: 192.168.1.3 (example - adhoc WiFi machine)
You want to be able to send traffic between the two, correct?
-Computer B: Sends message to Computer A
-Computer A: Receives message from Computer B
-Computer A: Echoes(or replies) the message back to Computer B
Is this what you're trying to accomplish? What medium are you trying to use? PuTTY? Hyper Term? Your own program? Your WiFi adhoc network should not be the same IP range as your Ethernet network unless you made it so when you made a static IP for the adhoc. Make sure that your medium is talking to the right IP and that there are no conflicts with those IPs...
In summary: What operating systems are you using? What applications are you using? Are you sure your Ethernet and adhoc IPs aren't causing collisions between each other?