Sending sensor's data from iphone to matlab through mathworks

Hi All, I need to send the data acquired by the iphone's sensors to matlab on my PC. I have tried to use the method mentioned in the documentation and it worked when both the pc and iphone are on the same network. However, when I did not know how to do it using different networks. So, how can I Send sensor's data from iphone to matlab through mathworks when I use different network for the pc and mobile?

Answers (1)

You can send directly provided that:
  1. you configure the public IP address of the PC as the destination
  2. your ISP allows incoming IP traffic
  3. your firewall has to allow the packets through. If you are using an external firewall, this might involve configuring the firewall to support a fixed Network Address Translation.
For example, my internal network is in the Class B private range, 172.17.*.* . When I am using my phone via wifi or bluetooth within range of my local network, I configure the appropriate 172.17.*.* address as the destination and the packets go directly. If I am remote, I need to tell my phone to send to the 24.*.*.* public IP address that my ISP long-lease DHCP assigns to me (that is, it could change, but it does not generally do so.) My ISP is fine with my running non-commercial services (historically, one of the other major ISPs here prohibited running non-commercial servers, and at one point they were enforcing it by only allowing responses to outgoing packets.) I am running an external firewall, so I would need to configure a static translation on the particular UDP port.
Doing the appropriate firewall configuration is easier if you are using static local addresses for your PC, but that is not exactly a technical requirement, as long as the firewall is configured for your current PC address.
If your public IP address changes a lot, then you might want to consider using a service such as dyndns, which allows you to register a public hostname and has your network "call home" to the service so that the service can dynamically re-register the IP address to deliver to. (I subscribed to dydns for years, but with the long lease times from my ISP, I found that I did not need the service any more.)

Categories

Find more on MATLAB Mobile in Help Center and File Exchange

Asked:

on 14 Nov 2016

Edited:

on 14 Nov 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!