Communicating with peripherals and I/O ports from Silverlight? - silverlight

Before moving towards silverlight.. I want to know if the latest version of Silverlight 5 is capable of communicating and interacting directly with I/O ports or any other USB HID devices/ peripherals?

I think the only way you could do is to run it in a browser and use pInvoke calls.

Related

Does Cn1 support serial ports?

I will need the ability to communicate with a device attached via USB that shows up as a serial port. Is this possible with cn1? I haven't seen any reference to it. Does the native java import javax.comm.*; work on all platforms?
No, comm isn't portable. You would be able to bundle it into the desktop port but you'd need a different implementation for everything else using the native interfaces.
Before we had builtin support for sockets Steve created a cn1lib for socket support which you can use as a reference to how one would implement streaming data over native interfaces

CAN Communication

How can I implement CAN communication in c# windows application. I have to create an application that communicate to the device. In earlier project I used serial port. What will be the major difference between these two.. Am new to this topic.
You need a CAN controller. I would recommend the PCAN USB from PEAK Systems.
Install the drivers
Download the PCAN API from PEAK System web page. (contains C# wrappers)
Use the API in your application to send and receive CAN frames

Can Xbee run code without being connected to another device?

I don't know if this is the right place to ask this. Sorry if I'm wrong.
I'd like to know if you can run code in an Xbee module without being connected to the computer or another device like arduino.
For example, I want to have 2-3 Xbee modules that communicate with each other sending information and then take decisions by code dynamically without using the X-CTU software. And I don't want those Xbee modules to be connected to the PC or other devices, they have to run by themselves with a coin cell battery and run some code previously written into their memory. Is this possible? If so, can you provide me some info/documentation to take a look? which language do you have to use to program the code? Which Xbee model do I need?
Thank you!
The XBEE modules can not do such tasks without a host. You can not run your own code on the module.
If you want to run you own code on the same device as the ZigBee stack then you should choose a solution from a silicon/stack provider.
You could achieve your goal using the Texas Instruments ZigBee Home automation SDK from www.ti.com/tool/z-stack which runs the ZigBee stack and your application on one of the TI ZigBee SoC's. But there are likely other similar providers as well.
Regards, TC.
XBees can be configured to initialize themselves with network data, i.e. the PAN ID, so they're aware of how to communicate on start up without requiring external configuration. However, they cannot run headlessly; they must to have some idea of the data that needs to be sent. They're fundamentally designed to act as a transparent serial bridge between computers to aid communications on personal networks. They cannot however be configured to do something bespoke.
It sounds like you're worried about power, so you could try looking for a low-power microcontroller that possesses a USART; this is all you'll need in order to communicate with an XBee via Serial.
It isn't possible to put your own code on a standard XBee module, but Digi does offer a Programmable XBee that includes a Freescale HCS08 co-processor that you can write code for. They offer a development kit with sample programs to get your started.
For a small-scale project where you don't need to be ZigBee certified, that might be easier than getting up to speed with a ZigBee development kit from TI, Freescale or Silicon Labs.

ANSI C on Windows 7 - Programmatically generating a Serial Event (RS232)

I am using a combination of hardware and virtual serial ports in a ANSI C Windows 7 environment. In this project, there will be two applications: The first application is being developed and will be connected both to a hardware COM port and to a virtual COM port. The second is a legacy application (has already been developed and cannot be changed) It will be connected only to the same virtual COM port via a virtual NULL modem.
In the first application, COM event handlers can be used for listening to and handling messages generated from a serial message generator connected to the hardware COM port. However, virtual COM ports do not generate COM events, and so I am limited to using timing loops to periodically check the simulated in and out queues of the virtual port. This is fine for controlling COM traffic in the first application, but the second application will need to see a COM event to enable it to process incoming serial traffic.
Is there a way to generate Windows COM (RS232) events programmatically in one application such that a legacy application that is expecting COM events, can see them?
By events, I am referring to those recognized by a typical comcallback, such as:
LWRS_RXCHAR, LWRS_RXFLAG, LWRS_TXEMPTY, LWRS_CTS, etc.
I don't know if this will work, but you can try to make a loopback on the legacy COM interface? Then you can write to it and it will trigger COM events.
Just closing the loop here (a little late), Thanks for the attempt #Evert.
The solution was to select the right vendor. We needed a good kernel mode driver to produce the right configuration of virtual com port. Eltima (www.eltima.com) provided a product that did just that. Great product with a usable API. Problem solved

USB Programming: C/Linux

What are the best tutorials and API's for Linux and C based USB programming? I want to be able to transfer data at max throughput point to point between two PCs, with USB 3.0.
Load the Ethernet over Usb kernel driver (a howto for setting up one machine is here), set up static IPs on both ends, and use rcp.
You can't connect two Hosts directly over USB, one side must have a device controller (such as the NetChip 228x), in which case you can load the g_ether module (enabled with USB_ETH) and do as suggested by gnud

Resources