To make bluetooth connection pc between device through web app, pc side program, what is it made from? - server

I almost understand how to send message device to device.
But, I don't know how to do this with pc.
I tried to find it, but the most curious thing is,
'How can I make server side program on pc?'
I know how to provide web service by server, but for that, I have to make environment like APM on PC.
But, that's not what I want. Because it means, someone who want to use that program should make environment like that I have.
Actually, I tried to make remote controller application like X-remote...
That kind of applications, just download program and install it on pc, then pc act as a server.
what is it made from? C#? php? Java swing?? I have no idea about that...
Device is Tizen, so we will make a web app.
How can I make pc program like other remote application?

It seems that right now you cannot emulate Bluetooth on Emulator. As far as I remember when developing some sample applications, we have been using some fixed data. You could also write whole application using simple PHP server, and change the communication from HTTP to Bluetooth at the end of development.
Please analyze BluetootchChat sample application in the SDK, it should give you an overview about the BT communication in JavaScript.
Remember about the privileges in config.xml file.

Related

iphone: a local server to test my app

the app that i'm developing, needs to interact with a server, to accomplish some operations: save user's data, retrieve data about other users, services and so on...
before paying to rent some space on a server, i'd like to test my app making it interact with a server located on my computer, simulating a real a LAMP server as a localhost.
did you ever tried to do the same? can you suggest me a LAMP server that i can use locally?
do you suggest any other solution in place of the one i'm seeking?
thanks for help
While the server is running make your requests to your own IP address. I'm fairly confident this will work while you are using the simulator, and likely it will also work from an app.
In terms of finding LAMP server software for the mac... you should check out MAMP which allows you to simulate a server on your mac.

How to create a Mac/PC server app that interacts with iPhone/iPad App?

Can someone please point me in the right direction to create a Mac/PC server app that runs in the background and connects to an iPad app over the local WiFi network?
No matter how I phrase a search on Google it just brings up various apps like Remote Mouse and whatnot and no tutorials or even a hint of where to start.
I just need to send simple commands from iPad to computer over local wifi. A point in the right direction and I can likely fill in the blanks.
Thank you.
Thomas
EDIT: I am using web languages for the iPad version that I will build as a native app using open source tools.
OK, then. It actually depends on what you really need. I made the assumption you need real-time and perhaps binary data transfer.
Your best bet is to write your server application using standard C or C++ so it compiles on both as simply as possible.
If you want to avoid all the burden of writing a protocol for service discovery or asking users to enter the ip address of your server you will use a mDNS implementation for your server and your iPhone app.
If I were you I would try bonjour: http://www.apple.com/support/bonjour/
on iPhone You could start here: http://developer.apple.com/library/mac/#documentation/Networking/Conceptual/NSNetServiceProgGuide/Articles/PublishingServices.html
Once you have your sockets you will have to implement a networking protocol between your server application and your iPhone app.
You will have to be careful about byte ordering and little subtle problems with latency, disconnections and other problems inherent to networking and WiFi.
In windows you will want to register your application as a service and in Mac OS X/UNIX you'll probably want to deamonize it.
Good luck!

How to write an iphone application to control a device that exposes a telnet api

I have to write an iphone application that controls a device. This device exposes a telnet based interface. The application should ideally have user access control and customizability for each user.
I was thinking of writing C++ classes that would communicate with the device using sockets. This functionality can then be exposed through web-services that can be called by the iphone application.
However as i looked into it deeper, the api allows you to register for events using telnet and then you can receive notification when those events occur. That kinda put a spanner in the works for me. I for one dont know a "push" scenario can work with webservices.
First off i have never programmed for the iphone so far. So i am not really sure what can be done. So i was thinking if instead of having a webserver to go through, why not have the application independently running on the iphone, directly communicating with the device using sockets. The question though is, is that possible and second i am thinking it would raise a security aspect. First we could control security as everything was going through our central server. Is there a way to handle security (in the sense who has access to the device) without having a central server.
I am sorry that this seems like an unorganized post, but iam trying to brainstorm here.
Looking forward to hear your opinions.
Look up the NSPort and NSStream classes.
I'm looking to do this same thing. Have a program running on one computer and want to send/receive telnet commands from iOS. Built one for Android using the Commons library- which has a telnet client API, but don't know the best way to do it in Objective-C (without writing a telnet client library).
As a start, however, I found the OFC library on Google Code. Looks like something of a Commons-like feel, and there seems to be a telnet client. You might take a look at that.

iPhone interaction between PC app and iPhone app using USB

I know since the 3.0 SDK we can use accessories, so my question is simple, what is the process to make an iPhone app and PC (or Mac) app interact, using the USB ?
I don't ask you any code, but just the paths and the keys for making that work.
Have I to access the iPhone disk through SSH and work with files ?
Or can I send data from the iPhone app and intercept (get) it on the PC app (and send data from PC to iPhone) ?
Thanks, and if this question is stupid, just tell me, I didn't find on Dev Center (I don't really know what I have to looking for...) !
Edit : I read some news from Microids, they will synchronize PC and iPhone games (i.g here), and somewhere (I can't find it again) they say connecting the iPhone on the USB, so I think this is possible
USB access on the phone is only supported via the External Accessory Framework. You cannot hook the iPhone up to arbitrary USB devices, the devices actually have to support the EA protocol. You can get more details about it via the Made for iPhone program.
Other than that there is no USB access available on to applications.
You want the External Accessory Framework. Having said that, I'm not sure that Apple's intention was for you to communicate with an application on a PC/Mac. It's really for talking to accessories such as iPod docks, remote controls, etc. Apple may not allow an application that talks to a PC in this manner in the App Store.
You might be interested in ssh_relay (earlier called iphone_tunnel).
There is a /System/Library/Lockdown/Services.plist on your iPhone and you can start any such services via AMDeviceStartService and then communicate with it.
The ssh_relay demonstrates how to do that by having a simple port forwarder as a service on the iPhone site and the client application on your PC, so you can forward any local iPhone port to your PC. This is not exactly what you wants here (it is handy in the case you have already another service running on the iPhone which communicates via simple TCP and you want to access that; for example SSH) but based on this example, it should be straight-forward to have any communication between the service (in Services.plist) and your PC.

how to export data to computer(PC) using wifi or http connection?

I have made Iphone applicatio. In my application whatever data i have recorded; all that data i want to export to the Computer using the application.
Is there any way available to sent data to computer using wifi using developed application? Can we use Bluetooth or Http connection to send application from device to the PC?
if we can than how can we manage the bluetooth and how to use it without Jailbreaking?
if any body has any solution,please give any code or any link or any other solution which would appreciated.
Thanks,
Mishal
Your best bet is to send the data using HTTP or FTP to a server, which could be your PC. Would that work for you?
Here's one way to do it.
Here's another.
And one for FTP.
I dont think you have an option to gain control of a computer and toss a file in there from within an iPhone app. You cannot do it over the usb cord, you cannot mount the drive unless you roll your own fs mounter (pretty difficult), and you cannot push a file over html or something and have it magically appear. The user would have to interact at some point.
Many times, this is done over html. In my apps, I use CocoaHTTPServer to get local info into and off of the phone. You run the server and out-of-the-box, it indexes all the files in the documents directory for you to download from any browser on the same wifi network. Give it a shot as it is a easy to implement solution for getting large files off the phone without having to resort to something clunky like email