Is GSM data sending between 2 phones impossible? - communication

Please tell me in detail why it is impossible to send the data between two phones over GSM? I can find almost no information about this problem.

There are 2 points here.
Firstly, GSM is a mobile voice telephony system - plain GSM doesn't do data connections.
GPRS and EDGE are add-ons to the GSM network that allow data to be sent.
There are other kinds of wireless phone networks that also use a SIM and allow data to be sent (UMTS, LTE).
Secondly, when you establish a data connection with a mobile phone and a phone network, you are establishing an IP connection between your phone/modem and a gateway server in the operator's network. The gateway server allows you access to the internet (together with the DNS server etc, obviously).
This is similar to a computer plugging in a LAN cable and connecting to their ISP. But you can also connect 2 computers with a crossover cable, and configure them to have an IP connection directly. So what you are asking is, why can't I do the same with 2 GSM phones? what is the equivalent of a wireless crossover cable?
The reason is because GSM has no protocol to connect phones to each other. It only defines a protocol for phones to connect to a network base station.
To transfer data between 2 phones, therefore, you need a different protocol, one which will work between 2 peers. Bluetooth is a common such protocol, but it only works over short distances.
If you want to connect 2 distant phones, you can do this via a third party, like a website, to which data can be uploaded into the cloud by the first phone and downloaded by the second phone.
Or, you could establish a connection at the IP level via the internet, e.g. if one mobile device was a web server (the last sentence is only theorising).
See also this related question
EDIT: 3GPP Release 12 includes direct Device to Device communications. At the time of writing, it's still very new, and not yet commercially available, so the answer above still holds. D2D is designed for emergency services, eg if the network is damaged by a disaster, they can still communicate directly. But 3GPP suggests that it will be commercially available as well. From 3GPP news
There are also commercial benefits of D2D, with new applications building on the physical proximity of users being trialed by operators.
2nd EDIT: Apple has created a feature called Multipeer Connectivity Framework, which uses a mixture of WiFi networks, peer-to-peer WiFi and Bluetooth to enable short distance connectivity between iPhones when there is no GSM network.
NFC is another peer-to-peer technology for communicating between 2 devices, that is supported by some phones. More information here.

Related

How to link/pair HTML 5 with a hardware device?

I have two entities which I would like to be able to start a communication:
Hardware Device Using Atmel ATSAMS70 and WINC1500 Wifi Module
HTML 5 App
The idea to have a HTML 5 app is to be able to communicate easily with most of the commercial devices like: Windows computers, Android Phones, Mac OSX computer and iOS devices. Apart from that, I would avoid working with native code at all.
Currently, they can talk with each other using WebSockets but somehow the IP address of the custom board has to be known from HTML 5 to initiate the communication.
In order to do this, I can think of 3 options:
Using WebRTC I can get the local IP address of the browser and then I could do a scan of the local devices considering a 255.255.255.0 network mask.
Have an external server that the hardware device can send its local address which will be later retrieved by HTML 5.
Using Bonjour or some sort of device discovery service between the board and HTML5.
I could not find a way to achieve #3 but #2 seems feasible to me. #1 is what I am doing now, but WebRTC is currently not supported on iOS.
So, is there any other better possibility to achieve this communication?
You don't mention how the WINC1500 unit is being connected to the network but presumably this is in STA mode (acting as a wifi station rather than becoming a software access point or part of an ad-hoc network) and is being provided with its IP details through an existing access point?
Ordinarily I'd suggest that once connected, the device ought to start indicating its availability on the network via a regular UDP broadcast on a specific port but my (admittedly limited) understanding of WebSockets it is that it creates TCP connections. The only implementation of Bonjour that I've seen uses UDP messaging too, that may be why you've had trouble with your third approach.
Your second approach seems more likely to work well. A server at a known (or discoverable) IP on the local network which allows the Atmel device to register itself (and its IP address) and also allows other applications (your HTML 5 WebSockets applications) to request that connection information to allow them to create the WebSocket TCP connections they need.
I suppose that doesn't really answer your question as to "Is there a better way?", other than to say "Not that I can think of, your second approach looks good to me...". Sorry! Sounds like a very interesting project, overall,

Internet access between WiFi-IoT in Access Point mode with mobile phone connected

