Can my iphone app communicate with a connected computer? - objective-c

Preferably, this would be a computer connected via cable, but if there's a way to do it over wifi then this would also be useful. I'm wondering if it's possible to send messages between them?
Or if i had a mac app and an iPhone app, could I communicate between them over wifi or a usb connection, rather than using a server or something?

Connecting over WiFi is possible, cable connection however isn't possible (certainly not in the documented API) unless the phone is jailbroken.
For wifi you're just going to connect to a TCP/IP host/socket. Have a look at CocoaAsyncSocket. The computer would need to be hosting some sort of server software. This is how iTunes Remote and AirMouse work.

There are some "permitted" (non-cracked phone) ways to send data to the iPhone from a device that's physically plugged in. There are several barcode readers - like the Linēa-pro used in US Apple stores - and magstripe readers for credit cards (e.g., the Macally Quikswipe) that can send limited amounts of data to/from the iPhone.
If your computer is a small embedded device and your data requirements are meager, it may be possible.

Related

Camera Remote API : Camera + iPad + PC?

I'm currently studying the Development Guide given with the Sony Camera Remote API beta SDK, and what I've understood so far, is that in order to send and receive messages between a camera and a mobile device, the smartphone or tablet should be connected through Wifi to the camera, which acts as an access point.
Actually, what I'd like to do after downloading a picture on the mobile device from the camera, is to pass it to a PC so that I will be able to print it and use it for other purposes. This process should be completely transparent and automatic for the final user.
Thus, my problem is that I need the mobile device to be connected, through Wifi, to both camera and PC.
The solutions I have in mind are :
Make the mobile device, and the PC, connect to the camera access point, so that they can be located on the same network.
Is this possible? I mean, can the Sony camera handle more than one client when acting as an access point? If yes, can I have a fixed IP for mobile device and PC so that I can easily make them exchange data?
Use a simple wifi router and make the camera, mobile device, and PC connect to this router.
Without acting as an access point (i.e. simple network client), can the camera be used with the remote control function?
If you guys see any other options, I'd be glad to read them !
Thanks,
Bertrand
Unfortunately, neither of your solutions would be supported. Only one device can be connected to the camera AP at a time, and the camera itself has to act as the access point (certain models support connecting to an access point from the camera but the Camera Remote API is not supported in this case).
If you don't need the mobile device to have access to the pictures, your best bet may be to directly connect the PC to the Camera and transfer the images using the API. The API is REST based so can be used on any platform.

Get type of device inserted to windows 8 pc via USB port

I've been asked to work on a project for Windows 8 where I have to detect:
Type of device inserted to USB port (mass storage drive or android phone or windows phone etc.)
Port in which device was inserted. (if I have 4 USB ports in PC then identify which port received new device)
Detect when the device was ejected from the PC
Are there some managed C# API's that can be used to query or if there are some callbacks that can be subscribes to.
Any help or direction will be very useful.
Thanks
You don't specify whether you are writing a desktop app, or a Modern UI app. If it is the latter, I'm afraid you are going to be out of luck as this level of information is simply not passed down to the app's sandbox.
You may have better luck with a desktop app. I don't have any direct experience of doing what you ask for, but I do remember having read that it may be possible through .NET.

Android tablet pc with a Nokia phone 3G data connection

This is technical question to check the possibilities of the scenario. Is it possible to use Nokia phone's (Lumia, N9, symbain phone, S40) 3G data connection with a Android tablet pc?
Or any way to use phone's 3G data connection with tablet pc?
I have a unlimited data connection for my phone. But I don't use it that much. So I'm planning to use it with the tablet pc.
yep its possible easily if :
1. your tab is rooted
2. your tab supports usb host mode or otg mode (you could either check it on net or download usb host diagnostics) (just click start diagnostic)
procedure
Downoad ppp widget
configure your apn according to pc suite settings
then plug in your phone via usb on nokia pc suite mode
now wait 10s and click connect
you are now done
(pls switch your wifi off as ppp widget creates virual wifi for your tab)
any inquiries contsct rld0989#gmail.com (don't be rest less I only check my gmail once a day)
Yes, it's possible to use your phone as a modem, connected to the tablet via a USB cable, as long as you have
(1) an APN from your network operator to make a data connection via their network, and
(2) suitable device drivers for the phone. On Windows, smartphones are plug and play, but I don't have any experience using them with Android.
On the tablet, you also need some software to control the modem - something like the Mobile Broadband Connect 3.0 application listed on here
You can write a simple connection app yourself using the Android Telephony Manager.
Alternatively, you could connect manually, using AT commands with a suitable AT command program (in Windows, it would be Hyperterminal). This thread describes a possible equivalent for Android.
Standard AT commands to make a data connection are described in the 3gpp TS27.007 specification.
There are a lot of variations for different manufacturers, but making a simple connect should be possible using the standard commands.

NSNetService on WiFi instead of bluetooth

I have 2 iOS devices and an application which starts or connects to a NSNetService.
When both devices have have bluetooth turned on the data stream will automatically be done over the bluetooth interface.
I do not want that, i want both devices to communicate over the WiFi. Is there a way to force a NSNetService to communicate over the WiFi?
Thanks
I don't think there is, I haven't looked into the docs, but I know a ton of games recommend disabling Bluetooth and ensuring WiFi is enabled for local multiplayer.

How to detect that Symbian phone is being used as a modem?

I have a Nokia Symbian Series 60 3rd edition phone. I can use it as a GPRS / 3G modem either using Bluetooth, USB or IR.
Is there a way to programmatically detect when the phone is being used as a modem?
Please note I don't want to detect when a GPRS / 3G connection comes up (such as when you use the phone browser), but when a GPRS / 3G connection comes up that is the result of the phone being used as tethered modem via BT / IR / USB.
So the user has set up a dial up networking connection on their laptop, for instance, which uses the modem in the phone. They then launch that connection because they want to make a 3G wireless internet connection from their laptop via the phone. That's what I'd like to be able to detect from the phone.
I don't believe there's any public interface that you could use for this. You could probably use internal APIs to check what is creating the data connection, or more crudely check which processes are running when a data connection is created - probably quite easy to fool this method, depends why you want to know?
I can see network operators wanting to do this to block and/or charge extra for tethering usage. Easiest way to do that would be network side though, checking the browser UA header (also possible to fool, but not without harming your browsing experience a bit on the laptop).