Send data to IoT device on home network from remote server - networking

To stop an internet connected device (lets say it's an internet connected thermostat) from having to poll the remote server all the time to see if the user has changed its settings how would a server send data to that device when needed? I understand how to initiate a connection from the internet connected device, just not the other way round.
It's safe to assume that the device would have already registered it's details with the server in some kind of set up process initiated by the device.

Check out SignalR, in these links:
http://signalr.net/
http://www.asp.net/signalr
http://www.codeproject.com/Tips/590660/Introduction-to-SignalR
HTH

Related

SIM5320A, device connected to 3G Network but can't ping server

I've been trying to make this SIM5320A module send HTTP requests to my server but even though it appears connected to the internet I can't seem to ping any server or make any requests.
I'm sending AT commands through a terminal on my Linux PC.
AT+CPIN appears READY
I've configured through the AT+CGDCONT, AT+SOCKSETPN = 1 and AT+CGSOCKCONT commands, adding my service provider's APN.
AT+NETOPEN returns OK. Running it again returns Network is already opened.
AT+CPSI? show's that it's connected to the WCDMA network and is online.
AT+IPADDR throws a proper IPv4 address.
So I'm trying to do AT+CPING="google.com",1 but it just won't connect.
I've even been able of sending a SMS and reading GPS coordinates, just failing in the internet stuff.
Am I missing any configuration steps? There is so little information online on this device.

Can an already on PC respond to a Wake-on-Lan packet?

Can software respond to a Wake-on-Lan packet, or does it get filtered out by the NIC and/or OS?
My PC receives a Wake-on-Lan packet when one of my devices can't connect to the service it's expecting. If the PC is off, the packet will cause the machine to boot up, as expected. Unfortunately, it's possible (and common) for a PC user to quit the service manually. This leaves the system in a bad state where the machine is on but the service isn't running.
This particular service (Steam Big Picture Mode) doesn't have a 'run as service' option, and doesn't provide any other hooks to start it remotely. I'd like to write some bootstrap code that listens for the WoL packet and launches the service.
I want to honor the user's request to close the service on the host, up until the point that the WoL request is received. Thus, I'd prefer not to write a process that just monitors the service health and re-starts it when it's closed.

Asterisk server connected to ATA adapter needs to be always powered on?

my setup would look like this:
ubunutu linux pc running Asterisk Server
analog phone connected to the VOIP ATA adapter
VOIP ATA adapter connected to Asterisk Server via Ethernet
I have only found information about setting up an extension within the Asterisk Server for the ATA. Here the SIP account for the phone is configured within Asterisk, it becomes clear to me that the Asterisk Server needs to be powered on at all times, otherwise the ATA won't be able to send/receive any phone calls.
My Question
Is it possible to let the ATA adapter store and manage the SIP accounts while the Asterisk Server monitors incoming calls (I need the called id) and also can send a desired phone number to the ATA to initiate an outgoing call. With this even if the Asterisk Server is powered down the user still is able to make/receive calls via the ATA adapter using the analog phone. If this is possible, could you please give me a reference or hint how to setup the Asterisk extension for this situation?
If you have linksys adapters, you can create dialplan on adapters to callout directly other adapter(with static ip) in case if server is down.
On most adapters you can use backup proxy if primary proxy failed
Thats all.
In most case if your server is down, you have no phone service

How to reach my IOT device from everywhere without static IP

I am able to access to my IOT device if I assign it a static IP with a service like dydns. But I would like to be able to reach it without relying on something.
I was thinking that my IOT device could ,on every start, write in a database its IP adress so my script on the server knows its ip.
The problem is that the IP will correspond to my hotspot IP. I am missing the connection part "hotspot -->IOT device".
For example I would like to be able to connect my IOT device to my mobile phone in hotspot mode.
One way to do this would be to re-design your system: if when it comes online the IoT device always connects (and stays connected) to a server component (which has a well-known/unchanging hostname/IP address), then the server can always send the IoT device a command over that TCP connection without knowing the hostname/IP address of the IoT device, and without it having to be contactable from the internet, i.e. this approach is firewall-friendly at the device end.
This is how the IoT is architected when using e.g. MQTT: devices connect inwards to the MQTT broker (i.e. server). MQTT also removes the need for the server application itself to need to connect to the clients. MQTT uses a concept called publish/subscribe with pre-agreed 'topics' - the client will subscribe to a 'command' topic, the server app publishes commands to that topic and the broker handles forwarding the command to the device. Incoming data from the device is published to another topic and the server application subscribes to that topic, the broker forwards the published data. You can try pub/sub example (using a browser, but real devices can also connect to the same server) using e.g. http://m2m.demos.ibm.com/utilities.html

Moxa NPort 5210A Functioning

I need advice on this product Moxa NPort 5120A I use to convert the serial outputs of some ethernet cards in order to be able to connect to the network.
Using the Realcom Mode, but whenever I connect it to your network and want to use a software from the PC to control it I need to open the software NPort Administrator, add the device, and then open the Web console, otherwise the doors do not appear to be open and if I do not open the web console software NPort Administrator (with the appropriate button) and I type the IP address of the port in the browser always comes back to me that the server is not responding and I do not load the web page. Has anyone had experience with the Moxa and their products? And 'it possible to use this module that I always have to open the software and open the Web console without having to change any settings to enable the COM port?
Thank you.
Normally with these types of devices you use TCP/IP sockets for communication with the device(s) on the other end. In your application you create a socket and listen for connections. Once a connection is made you process the data coming in and send data out to the device.
You also configure the device on the other end to tell it to connect to a specific IP address/port which is the server or PC running your software which is listening for the connection.
It sounds like that device also offers a device driver that can be installed and causes it to emulate a serial port. In that case, you would configure it that way and have your application open a serial port and communicate with the device as if it were actually attached to a real serial (COM) port.

Resources