I did a lot of brain-storming about this, and couldn't reach a solution.
I am posting this as i can get some ideas.
I have developed a WiFi-IoT based device with sensor, which shows up in AP mode. A mobile phone connects to this AP and then the device starts sending sensor data to the mobile phone. A mobile application plots and displays this data.
Now, i want to send this data from mobile to internet. Connecting my mobile to another AP with internet is not an option, as i don't want to break the continuous data transmission.
Using internet of data provider is one option, but that brings constraint of have mobile data.
What other options do i have to send my data from mobile to internet ??
Edit:-
I worked on the suggestions, and came to this point:-
1) WiFi-IoT device (in station mode) and mobile phone connect to same Internet-enabled WiFi access point. WiFi-IoT device has the IP address of the mobile phone for current network, and sends data to a TCP port (eg. 9801) of this IP address. The application in mobile phone reads the data from the port no. 9801 and stores it and hosts it on the internet.
This works fine.
2)WiFi-IoT device comes up in Access Point mode, and the mobile phone connects to this Access Point. Now there is one-to-one connection between WiFi-IoT device and mobile phone.
My question is, in the second scenario, without breaking this one-to-one connection, is there way to host data to internet:-
1) without using mobile internet provided by mobile data service provider ?
2) without using a second mobile phone ?
I may be wrong, but i am just asking this to make be sure whether my requirement can be achieved or not !!
I don't think you can connect to two APs at the same time.
Maybe use Bluetooth as device to phone link?
Or have the device connect directly to internet after some config done in AP mode and then send a copy of the data to your phone app (either via WAN or locally to the private IP your phone gets from the Internet gateway AP)?
--Edit--
Let me explain about the second one:
What I mean is basically have your IoT device directly connect to Internet and send data to a server (your phone has also to be connected to Internet). Then make the server send a data copy back to your phone. It's two step process: 1) while the IoT device is in AP mode, use your phone to login and configure which Internet-connected AP it should be connected to. This serves as UI for your IoT device. 2) start sending data.
Or a bit ugly, just let the IoT device talk to your phone in the same WiFi network via private IP.
I brought up this way because you mentioned anyway your device has to send data to Internet(I assume it's a server) and have phone talk to a known location server is more portable and scalable once you have more than one IoT device.
--Further Edit--
I don't think there is a way to do what you described. At least from my experience:
1) on the link layer, the wireless NIC has to be able to connect to two APs at the same time. This is not a feature currently available.
2) on the network layer, there has to be two IP address attached to the same NIC, which I don't think is available in current OS for wireless NICs. Though there is a way to do this for Ethernet card, I.e. via Aliasing.

Is it possible to utilize carrier data and WiFi connections simultaneously within an App?

The theory in question is that I have a device that emits its own WiFi network. In order to communicate with this device, you must be connected to that WiFi network, but as it does not provide internet, your connection options are blocked.
What would be ideal, is to connect to this device, collect data from it, and transmit/push this data to a server located online via whatever means.
This question has been asked before, but the responses and questions I found were a few years old, and the OS has been updated a few iterations since then.
Is it possible, via Swift or Objective C within a mobile iOS app to utilize the connection of WiFi, but use carrier data to transmit that collected data?
I would use the BlueTooth API for this. However, there are two restrictions: 1) you cannot connect to a BlueTooth device in a captive network, and 2) you will not be able to connect to Android devices via BlueTooth.

What is AWDL (Apple Wireless Direct Link) and how does it work?

