How to get devices Cell IDs under same BTS? - android

I have to develop an android application that has to get all mobile devices info in same Telco BTS as mine phone. Can I get all other mobile devices cell IDs?

In the comments you mention your requirement is 'I only have to send a broadcast to all the neighboring mobile devices'.
There is actually a solution built into most deployed GSM networks to do this already - it is called Cell Broadcast (or sometimes SMS-CB).
It is usually intended for emergency situations and allows an operator to send a message to all the devices in a given cell efficiently and even when the network is congested.
There is also a newer standard eMBMS which is similar concept but designed for multimedia broadcast, so maybe suitable to more commercial applications. This is not so well deployed at the moment, AFAIK.
Either way, the API's are in the Telco's domain and not available to a device unless the Telco has provided a special service for this.
As others have pointed out, a regular Android device will not have the ability to discover all its peers or to message everyone in the same cell, although a telco could provide a web service that the device could call if they wished.
The division between the 'phone' part of an Android phone and the 'app or computer' part of the device is strictly defined in Android - the intent is not only to protect privacy etc but also to protect the phone functionality and the network from malicious or malfunctioning apps.

Related

How can I bridge phone calls to VoIP?

I want to have one stationary device like an android phone that can use a standard local SIM card and forward all calls to a second device over some kind of VoIP protocol. When someone calls the phone number of the stationary device, I want my second device to ring and handle the call through something like linphone, element, or whatever. Ideally, it should be possible from the second device to initiate a call from the stationary device's phone number as well. Bridging SMS too would be nice, but I already have a solution for this on android.
There are many use cases like
when traveling abroad, being able to bring the latter device and receive/make calls via the stationary device at home
forwarding multiple phone numbers to a single device and e.g. switching off the work number when away from work
having privacy when the location of SIM cards is logged, by making calls over wifi from somewhere else than the stationary device
when traveling somewhere with bad mobile coverage but available wifi, without having to think about how the second device handles it
Are there any existing projects for doing this?
If not, then what would be necessary to make something myself? Is the best solution something like connected an android device by bluetooth to something running asterisk like was discussed here? Or has something changed in the past 11 years, maybe the existence of some working linux phones makes this possible on a dedicated purism or pinephone device?
I think you can achieve this with Brekeke SIP Server. I am using their solution to achieve something similar to what you want to do.
there are multiple ways to achieve it technically, but the most practical solution to your use case will be to use a VOIP Gateway device.
Actually we can not use a mobile phone as gateway between SIM and VOIP calls.
so you can buy a voip gateway example GOIP (single SIM) and put your sim, connect to your home internet and configure. your phones softphone (eg linphone) will be able to directly register on it and you will be able to make/receive calls and sms.
there will be a new problem as mobile OS platforms are more and more restrictive about power, your sip client will not be able to receive calls while in background for that you will need push, so you can use twillio's mobile sdk to make a client that works fine then forward your calls to twillio from gateway. since there is no number or telecom services involved, cost on twillio should be minimal.
A more common way to do this is with an operator service, rather than implementing it yourself.
The operator is able to see the routing to your number and simultaneously call multiple numbers you have set up. Different operators will have different names and details so you would need to speak to your local operator.
For example BT in the UK (who I have no affiliation to - just an example) provide a service called 'Follow ME': https://support.ringcentral.co.uk/s/article/9010?language=en_GB
If you do want to do it yourself than an open source PBC like Asterisk is indeed a good starting point.

Transform any devices into beacons : wifi + bluetooth (datzing like app)

