Location data from SMS message - sms

There may actually not be an answer to this question, but I wanted to post here just in case because it will require some out of the box thinking. This may not be a programmign question per se. If it isn't, rather than downvoting, perhaps you can suggest another stackoverflow site to use for this specific question?
We have installed, and have running, an SMS gateway from SMS Tools 3 (http://smstools3.kekekasvi.com/) and I can receive / send text messages.
Additionally, we have created a custom SMS application for Android / iPhone that embeds GPS location data into the sms message, but we are trying to figure out a way to obtain location based data from a user using a dumb phone (think NGO in Africa with users using the most basic of phones).
Is it possible to get location based data from a SMS message from a phone that lacks wifi/GPS? The only thought so far would be to somehow get the cell towers used by working with cell phone providers in the targeted country.
Thoughts?
Note: This is not an attempt to track users location unknowingly (else we wouldn't have created our custom SMS message application)

You can always do GSM tower triangulation (first iPhone did that) and you don't need to go to all operators - a lot of services out there.

Cellular localisation methods which do not use WiFi, GPS (and other satellite-based navigation systems) depend heavily on the radio access network (RAN), so will vary depending on the type of the operator network , (GSM/CDMA/UMTS/LTE etc.). Its important to understand this because often there are multiple types of networks coexisting in the same country, which can result in varying performance of the positioning scheme used.
Since your question specifically mentions GSM, lets stick to it. GSM cell triangulation encompasses different schemes for obtaining location info of the subscriber. Broadly, these schemes fall in two categories: Network-based and Terminal-based.
Network-based services require signaling in the operator's Core Network (CN) and could be triggered by an agreement with the operator. Technically, this occurs when a call is made or an SMS is sent to a pre-defined emergency number. For more technical details, refer to the ETSI spec [1]
*The drawback: Requires operator support!*
Terminal-based services are dependent on the presence of some location service on the mobile phone - GPS, Wi-Fi, Internet etc.. In the absence of these, there is conceivably only one solution: Have the Mobile Terminal (MT) send its cellular location information - [ MCC + MNC + LAC + CellId ] to the RAN which can forward the information to a GIS service than obtains the Lat/Long of the user. One GIS service that's freely available is Google's geolocation API [2]
[1] http://www.etsi.org/deliver/etsi_ts/101700_101799/101724/07.03.00_60/ts_101724v070300p.pdf
[2] https://developers.google.com/maps/documentation/business/geolocation/

Related

Is it possible to send sms with an unplugged sim?

Suppose I have a SIM (which can be used to send SMS when plugged onto a phone of course), how can I send SMS using this SIM number when the SIM is not plugged to any device(i.e., just put it away)? Note: I don't mind what platform the sms is sent from (e.g., it can be sent from a PC, a smart phone), so any possible solutions? I don't mind solutions which involves coding or programming (e.g., by calling APIs) as well.
Note highly simplified/high level answer:
In order to send an SMS, USSD, Call or Data etc the Mobile Network will need to provide the device with a special "key" that is used in the communications. I.e. to send and SMS you will need an encryption key to tell the network to send an SMS.
The issue is that this key is dynamic, it changes based on network configuration. The only way to get a key is to use your SIM as it contains a component of the key.
SIM cards (and Bank chip cards) are really a marvel as they are a very good example of superb security, they have been around in Billions of units for more than 30 years, but have and continue to thwart hacking attempts for the most part.
To answer your question, You need the SIM card to get access to production mobile networks.
If by saying "SIM is not plugged to a phone" you still Ok about SIM to be plugged into some other device - you defintely can use USB/GSM-modems and standalone GSM-gateways.
Also you may want to consider hardware solutions such as GSM-gateways+SIM-banks. SIM-card is placed in the special non-GSM box (SIM-bank) and available for remote commutation into GSM-box (gsm-gateway) via Internet/Ethernet. Commonly SIM-bank holds hundreds of sim-cards remotely available, and GSM-gateways have only few dozens of real gsm-channels (due to hardware cost saving). Everything is controllable via manufacturer-specific API and/or GUI.

How to request user location from HLR

I'm a software developer with very little knowledge on telco, recently my boss asked me to find a way to request user location with their imsi from the HLR. I have never done such thing before, i work mostly on high end applications. I've done some research, read some articles, like on dialogic.com, but until now i haven't found clear instructions on have to make it.
So can someone explain me what are all the steps i should take in order to make it? I'm working on windows but a linux based solution will be good to. Please consider I'm a newbie.
There is a way to do it, of course, but all depends on the core network. If it is up to 3g, you could (depending on the operator) either do ATI against HLR based on IMSI, or send an SRI-SM query to the HLR and in response get the VLR id.
then send PSI (Provide subscriber info) query with Location Information tag to the VLR which you got from HLR.
In response of PSI the VLR/MSC will respond back with LAC and Cellid of
subscriber. For newer (4-5G) mobile networks, there is an explanation here http://4g5gworld.com/blog/lcs-architecture-lte-eps
The interface to the HLR is usually not an open interface - it is an SS7 based interface on what is a closed network for operators.
The information in the HLR and VLR (Visitor Location Register - a local copy of the HLR on visited switches) and the VLR is not usually available externally. Some of the information would never be shared, but there are some services which will allow you query some HLR info - for example (I have not used these and cannot vouch for them):
https://www.hlr-lookups.com
http://www.vianett.com/en/products/overview/hlr-number-lookup
If you wanted to implement a service like this yourself, you would need a gateway between the IP and SS7 networks.
The HLR lookup service provides information for IMSI and roaming MSC. A MSC have country code and network code. If this is the only information which serves the purpose the , you can get lookup services from any service provider , just by checking the coverage. If you are telecom company and have SS7/Sigtran level access to the mobile operators then can develop your own lookup gateway.
https://www.cspsprotocol.com/what-is-hlr-lookup/
I found what i needed with Telestax Restcomm GMLC server. It's available here
https://github.com/RestComm/gmlc
But be aware that the solution only works on Linux server, because windows does not implement the SCTP Stack.
I know it's an old post, but if it's any help to others, I use a company called Data Soap for HLR lookups and they provide information about phone network, along with the originating country.
https://www.datasoap.co.uk/data-quality-services/hlr-lookup

Core Bluetooth: Unknown CBService?

To learn CB, I've decided to browse the services on my iPhone. I'm finding a few, but except Battery and Time, the others are "Unknown". What is it?
Some services have defined UUIDs (such a battery and time) and these are listed on the Bluetooth Developer Portal. The defined services also have a set of defined characteristic IDs
BLE also allows developers to specify their own service and characteristic UUIDs - since the chance of collision for random UUIDs is infinitesimal, there is no requirement to register these, but organisations may choose to document them. Apple's notification center service defines some, for example, and many chipset/module vendors define services to make it simpler for developers to use their modules.
Looking at my Fitbit Flex I can see device information and battery services - these are well known, as well as two unknown services which, presumably, FitBit use to transfer activity and configuration information to and from the device. Short of trying to reverse-engineer their protocol there is no other information available on these services and characteristics.

UICC with OTA vs mobile app using web-services with https

The question would be much clearer when use a concrete e.g,
Lets say I need to topup my mobile , I have two options
top up using sim services [UICC with OTA]
top up using a mobile-top-up-app (a hypothetical mobile app) [web-services https ]
my question is, what is the main advantage of option 1 over 2? what is so important about OTA?
OTA works out of the box as a 2G service (as such it benefits a huge coverage). It is supported by all devices regardless of brand, OS, country. The system also covers retrys to some extent. It will incur minimal cost to your customer, especially in roaming situations.
Using a data pipe works too, but you need to have an app deployed and running in the end-user's device.

Based on my scenario should i go WebSockets or XmlHttpRequest or both?

I am about to make a turn-based game in the Monkey language (Cross-platform translator). The game will use the HTML 5 platform. This game will play online where players can match against each others (It can be a 2vs2 match). I recently reviewed a tons of solutions and i stopped on 2 of them. The good old XmlHttpRequest and the new one WebSocket which seem to be in a recommandation state from W3C which is rather good. There also another technology which i was interested which is PubNub, a push service. This service actually push messages to all clients connected and is really fast.. but this come at a cost later and is restricted in the number of messages you sent. By that i mean it cost you 15$ per month for 1000 connections and 1million message then +1$ for another 1 million and go on. There actually 3 actors, the client written in monkey (HTML5) the server written in C# because i know well the language and PubNub for broadcasting messages. The client will only send requests to the server and the server is relaying the messages to PubNub which in return send back to clients. I had two plan in head considering thoses facts :
The game is written in HTML 5 but i may port it to other languages (Android as an example). I can't do that if i use WebSockets because i would have to get additionnals librairies to handle this and i don't want to invest more time in it. So i will focus on HTML 5 for now but porting it is alway an option.
Its a turn-based game so yeah XmlHttpRequest seem to be suitable for this task but at which point ? If i have over 1000 connections sending requests will it be able to support it ? Each turn is an unique request but chat messages is also a request and private messages too, getting player data too (before you join any game) etc. An advantage over WebSockets is that Http Get are easy to make and is supported easily on many platforms so i could obviously go the Android route if i choose this.
I don't want to invest more time in others technologies than thoses stated here.
PubNub cost money in the end but it is very efficient for pushing messages so not using it might be risky and would force me to do the messages relaying code myself.
So here my 4 plans.
Going with WebSockets and use Alchemy as a WebSocketServer for C# which i tested and work wonderfully and still have the PubNub actor in the backend for relaying my messages.
Go with XmlHttpRequests and use a simple WebAPI for the request Gateway.
Go with both. Make the client independent on which technology to choose. Use XmlHttpRequest as a fallback and make the server support both connection. PubNub will still be the relaying actor here which should make the whole stuff communicating.
Go with WebSockets but without PubNub.
So which route do you recommand me to go and why ?
Thanks!
PubNub for Indie Games and Multiplayer Online Worlds
Networking is hard when you are building a simulated world for people to explore. These simulations are often considered. PubNub is the best solution for indie game developers for all the good reasons. Enable Networking in your Indie Game is simple with PubNub's two easy functions PUBNUB.publish({...}) and PUBNUB.subscribe({...}). Adding Networking in your apps allows you to implement multiplayer games and more! Implement real-time notifications between HTML5 browsers, phones, tablets and more. Everything can send and receive data from everywhere on Earth.
WebSockets or XMLHttpRequest or both?
PubNub makes this choice for you, automatically detecting the best connection type suited for your player's systems and capabilities. That means your Indie Game will function as expected on all platforms including Android, iPhone, Chrome / Firefox / IE and more. That makes it easy, so you don't need to worry about transports or delivery methods to the diverse number of platforms that exist. Your team only needs to focus on making a compelling and engaging online multiplayer game.
Online Indie Game - Server Logic
You need a way to securely collect player progress and track actions and consequences on your world. You may also need to track inventory and player state. There are two great services for this.
RoarEngine
First let me recommend http://www.roarengine.com/ RoarEngine an online hosted Game Engine which gives you a Scripting Engine to Unleash your creativity with limitless possibilities by writing your own custom logic. Events, challenges, timed mechanics, you name it. RoarEngine also offers Items & Gifts economy to Shape player interactions by creating items that affect player state, powered by a full featured shop, currency and gifting system that can be managed on the fly.
Parse
I highly recommend https://parse.com/ an online cloud hosted service which managers you user/player sessions. Parse is great when you need an online platform for more abstract and less tailored to gaming; which allows you to define models and objects in the way you choose. With Parse you don't need to focus on building infrastructure, you instead get to focus on building your game world state.
PubNub HTML5 MMO XKCD Game Multiplayer
We wanted to demonstrate the capabilities of HTML5 Indie Games used together with PubNub to enable expansive gameplay that joins players all across the world in real-time. This game uses HTML5 Canvas with multiple users flying around with a balloon figure. If you got stuck, you can click your balloon guy and turn into a ghost to seamlessly move through the landscape unhindered by mortal barriers like trees and hills. There was a problem however with the scaling of users on ordinary off-the-shelf gaming servers. The max concurrency could only be a few users at a time leaving many wonder where the MMO part of the MMO was. PubNub makes this automatic and at a lower cost compared to self-hosting options. Teams who are considering self-hosted options will consider the cost compared to maintaining and hosting a networking cluster for gameplay.
PLAY LIVE - http://www.pubnub.com/static/pubnub-xkcd/index.html
BLOG - http://blog.pubnub.com/xkcd-mmo-websocket-scaling-with-pubnub/
SOURCE CODE - https://github.com/pubnub/pubnub-xkcd
The links above show you a live HTML5 Canvas based game that is powered by PubNub multiplayer capabilities.
Take a look at http://realtime.co - Its a Realtime platform similar to PubNub and with more capabilities.

Resources