I'm trying to find out what AWDL is. On iOS, if you use Apple's peer-to-peer networking over BlueTooth, it seems Apple creates a new Network Interface "awdl0" to implement (I guess) IP-over-BT.
But I can't find any docs on this tech, or this interface, how it behaves, things we must / must not do with it, etc. Google comes up blank :(.
In particular, I believe it means "established a BT connection, and I'm running an IP bridge over the top, and you can use this to communicate peer-to-peer". Apple's own system libraries have bugs where this bridge isn't setup quickly enough, and if you send data too soon, it appears to get dropped by the OS. So ... if I can query this awdl0, I hope to check "are you ready yet?" and delay P2P messages until the OS is happy.
UPDATE
More info: I can get pairs of iOS devices to create awdl0 connections to each other - but they never get created to OS X machines, whether BT and Bonjour are on or not, whether the devices are paired or not.
Some background:
In iOS5, Apple permanently disabled the Bluetooth parts of Bonjour/Peer-to-peer networking, and published a technote instructing everyone to use DNS-SD if they wanted to keep using Bluetooth as a transport between iOS devices. This is fine, but it means you must use DNS-SD if you want high-performance BT, and you want it reliable.
(GameKit sometimes works fine, but we often see terrible performance in real-world scenarios, e.g. crowded public places - which goes away if you use DNS-SD)
DNS-SD protocol doesn't include info to tell you what the hardware is using. But it does tell you the Network Interfaces (which is how I know we're running on awdl0)
DNS-SD is awesome, and we have high-speed, low latency connections peer-to-peer between iOS devices - all the stuff that GameKit promises but often fails to deliver whenever there's more than a few wifi/BT devices in range.
AWDL recently caught a lot of attention when it caused Wi-Fi issues in iOS 8 and OS X Yosemite devices.
What is AWDL?
AWDL (Apple Wireless Direct Link) is a low latency/high speed WiFi peer-to peer-connection Apple uses for everywhere you’d expect: AirDrop, GameKit (which also uses Bluetooth), AirPlay, and perhaps elsewhere. It works using its own dedicated network interface, typically “awdl0".
While some services, like Instant HotSpot, Bluetooth Tethering (of course), and GameKit advertise their services over Bluetooth SDP, Apple decided to advertise AirDrop over WiFi and inadvertently destroyed WiFi performance for millions of Yosemite and iOS 8 users.
How does AWDL work?
Since the iPhone 4, the iOS kernels have had multiple WiFi interfaces to 1 WiFi Broadcom hardware chip.
en0 — primary WiFi interface
ap1 — access point interface used for WiFi tethering
awdl0 — Apple Wireless Direct Link interface (since iOS 7?)
By having multiple interfaces, Apple is able to have your standard WiFi connection on en0, while still broadcasting, browsing, and resolving peer to peer connections on awdl0 (just not well).
You can find more info here and here.
I'd like to provide a more precise answer as to how the protocol works internally. I quote part of the abstract of this paper.
In short, each AWDL node announces a sequence of Availability Windows
(AWs) indicating its readiness to communicate with other AWDL nodes.
An elected master node synchronizes these sequences. Outside the AWs,
nodes can tune their Wi-Fi radio to a different channel to communicate
with an access point, or could turn it off to save energy.
From a user perspective, AWDL allows a device remain connected to an infrastructure-based Wi-Fi network and communicate with AWDL peers "at the same time" by quickly hopping between the channels of the two networks (AWDL uses fixed social channels 6, 44, and 149). In contrast to the previous answer, we found that current versions of AWDL work fairly well and channel hopping only induces a small overhead.
Disclaimer: I'm co-author of this paper and we retrieved this information by means of reverse engineering. If you are interested in the details, please read the paper and have a look at the Wireshark dissector (published soon).

How do I communicate between devices connected to a WiFi Access Point?

I have got a couple of phones and another couple of PC's connected to a Wifi access point and need to send and receive messages between either of these, I mean anyone can send a message to anyone and receive a message from anyone.
I am willing to write apps on the phones(Symbian OS, S60 platform) or PC(Windows), but what I can't understand is how do I set up a client or server, since any one of these devices could be a client or server.
If I use sockets do I have to script for ServerSockets and also Sockets on each of these devices? Can I use the HTTP protocol?
Alternatively any standard protocol that I could use to implement this?
You would broadcast UDP packets which would arrive at every device on the Wifi network. You would have to invent your own protocol to decide on the identity of each device, since you wouldn't be able to easily infer the IP addresses of your network devices. Without writing an election algorithm you would find it difficult to use a client/server architecture, so just use point-to-point (P2P).
Google for UDP broadcasts and read the relevant RFCs at ietf.org.
It seems like you're looking for pretty typical peer-to-peer communication over IP. I suppose other requirements will dictate which transport you use (HTTP, raw sockets, etc), but yes: Each node will be both a client and a server. You could possibly use MDNS (http://www.multicastdns.org/) to help the nodes find eachother in an ad-hoc manner.

Resources