I'd like to use a computer using Windows 7 to provide data to an iOS device. I guess there is no way to do that by Wifi so I'd like to simulate a bluetooth GPS device on my Windows 7 computer so that the iOS device would connect to it.
My question is, what kind of data should I sent ? Can I directly send NMEA frames or should I implement another Apple protocol ? Where can I find specification on those protocol in iOS ?
The idea is to make geolocation data to be available to the whole system. Maybe by "simulating" a bluetooth external GPS receiver using a software that I would develop on Windows. So what kind of data should my Windows software send by bluetooth to iOS ? And how can it be detected by iOS as an external GPS receiver ?
Thanks.
I recommend to use bonjour.
It's a auto-connecting protocol which finds other "player" in the same subnet (lets say same "WiFi".
Theres a windows sdk written in C:
https://developer.apple.com/opensource/
How you do submit the data is up to you. You might create a JSON payload out of your GPS Data. You can also create a binary format and compress it with libz (zip) before sending it to your iOS Device through bonjour.
You can also set up a web server and a web service on your PC and simple connect to it through local network (WiFi) from your device. I think this requires the least work from both server and client side. Which format do you use (JSON, fractions of NMEA, something else) is really up to you since you will have to code both server and client side. For JSON and XML however there are a lot of free frameworks and even some SDK support on both client (iOS) and server (php, asp, servlets, etc) side.
Related
I've been doing a lot of reading and research on Web Bluetooth.
I just want to send some text from a BLE Server (in this case a web app running on iOS WebBLE app)...and have the text appear on another web app running on Chrome on my Mac.
I just want a textarea and a send button for the Server and a dynamically updatable span on the client.
Seems like all tutorials assume Server is some kind of peripheral (monitor, light bulb, etc)..and that you just have to write Client code to interact with it.
Is it possible to do this? Seems like it should be simple. Thanks
I guess I'm asking how to turn desktop Chrome into peripheral device using Web BT
How can I get my Mac browser to advertise using Web BT?
The Web Bluetooth API does not include APIs for acting in the peripheral role. A page using the API can only take on the role of the central.
Is it possible - and if so, how? - to print from a Firefox OS phone?
Looking for a real mobile solution - e.g., printing out a receipt using mobile phone and a small receipt printer (connected probably through usb or wifi tethering) at a marketplace, on a train, etc. (The mobile will communicate through internet with a server, so it will have an internet connection.)
If you can get the printer on the same network as the Firefox OS device then you could try running this pure JavaScript implementation of the Internet Printing Protocol to send a file to the printer from your app. It would definitely need some changes to use standard web APIs rather than Node JS APIs. It may be possible to implement it with XMLHttpRequest or perhaps something lower level like TCPSocket.
I have just delivered a prototype for a big client, everything was fine but I'm now curious to know if the solution/architecture I've chosen was the right one or there's place for improvement in case the project will keep on.
The task was to build two iOS apps: one running on 5 different iPhones, and another running on 2 iPads. Basically the iPhone applications had to communicate information to the iPads, and occasionally they also had to send information between each other (iPhone to iPhone). All the infos where small JSON objects/chunks whose size was small, really small.
The app was not intended to reach the app store, is a working prototype to test out some ideas in a user testing environment.
I discarded bluetooth because we are talking about a peer-to-peer communication, not a one-to-one.
What I did was to use web sockets thanks to SocketIO, through a small Node.js server that was running on my mac. The server was really simple, just receiving the messages from the clients and broadcasting information to the other ones.
What do you think? Is the solution I've chosen ok, or there are better ones?
For example, this morning I've just found out these thread here on SO, and I've discovered I could have used GameKit. What do you think?
Socket.IO is nice because it is fairly simple to implement but it has the downside of requiring a central server. If you wanted to avoid that, you could use the Multipeer Connectivity framework that was introduced in iOS 7.
It will let you create one-to-one communication channels between devices on either the same WiFi network or Bluetooth. Once the channel is created, you can send whole NSData objects (or create streams but it doesn't seem relevant to your use case).
A good read : http://nshipster.com/multipeer-connectivity/
The WiTap sample from Apple demonstrates peer-to-peer networking over Wi-Fi and Bluetooth. Using Bonjour, the application both advertises itself on the local network and displays a list of other instances on the network. Supports infrastructure networks, peer-to-peer Bluetooth, and peer-to-peer Wi-Fi (on compatible hardware).
I have personally tested it and it works fine and well documented.
I think socket.io is the best choice. It is built on top of engine.io (which in turn is built on the fastest websocket implementation: ws) It has oldest to newest fallbacks, so it starts with long polling and works its way up. This guarantees a quick initial connection instead of needing to poll the device for features. You can read more on this here. Best of all, it handles everything seamlessly. You write your code as if websockets are supported on connecting devices and if not it will use other methods behind the scenes.
This post details many of the websocket libraries you could use with your server. Which websocket library to use with Node.js?
I am convinced Bonjour is the best solution:
Apps can also leverage Bonjour to automatically detect other instances
of the app (or other services) on the network.
However I've never used it myself; perhaps someone who has can comment?
I have an Android and iOS app that I would like to be accessible through PC software. Currently, the mobile application will display an IP address and the PC user must manually type this number in to create a connection.
I know there is some sort of broadcasting standards, but I'm having trouble figuring out what method make sense in my case.
A solution that works for both Android (native activity, version >= 2.3.3) and iOS would be ideal.
Bonjour by Apple might be what you're looking for. It allows your application to broadcast your service over the local network so that the PC will automatically discover it. You can find more information here.
If I want to have my iOS device act as a "server" and broadcast its bluetooth services to other iOS devices, how would I use the core-bluetooth framework (or any other iOS framework) to implement this? So far, all I've seen from the corebluetooth framework is how to write the client-side of things. (Scanning, connecting to existing bluetooth services)
You can make use of the OSX sample project called DNSSDObjects. The core classes (three of them) work just fine under iOS. The code requires a few small changes to work with Bluetooth (as-is they only work with WiFi). See my answer to another question for the required code changes.
Basically you use whatever code you need to setup your server and begin accepting socket connections. You then use the DNSSDRegistration class to advertise your server via Bonjour.
The other two classes, DNSSDBrowser and DNSSDService can be used by iOS client code to find the server, or any app or program that can find Bonjour services will also be able to find your server.
There are two great WWDC video that show how to act as either the client or the server using an appropriate iOS device. They can be found here, you're looking for sessions 703 and 705.
Downloads of the source that they use can be found here. You'll need a developer account (free works) to login and view/download.