XMPP for exchanging game info between two iPad via Wi-Fi, good approach? - objective-c

Just got my iPad yesterday and I wanna start programming a distributed game between iPads for a little community across the globe, so no blue-tooth.
I've heard of the XMPP protocol to enable data exchange between two PCs, such like this thread on SO
Basically, the approach is a decentralized solution, once a valid connection is established between two iPads, there is no need for the server to be involved. The two iPad can communicate using XMPP. I know the majority of the data would be textual, although some images are also to be transferred across the net.
My concern at the moment is just proof of concept. Is this a good approach? How to re-connect if the connection is broken due to poor Wi-Fi signal strength? Is there a better way to do this sort of thing?
I am new to iPad game programming so any suggestion is welcomed and appreciated.

You should use GameKit for this. It's way easier and doesn't need accounts. Also all the device finding stuff is already implemented. (Apple proprietary format, iOS only)

Related

Is it possible to communicate mobile to embedded devices through ultrasonic audio signal

I am looking for a wireless communication technology for exchanging data between devices via sound in ultrasonic frequencies.It is possible to communicate with two mobile devices.I want to communicate a mobile and an embedded device.Is it possible?Any device is working with this protocol?
Of course it is possible. Back in the 1970's my TV remote control used ultrasound to change the channel and turn the TV off. The control was somewhat rudimentary IIRC a short press changed the channel up and a long press turned the TV off. It worked quite reliably for these functions.
Providing more functionality would require a more complicated modulation scheme which, as has been said in another answer, would be prone to interference from other sound sources. This probably explains why infra-red communucation signals are used in more modern remote control systems.
It is possible - why shouldn't it be? Smartphones are just embedded computers too. I imagine getting CE/FCC/etc certifications with such an embedded device will not be so easy. And production testing ...
But is it feasible? Probably not. Power consumption is a lot higher than with any RF-link, it's more susceptible to noise (quite literally) and the required components (microphone+speaker) are bigger than RF-components (antenna).
And then there's a whole bunch of other things you need to keep in mind when working with ultrasound, starting with the plastic design of the embedded device. But also things like the effect of ultrasound on people and their pets etc.

Which Netduino hardware should I use?

I am building a temporary controller that needs to monitor 20 separate button pushes along with another 15-20 analog and digital signals.
It also needs to output at least 20 different digital signals.
Which Netdurino will let me get all these different ports together on a single device?
It seems like the Netduino Go with multiple shield bases (image) is the way to go.
Can anyone confirm that this is the hardware solution I am looking for with the most analog and digital ports available?
Thank you,
Keith
Seeing as you're settled on the Netduino platform, I'd suggest you ask either on the Netduino forums or in their live chat room http://forums.netduino.com/index.php?/chat/
Alternately, https://electronics.stackexchange.com/ might yield better answers than stackoverflow.
Note that in the forum post you link to for the shield base, they indicate that only one shield base is supported per Netduino (at the time of writing, this may have changed):
Another noob question: How many shield bases can one connect to a NGO? Is more than 1 a viable option?
Currently just one. But with the final release I'm hoping on more :)

Per-Process Network Monitor in Obj-C?

I want to write a program that monitors packets in and packets out, or in other words, network statistics. Is there any useful class in cocoa? I know there are some existed tools, but it will be a sub-routine of my program. So I must implement on my own.
Thanks a lot!
P.S. I only want to calculate one program / process 's statistics rather than the whole system.
You won't find much in Cocoa, you'll probably have to delve deeper into Core stuff. In the recently released pool of WWDC videos, they have a video on Core OS Networking that covers the Mac and iPhone platforms both, and gives a pretty good overview of some of the classes you might be needing to look at.
Might not hurt to give the Core Networking stuff a glance, since whatever you're monitoring is most likely using it:
http://developer.apple.com/mac/library/documentation/Networking/Conceptual/CFNetwork/Introduction/Introduction.html

Is it possible to send OSC commands to an iPad via the Camera Connection Kit?

I'm building a small controller device that I'd like to partner with a computer. I've settled on using OSC out from my custom built hardware and am pretty satisfied with what I can get from WOscLib. Two goals I'd like to achieve are portability and a very nice ratio between battery:computing power, and this has lured me towards using iPhoneOS to accomplish my goals.
I think the iPad would suit my needs perfectly, except that using wifi to broadcast OSC out from my device requires that device to be connected to a third device with a wifi chip, and this would destroy the goal of portability, whilst also introducing potential latency and stability headaches. My question is pretty simple: Can I push OSC commands FROM my controller TO an iPad via USB and the Camera Connection Kit? If I could accomplish this, the two major goals of my project would be fulfilled very nicely.
This seems like it should be a simple little question, but researching this obsessively over the past few weeks has left me more almost more uncertain than if I had done no research at all. I'd really like some more confidence before I go down this route, and it seems like it should be possible. Any insight would be very, very appreciated.
The simple answer is that you can't :-(
In order to interface your custom hw you'll have to
obtain a license from apple.
no third device is required. you can click "create network" on your wifi menu in osx and then you ipad can connect directly to that. many apps now use osc over wifi on the ipad. some are done in java. im not sure about objective c.
You could connect a USB ethernet device to the iPad Camera Connection Kit and send OSC over ethernet from your custom controller.
Somewhere along the line since this question was asked, USB ethernet devices became officially supported over the CCK.

As a hobbyist, what do you want in a hardware dev kit for .Net Micro Framework?

As a hobbyist that works on embedded systems/robotics. What would you like to see as hardware features of a Micro Framework development kit? I have seen plenty of questions about what is available, and nothing really about what is missing. I also find most existing kits to be aimed more at product development than the hobbyist.
Are modular designs using IDC/jumper blocks better or do you prefer built in components? How many GPIO pins? Would some form of memory mapped devices be useful? Would you see a use to more than one SPI bus? What wireless/serial protocols would you like to see?
Are you talking about things like the FEZ boards or Netduino?
I think they've done some insanely great work.
For robotics I would like the development board to have a built in H-bridge (for motor control), I2C, SPI, serial, small LCD (for menus, etc.), ZigBee and/or Bluetooth.
I've always loved my Parallax Development board. I couldn't find the exact one i bought a few years ago... but this is close.
http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/123/Default.aspx?txtSearch=Prototype+board
To improve upon it, it'd be nice if it had a some more opamps. I like how you have all the peripherals around the outside that you can quickly wireup to the breadboard.