I'm actually working for a startup I'm building with two other founders. On the side I would like to develop a quick prototype to be able to deepdive into a subject I can use on my project : beacons.
Here is what I want to achieve : I want to be able to use a device as an emitter (using bluetooth, BLE, or wifi) and the other one to be able to know when it enters the first one range. I need that to be able to do indoor localization (just a check in system, not to know exactly where people are in that specific location).
I'm used to code mobile application with Ionic and I'm more a Javascript developer. I saw that there is already something which fit to my needs : Dazting which transform every device mobile as "a beacon" with either bluetooth or Wifi. Problem, I want to do it on my own but to be honest I don't really now how they manage to do that with Wifi. I know that there are some libraries to emit with BLE but what about bluetooth ?
Does it mean I'll have to code it with native code ?
This is what I want to achieve :
Coding an hybrid app (will loose less time and one app for every
platform)
Transforming the mobile device into an emitter : with bluetooth or
wifi
Be able to know the distance between a device which will emit and a
one that will receive the signal
I don't want to go with beacons : I'm not going to use macro-location and buying beacons for my project at the start is not something we would like to do.
Any ideas or suggestions on how did Datzing manage to reach that goal ?
Thanks in advance.
Datzing relies on emission of Bluetooth Classic, Bluetooth LE and WiFi packets from a mobile device that is made discoverable, either programmatically or through manual selection in settings. The unique MAC address or SSID of the device can then be used to tie the detected transmission to a registered "Beacon" on the Datzing system. Basically it just registers the unique identifier associated with a Bluetooth or WiFi transmission with the Datzing servers so they can have meaning.
Using this technology to transmit on an iOS device is severely limited due to operating system restrictions. Users essentially have to manually go to settings screens to start the emissions. Android devices are much more flexible if you have a native app granted the proper permissions.
On the detection side, iOS is also much more limited than Android due to the operating system blocking access to raw MAC addresses of bluetooth devices and preventing detecting SSIDs of WiFi access points unless the network is connected. As of Android 6.0, access to the raw MAC address is also restricted, making such a system work less well with Bluetooth on newer Android devices.
On both platforms, iOS and Android, the ability to use these techniques to the extent they are allowed by the operating system are possible with native code. Doing so with Ionic or Cordova would require cobbling together a number of plugins (if they even exist) to bridge to the native features to access WiFi SSIDs and do Bluetooth discovery and scanning. This is unlikely to be a quick protoype.
Word of caution: It is always a good idea to try out a system like Datzing before trying to reproduce it yourself, as limitations often cause technologies not to live up to the claims of the marketing materials.

Can't discover desired service from bluetooth le device

I've made app that allows me to connect to bluetooth le device and lists all services and characteristics. However the only recognized service is 'Device Information Service', there is also 'Unknown Service' but it doesn't seem to pass data that im looking for. I'm sure that device is working properly because official app that was attached to the device works fine. What could be the problem? Is it possible that information that im looking for are passed in unknown service and are somehow encrypted?
Your app correctly discovers the services, the problem isn't there. The problem is that you expect the service to be a generic one but it isn't, it's a vendor specific service.
A vendor specific service (characteristic) is easily recognizable : Its UUID is 128 bits long. Also it's not resolved by generic BLE apps such as nRF Connect for the simple reason that they are specific and not generic.
When a company sells a device that implements generic services, they know that it will work with multiple applications but they also know that these applications will also work for the other devices from their competitors. By example, you can buy a heartrate belt from several companies and use them with several fitness apps on your smartphone.
When a company sells a device that implements vendor specific services, they know that it will not work with another application than their own one and that not any competitor will be able to sell a device that also works with their application.
Two different strategies, many different goals.
Basically, the company that designed the device you are playing with did not want you to be able to use another app than their own app to access the data in the device. It's that simple.
Now you still can reverse engineer their service. Use a sniffer, compare the data transferred when using their app with the data actually displayed in the app and maybe you'll find some logic, and learn the hard way how they have hidden the data in their service. However they probably have some clause stating you shall not reverse engineer this or that.
You can see the generic services here, but you won't learn anything more than what I've said : BLE GATT Services

Instantly send signal to a group of mobile phones within 10 m

This question follows on from Unity3D -- Send message to other mobile phones in the same vicinity
However, I made mistake of restricting to Unity3D.
So I would like to re-ask the question without that constraint.
Let us say we have 20 mobile phone users in a cave (so no Wi-Fi networks / isGPS)
One user hits a button, and every other user's screen flashes, (within a few milliseconds)
How to accomplish this?
What if everyone is using an iPhone?
What if there is a mix of iPhone and android users?
Finally, is there any solution that would cover a wider range of phones?
You should have some network so that mobiles can share some data. Bluetooth can have maximum of 10 m distance coverage (depends upon devices though). Since, all mobile are running same app they should be linked to a network and communicate. Please Check:
http://developer.android.com/samples/BluetoothLeGatt/index.html
You can create one device as server and communicate among other devices.
https://github.com/polyclef/BluetoothChatMulti
If you have installed the app on all of the devices then in all probability yes, if the device supports push (pretty much any smartphone) then you can use the push service to synchronize the devices based on geofencing (ie, 10m from my location), there are some other discovery routes you could try to (without using the B word) pinging other devices
the app would need to be able to provide some sort of server service if it was to create its own private network based on the IP addresses of the devices it found nearby, as those devices would have to connect to that phone acting as a server. the network interface shouldn't be important, but connecting the satellite devices to the server should be. You could try doing it based on which device can provide data services, aka hotspot. You can easily connect devices to networks programmatically.
at that point your faced with the classic client server problem. There is going to be a huge amount of work to get devices configured, network creation, client server infrastructure if it has to be done without data, packet optimization. Very expensive and very high risk depending on how many restrictions there are.
Search for How to make a html5 group chat and then build on that example.
Possibly send commands to the chat delimited by a / character where a javascript could then execute the command.
Good Luck with your design.
Danny117

