Is it possible to retrieve more precise information in cordova concerning the network ?
I have already tested : cordova-plugin-network-information, cordova-plugin-networkinterface and cordova-plugin-sim plugins, but with anyone these plugins I can't get the precision of the cellular network or the WiFi.
In fact, I seek to make reportings about the accuracy/power of the surrounding networks of the smartphone (WiFi & Cellular)
If you know a method (or idea) that works, ideally for iOS & Android, I'm ready :)
Thanks for your help!
++
I don't know of any existing cordova-plugin for this but you can always create your own plugin for such specific use-cases. SignalStrength looks like a promising way to go, probably the whole Android telephony section will be of interest for you.
You can take the network-information cordova plugin and check how they managed to send continous updates on the cellular type and then do it in a similar way for the signal strength.
For the iOS signal-strength part you can have a look at this answer on SO.
Related
I am trying to figure out how to make game which will work only locally using Wifi Direct without any internet access.
The concept is very simple. It will be some kind of presentation so I need to have one master/host device and other connected devices will be slaves/clients. When I press button on master/host than should be changed only one value (string or int) in all slaves/clients devices.
With support of 20-40 connected devices in same time.
I have Tried:
UNet - it works only if it is connected to some router with use of local IP's but it does not support Wifi direct communication.
I have tried to find some plugins but I cannot decide which to choose or get information about support of Wifi direct.
I tried to find some other solution like Bluetooth but it supports only 4-13 connected devices at same time but I need to he connected around 20-40 devices in same time.
List of plugins I have found:
Forge Networking - https://www.assetstore.unity3d.com/en/#!/content/38344
1.1 I do not know if this supports a feature i required.
WifiDirect Plugin - https://www.assetstore.unity3d.com/en/#!/content/50112
2.1. This plugins have errors and have no support.
What I would like to ask about:
Does 1. plugin support Wifi direct?
Do you think That I should buy 2. plugin and try to fix it and hopefully I can find a problem and it will work?
Do you know some better or "any" solution how to solve this problem?
I am interested in any tips and help how to make it work.
Thank you very much for your help!
Jakub Kučera
After research I have realised a working solution!
Unity Asset Store: https://www.assetstore.unity3d.com/kr/#!/content/53955
Video of usage: Video
Plugin I have tested on a few Android devices and it works for Wifi Direct with no connection to internet.
This plugin supports much more than that for example:
TCP
Client / Server
Complete C# 2.0 native
Stand alone library (DLL)
Multi-Thread
Event Driven
Support [Binary/Json] message data
Log Server & MySQL Sample Code
New Feature
Unreliable UDP
MNF Server based WinFrom without MySql
I hope it helps somebody else!
And I would like to say thanks to author and his support!
Is there any way to simulate the behaviour of a cellular mobile network (GSM/UMTS) in the Eclipse Android emulator?
More specifically: I want to develop an app to show information about the network, such as coverage level, parameters of neighbouring cells etc, as provided by the TelephonyManager and other related classes. I would like to do as much debugging as possible with the emulator, before testing in an actual phone.
For that I would need the emulated phone to "see" a functioning cellular network, with its protocols and parameters. Is that possible?
Emulator doesn't give you the option of setting that things. I have developed a toy app for showing network parameters and the only way I found was using a real phone.
By the way, not all phones implement all methods of Android's API, so you will find that some parameters will not be shown. And also many parameters are not available from API and you will need to get them throw AT commands (you will need a rooted device)
Note: I realize this question is two years old, but since this question received a slight edit from its original author 5 minutes ago and so got bumped back up to the front of the site, I am assuming that he may still be looking for an answer.
Yes, AT&T provides such a free tool to simulate and analyze different network conditions to a certain extent. And it can be used in conjunction with Eclipse ADT, Android Studio, or something else entirely. So it's not tied to any particular IDE.
http://developer.att.com/application-resource-optimizer
That being said, I have no idea if it will give you any cell tower related meta data.
I'm studying Bluetooth protocol and implementing a position system reading RSSI in dBm from some devices. System will be implemented with 3 fix stations with an known latitude and longitude and a mobile station. Positioning will be done on mobile station with the power received in dBm from each fix station and the typically position algorithm.
In order to increase the efficiency of the system, some parameters from Bluetooth devices needs to be changed. This parameters could be:
Scan time on fix stations to decrease time on response to Inquires.
Inquires access codes to get answered to inquires just from selected devices(our 3 fix stations)
Some others.
There are some scenarios that can be used to do that depending on used tecnologies(some of them are limited):
Fix stations with Linux OS(no problem to modify parameters), mobile station with Android (seems to have just typically functions on its Bluetooth library but bluetooth setting are difficult or impossible to be modified).
See: http://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html
All stations running Linux OS, and C++ on mobile station(seems to be easy to run from shell scripts hcitool for fix stations modifying our settings, but it seems difficult to implement source code on C++ to get RSSI with our need values on dBm of links to fix stations on mobile station).
The nasty way. All stations running Linux OS and shell scripts, on mobile station running under shell scripts parsing values from RSSI from output redirection of hcidump after lunching inquires.
It seems to be very difficult to find useful info related to this scenario. Maybe some one of you can help to choose best scenario and to describe how should be implemented.
(Sorry if something it's not explained in a better way.. my English is terrible..)
Thanks.
I'm sorry, I didn't follow everything you wrote, but I think the first step is to get down to the HCI layer on the fixed stations. That is fairly straight-forward to accomplish and gives you a fair bit of control.
As you mentioned, hcitool is very useful, but it doesn't matter what tool or language you use. You can access HCI commands from any language.
For example, I did something like this with Voyage Linux on an ALIX box. Voyage is debian based so now problem to load BlueZ, PyBluez, and Python. Python made it easy to quickly prototype a solution which you can convert to C++ later if need be. (More here.)
But that's just an example - use whatever stack you are comfortable with as long as you can get at the HCI layer. (Getting past the HCI layer requires you to work with a specific chipset and load code directly into the Bluetooth chipset.)
On the mobile device you might be severely limited: if you are trying for potential real world implementation. If this is just for the lab, you should get rooted Android devices that use the standard Bluez stack and then, like on the fixed devices, you can get at the HCI interface. Android is, after all, just Linux so you can do what you want if you have root.
I need to get the mobile cell tower timing advance.
Is it possible on Android 2.3+ ?
[edit]
It seems that it's not possible to retreive the timing advance...
Is it possible to know the distance between the mobile and the cell and the bearing otherwise ? I suppose I can't use the Google hidden geolocation api in commercial application ;-)
[/edit]
Thanks
For LTE technology there is already an access to Timing Advance values: see http://developer.android.com/reference/android/telephony/CellSignalStrengthLte.html#getTimingAdvance()
This is currently not implemented, and it will be a hard task because it is device-dependent.
The actual timing advance is only known by the modem, also called the baseband processor (BP). The modem is coded by the device's constructor and thus cannot be modified, and can differ between constructors and devices.
Android runs on the application processor (AP) and uses AT commands to communicate with the BP (modem). For example, Android internally sends AT commands to the modem to send SMS, receive calls, ...
The only way to get the actual timing advance would be to query the BP (with an AT command), but whether the constructors implement a specific AT command to get it is up to them. Unfortunately almost no devices implement it (only very old ones), so there is no way to get this information.
I don't think it's a good idea to use timing advance for geolocation, since it is only relevant on GSM networks. Once the device hands over to UMTS networks, no more timing advance.
Why not use http://developer.android.com/guide/topics/location/obtaining-user-location.html ?
If you need Antenna location you don't need Timing Advance. Then you need LAC, CID etc. which are all part of the public AOS API, and then you can query some public database for the location of these. There are dozens of Android apps that already does this. Perhaps even as an example app for Android developers. Google it.
However, GSM Timing Advance (TA) knowledge is definitely still of interest for several other reasons. So if someone know how to extract this info from the Android vendor RIL, please let us know.
I know it sounds weird. It happens that those Locating APIs regarding WiFi/celluar assistance are disabled in most Android handsets in China. That is, I could hear the callbacks of GPS_PROVIDER when I was out of the building. But if I was in the building, I would never hear the callbacks of NETWORK_PROVIDER. As a result, my app won't be able to locate if put indoor. (I did some experiments with handsets shipped from the states. My app located perfectly well with the NETWORK_PROVIDER if put indoor.)
My guess is that those Chinese Android handsets have sort of castrated the Android OS so that any API related to WiFi/celluar assistance locating has been removed.
But my app still needs to locate. A city-level accuracy will do.
So my question is, is there any possible solution for my situation. Right now I'm considering:
IP address reverse-lookup. But the accuracy is far worse than city-level.
Let my app collect any necessary information (such as router MAC address, celluar tower info) and send them to a third-party server. That server would locate and send back location info to me.
Find (magically) a third-party SDK and hopefully that SDK would do the trick.
Thanks in advance!
IP lookup is fine. You can also try skyhook wireless's location SDK: here
iOS in the early days are using them, and they are actually better/more accurate than Google's location service.
It is definetly possible. You look at the services of Imere's ULaP.