Azure IoT Communication - ios

I have an embedded device that can be controlled by JSON over UDP. I am currently performing this via an iOS App, and everything works great.
I am now wanting to be able to also control my device from a remote location. And am wanting to use Azure to perform this task. I envision that I will set up an Azure Website which will enable me to select options which then send the JSON to my device, which is behind a firewall.
My question is which of the Azure Services should I be looking into? Also, what is the best way to get the JSON packet to the device behind the firewall (I do not want to use port forwarding).

In general, to avoid an attack surface from outside your LAN (where you have your embedded device), the better solution is to open and output connection from embedded device to the cloud and to leave it open so that it can send and receive data/command.
In this case, on Azure you can use the Service Bus (queue, topic/subscription or event hub) to send/receive with AMQP protocol but it is strictly related to your device and capabilities.
Can you share more information on it ? How much it is a constrained device or a more power device with an high level OS (Linux, Windows, ...) ?
Paolo Patierno

About using Amqp on devices running android is very tedious. The java implementation in dalvik is missing a lot of required apis to be there.
By the way, do you know where we can find information about related path segments to use in amqp pure syntax in Azure, to interact with IoT-Hub end-points. Like for queue for example, we can have :
amqps://:#.servicebus.windows.net/
Thanks

Related

Communicating between a Lightroom plugin and an iOS app over a LAN

I've asked this on Adobe's LR SDK forum, thought I'd ask here as well.
I want to create a plugin for Lightroom 6+ that allows two-way communication to take place between a LR plugin and an iOS app. The iOS device would be on the same local network.
What is the best method of accomplishing this? I was thinking about using LRSocket, this is the most direct method? I assume with this method the iOS app would need to act as the server and the LR plugin would be the connecting client? But, all the documentation and examples I’ve found, regarding general LRSocket usage, imply that localhost is used. This would make direct communication with an iOS device over WiFi impossible if it can only use localhost?
Any information would be appreciated.
I've just started out trying to do the same thing, albeit with an Android app, and run into the same (apparently insurmountable) issue that LrSocket.Bind only seems to be able to bind to the localhost interface.
The only way I can think to get around this is to have an intermediary port forwarder on the LR host OS that forwards traffic between localhost:port and ethernet/wifi:port
You could use ssh on a mac, I guess, and there are port-forwarding applications for Windows (ssh is allegedly coming soon). PassPort (an old application from the XP era still seems to work).
It's a bit....messy, though.
Another option would be to use LrHttp.get (and/or .post), but that's going to have to poll for information, and may be a bit laggy for some requirements.

I have a TURN server, but what do I lack ?

