MATLAB Answers

How to send sensor data of smartphone to Matlab remotely

48 views (last 30 days)
I am developing a tracking system that uses the GPS data of a smartphone transmitted to Matlab and process them in real time. I have been using the Matlab Mobile app to do so but it requires my smartphone to be connected to the same network as the PC running Matab. However, I want to transmit the GPS and sensor data remotely when the smartphone is in a traveling vehicle, and therefore will not be on the same network as my PC.
My question is will it be possible to transmit these data over a 3G/4G network from my smartphone to Matlab (running on my PC) through the Matlab Mobile app?
Thank you!

  0 Comments

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 11 Jun 2015
MATLAB Mobile does not require that the cell phone be on the same local network as the PC. You can tell MATLAB Mobile to connect to a public IP address.
The rest is a matter of firewalls allowing the ports, and it might involve setting up static Network Address Translation for the port if the public IP address gets you to a router that is doing Network Address Translation for an internal LAN.
The main thing about MATLAB Mobile is that there is little to no security built in to the process -- no encryption of packets, little or no authentication that the incoming packets are from an authorized user.
I would thus recommend that you consider using a Virtual Private Network (VPN) between the phone and the PC.

  4 Comments

Show 1 older comment
Guillermo Rubio
Guillermo Rubio on 18 Jun 2018
Im trying to send data from a mobile to a PC via the 3G/4G network, and Matlab Mobile is unable to make the conexion.
The PC is connected to a WiFi network, and if a connect the mobile to the same network, connexion is made without any problem (I use the same IP address in both cases).
Could you please give me any help with solving the problems you comment related with firewalls, static IP's, routers, etc. I'm pretty new dealing with this network connections.
Thank you very much in advance.
Walter Roberson
Walter Roberson on 25 Jun 2018
You cannot use the same IP address in both cases. In the case you are connecting through 3G/4G you need to use the public IP address. You can find your IP on the PC by visiting http://www.whatsmyip.org/
Guillermo Rubio
Guillermo Rubio on 28 Jun 2018
Thank you very much. Finally I connect mi mobile to the same network of the PC via a VPN and use the same IP as if the mobile was connected to that network and it works fine.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!