Building a native app to uniquely identify, track and lock a smartphone handset

I'm currently doing some research about my project, a smartphone tracking native application, and I have four questions. Links to any material I can read up will be greatly appreciated, and the most useful/comprehensive response will be accepted.
The primary target smartphones are the Android, Blackberry and iPhone models.
For starters I found out here Uniquely Identify an Android Handset that IMEI can be used to uniquely identify Androids but I think I once read that it can be faked. I don't know about the iPhone and Blackberry.
What's the most reliable way to uniquely identify the smartphone device, if any? Can MAC addresses work or is it possible to spoof that? Can IMEIs truly be faked?
Is it possible to "lock" the device with a custom error message remotely via its unique identification, once the device is reported as stolen? This lock state will remain on the phone even when disconnected from the network, until it is reconnected to the network and unlocked remotely once again.
Assuming such a remote phone lock is possible, can such be reversible by the thief? The native app will run in stealth mode so that it cannot be uninstalled.
Can a cross-platform solution work in this case, or will I have to develop various native apps per platform?
EDIT:
Some more context. As Till rightly said, Apple's "Find my Phone" does this exact thing already (I am just finding out about it, but it looks like a perfect fit already). The user who is choosing to install the app is informed that the phone will be uniquely identified if they do install the app. As for locking the device, "Find my Phone" does it (I gather). Now I need to know how that might be possible on the two other platforms.
With regards the iPhone side of things:
You aren't allowed to uniquely identify the iPhone like that. Apple have just forbidden it unless you get the user's permission first. So if they refuse you permission, your app won't function and you'll need to find another way.
No, you can't do that.
See 2. Also you can't run an app in "stealth mode"
See 2.
Only the network operators can talk to the handsets on an IMEI level. The IMEI number IS the MAC address of GSM networks. However, you can't access that unless you have control of the network. Sure you can get the IMEI from the user, but you can't use that to locate the phone. On CDMA networks this address is called the MEID number.
But there are other ways:
You can get location data on either platform with the users' permission. This is the way you should think about developing your application. You'll want to assign a UUID to a user once they download and install your application on their phones. You can then have the phones report to a server every so often (heartbeat). As long as the phone is powered on and connected to a network, the user would be able to locate the phone.
You can also get the phones IP address on the network, among other things -- such as contacts, messages, files, cache data etc..
On Android it's pretty easy to implement this kind of functionality as a service that could would only be visible on the packages page. Further, if you have root access, you can write whatever kind of rootkit you want such that it hides itself from the system. Same with a jailbroken iPhone. I am not as knowledgeabe about iPhone services though.
Either way, the only cross platform compatibility you'd be able to exploit would be perhaps the way data is sent and received from the server. You could use some standard such as JSON to send and receive data (and hence the same server). Although, both platforms have JSON and Apache libraries, the other parts of the apps or services themselves will need to be completely and dependently developed for each platform (UI, Internal Content Handeling, Syscalls, Permissions, etc).
You can remotely lock, wipe, factory reset, etc. Android devices using the security and device administration Android system interface. This still requires the user to grant permission and it asks them an a more.. obnoxious.. way so that they know what exactly they are agreeing to when they give an app device administration permission. If you ever use an exchange server for business or school, it's likely you'll run into this.
I am unsure about remote iPhone device administration on a jailed system.
If you really want something that can't be removed lest you do a factory reset, you'll need to know a thing or two about Unix programming, and a lot about the operating systems that their respective SDK's don't (and probably shouldn't) tell you. You'll need to be comfortable poking around sources and even reverse engineering if called for. If you're still interested, you'll want to hang around the circles that work on custom phone firmware and software for the iPhone, and Android (and Blackberry). I would start with Android. It's probably the easiest since the sources for the AOSP are easily and legally available.

Categories

Resources