I am building a WebRTC videoconferencing service for iOS and Web. We have so far used tokBox, they deliver the whole package (client API (ios and web) + TURN server. Their solution also takes care of generating tokens and session ID etc. But we want to have our own setup, and a partner has given us a TURN server. But, what do we miss to be able to have a webRTC video conference between iOS and a web client? What service will let us just plug in the TURN server address/credentials and have it work both from a web and iOS client? Are these suitable packages: EasyRTC, SkyLink, AppRTC ? We don't need a lot of features, just 1-1 videocall with no bugs. Which one is best?
at minima you will need a signaling server.
apprtc is a complete application, it is not suitable for what you have.
tokbox is a PaaS, so you could replace it with another PaaS (skylink, forge, ...)
easyrtc gives you the code of a signaling server, but not the infrastructure (load balancing, ...), you can use it if you re ok to host it.
you might want to go for peerJS (open source, both hosted and DIY options) if you really want to do it yourself. Otherwise, just changing PaaS is not making a lot of sense. You have to think about everything you're gonna lose as well (recording, archiving, media server, ...).
If your use case is well defined, you can ping me offline, and i'll point you to additional resources.
You can look to Kurento media server.
You can use the service provided by anyconnect SDK. They provide the leading Peer to Peer connectivity between any two nodes whether browser, desktop or mobile platforms. They also provide STUN,TURN and Signaling (SIP,XMPP) server support. Using their SDK will let you just plug in your server credentials and transfer any type of data.

how do i access my cisco router details from ios mobile

Is it possible to access my Cisco router details like Name,Model,IP Address,Connection status etc from my iOS mobile.
I'm even ready to write small mobile app in iOS to get all router details.
Since I have just started learning in iOS, don't know if any library already exists for above task.
If my router does not work or gets hang.. I even want to try for restart of router using my mobile.
If example code exist, it will be very useful.
Like Cisco already has andriod and iOS app for same above function but dont want to use this app and want to write my own app with limited features only.
(http://www.addictivetips.com/mobile/cisco-connect-express-manage-router-settings-remotely-android-ios/)
Thanks,
Accessing network gear is best done by using SNMP. Cisco has extremely rich management/monitoring capabilities via SNMP and all of their MIBs are publicly available here.
Almost all Cisco gear supports the SNMPv2-SMI MIB (the 1.3.6.1.2.1 OID) so querying things like sysName, sysLocation, sysContact, sysDescription, sysUpTime should be very easy. This MIB even supports tables for listing all the interfaces and IP addresses and has a whole lot of other things that might be of interest to you.
If you have SNMP write access on the device then you can even make config changes and perform management functions like rebooting or bringing an interface up/down.
There are a few SNMP libraries for ObjectiveC and I think Net-SNMP is the most popular (It's not .net even though the title suggests that).
If you are new to SNMP then I suggest starting simple by querying easy objects like 1.3.6.1.2.1.1.5 (sysName) and 1.3.6.1.2.1.1.6 (sysLocation) before trying to jump into tables like 1.3.6.1.2.1.2.2 (ifTable)
Remember, you don't have to stick with the standard MIBs you can download all of the custom ones that are particular to your device which will give you incredible amounts of flexibility.
You could use a screen-scraping technique to telnet or ssh to the Cisco device and parse the "show version" output. This will give you some of the information you need. For others, like IP addresses, you can use "show ip interface brief", "show cdp neighbors" etc. as you need.
Keep security in mind: make sure that telnet/ssh credentials are adequately protected in your app's settings, and try to restrict your commands to those that do not need privileged access on the Cisco device.
Be aware that Cisco devices have a small pool of available VTYs, and every telnet/ssh access from your app will use up one VTY. So if you have for example 30 guys wanting to use the access the device simultaneously from their apps, some of those instances are not going to get access to the device.
If this is a concern, SNMP is a better and more scalable option as suggested by previous answer. Make sure that you (a) have a read-only community string configured on the device, and (b) use only the ro community string from the app.

Using Node js in Multiplayer turn based game in ios

Hope u guys are doing great.
I want to make a realtime turn based game in iOS .
I know this can be achieved by using GAME CENTRE in iOS , but i have to play this between browser and iOS app. WEB TEAM is using node js for making this game on web browser , they also suggested me to use node js in iOS game as well.
Have anyone has idea how to use node js for this kind of purpose.
Thanking you all! :)
You can have websocket server written in node js and then just connect to it from your ios app using some websocket library (hope it exists). Then sockets connected from browser and your app can realtime exchange information.
You could use a pub/sub messaging service like Realtime (the company I work for) http://framework.realtime.co/messaging/
Both your node.js server and your ios devices could exchange data through Realtime pub/sub channels, using the node.js and ios SDKs.
The cool part is that since it's a managed service you don't need to worry about the server and networking administration, Realtime will take care of that for you.
I'd like to add some words in favor of #Edgar's answer.
For production, using only WebSocket is not reliable. In environment where WebSocket is not available due to antivirus, enterprise firewall, and so on, a kind of full duplex connection over HTTP should be available utilizing long polling or streaming in terms of reliable real-time connection.
Also such connection might be disconnected for a while e.g. moving away from Wi-Fi zone and then some messages which had to send through that connection may be lost so that a way to recover such messages is required e.g. here is some messages you couldn't receive.
Therefore, you need a reliable framework to write such real-time web application. Here's features which are required to write a real-time web application I think. (It's called Cettia and I'm the author of that project. As it doesn't provide iOS client, it's not right choice for you here. Just focus on features and roadmap to see what features you may be needed and evaluate a framework you will choose based on them.)
On Node.js world, socket.io framework has a great community so I'm sure someone already wrote iOS client for socket.io. Anyway, make sure that the framework you finally chose has features you need to write your real-time webapp.

Sending large amounts of data from windows app to service app

I'm building a system with some remote desktop capabilities. The client is considered every computer which is sharing its desktop, the server is considered a central server with a database which receives the images of all the multiple desktops. On the client side, I would like to build two projects: A windows service application and a VCL forms application. Each client app would presumably be running under a different user account on the computer, so there might be multiple client apps running at once, and they all send their image into this client service, which relays them to the central server.
The service will be responsible for connecting to the server, sending the image, and receiving mouse/keyboard events. The application, which is running in the background, will connect to this service some how and transmit the screenshots into the service. The goal is that one service is running while multiple "clients" are able to connect to it and send their desktop image. This service will be connected to the "central server" which receives all these different screenshots from different "clients". The images will then be either saved and logged or re-directed to any "dashboard" which might be viewing that "client".
The question is through what method should I use to connect the client applications to the client service to send images? They will be running on the same computer. I will need both the abilities to send simple command packets as well as stream a chunk of an image. I was about to use the Indy components (TIdTCPServer etc.) but I'm sure there must be an easier and cleaner way to do it. I'm using the Indy components elsewhere in the projects too.
Here's a diagram of the overall system I'm aiming for - I'm just worried about the parts on the far right and far left - where the apps connect to the service within the same computer. As you can see, since there are many layers, I need to make sure whatever method(s) I use are powerful enough to accommodate for streaming massive amounts of image data.
Communicates among processes, you can use Pipe/Mailslots/Socket, I also think while sending a stream file Shared Memory maybe the most efficient way
I've done this a few times now, in a number of different configurations. The key to making it easy for me was using the RemObjects SDK which took care of the communications part. With a thread that controls its state, I can have a connection to a server or service that is reliable, and can transfer anything from a status byte through to transferring many megabytes of data (it is recommended that you use small chunks for large data so that you have more fine grained control over errors and flow). I now have a set of high reliability templates that I can deploy to make a new variation quite easily, and it can be updated with new function calls without much hassle (first thing I do is negotiate versions between the client and server so they know what they can support). Because it all works at a high level, my code is just making "function calls" and never worrying about what the format on the wire is. Likewise I can switch from their binary format to standard SOAP or other without changing the core logic. Finally, the connections can be local, to the same machine (I use this for end user apps talking to a background service) or to a machine on the LAN or internet. All in the same code.

Resources