I'm making project of automated polling system using SMS. How can i read the text message in the cellphone and display it in textbox?
Have a look at the classes in the System.IO.Ports namespace, namely SerialPort.
There is even an (albeit brief) example available in the Microsoft KB that illustrates how to send AT commands to a connected modem:
http://msdn.microsoft.com/en-us/library/7x7cdt5c.aspx
Related
I was going through planty of nf samples (many thanks for that), but couldn't find any, where I can read data sent by USB cable (serial port).
In arduino I would simply write: Serial.readString() to get data sent through COM. How that could be acomplished in nanoframework?
You should use the System.IO.Ports API. Windows.Devices.SerialCommunication is the UWP API that we're discontinuing and replacing with the IoT Core API.
Please check the sample pack here and look at Scenario3 Read. After properly setting up the SerialPort device, you can call
serialDevice.Read(buffer, 0, buffer.Length).
I have to create a program that send comand to the arduino;
The program must be the client and the arduino the server.
So the question is: what is the code to start the communication?
P.S. the arduino obviously have an ethernet shield on it.
I have searched on google, i found this :
For Arduino :
https://www.arduino.cc/en/Reference/Ethernet
For Windows :
http://www.nullskull.com/articles/20020323.asp
I've not used Arduino myself but a have a look at Arduino Playground:
CmdMessenger is a messaging library for the Arduino Platform (and .NET/Mono platform). It uses the serial port as transport layer. To use CmdMessenger, we define a list of command identifiers, then attach callback / handler functions for received messages.
The message format is: Cmd Id, param 1, [...] , param N;
The library gives the following functionality:
Sending and receiving commands
Calling of associated functions on received commands
Sending and receiving zero to many arguments per command
Sending and receiving of all primary types. This includes bytes, longs, ints, floats and doubles.
Sending and receiving in plain text form (human readable, robust) or in binary form (efficient)
The library can be downloaded through the Arduino or PlatformIO library manager, or downloaded as a stand-alone package, see the read-me page.
Want a platform independent desktop app to check the toner/Cartridge level of a network printer and notify the user of the status and give him option to request for purchase of the toner if low.
The info i got till now is that we need to fetch values for OID from MIB files of a SNMP enabled Printer. I want this app to be as generic as possible for all Brands, however need for today is specially for Brother Printers & MFPs.
Sorry for looking nube but i have searched enough and there is not much information available.
Can i use native support & Monitoring tool of the Manufacturer as brother provides its monitoring utility which can be installed on Desktop(In that case where the MIB file will be located(on the device or within installed program on the Desktop?) or need to use network monitoring tools like icanga, negios etc.
Secondly how to implement it on AIR.I am thinking to use AIR for the first time and wondering will it be helpful and do i need to know something more on this technology before proceeding.
There are some networking monitoring tools available like negios & Icinga. which can be installed even over a desktop. Can the data from these can be parsed and used. We need it for brother printer but want to implement it for Multi-Manufacturer solution as per documents format for MIB file is getting standard. We will invest time only if its universal even after a year or so as its not worth time for a single manufacturer.
So following CLI's i find useful in Net-SNMP and believe that it will get me to output by calling these Applictions by External Script(AIR).
convert between numerical and textual forms of MIB OIDs, and display MIB content and structure (snmptranslate).
A graphical MIB browser (tkmib), using Tk/perl.
A daemon application for receiving SNMP notifications (snmptrapd). Selected notifications can be logged (to syslog, the NT Event Log, or a plain text file), forwarded to another SNMP management system, or passed to an external application.
An extensible agent for responding to SNMP queries for management information (snmpd). This includes built-in support for a wide range of MIB information modules, and can be extended using dynamically loaded modules, external scripts and commands, and both the SNMP multiplexing (SMUX) and Agent Extensibility (AgentX) protocols.
Are there any API to read MIB files in AIR.
Any links or some added information is highly appreciated.
For printers without SNMP support, you'll probably have to implement a manufacturer-specific solution. If you want to write an AIR app that talks to SNMP-enabled printers, I can see the following approaches:
Implement SNMP client in ActionScript
Since SNMP is usually based on UDP, you could use flash.net.DatagramSocket to implement your own SNMP client in AIR. AFAIK, there are no ready-to-use ActionScript libraries, so you'd need expert knowledge of the SNMP protocol and a lot of development time.
Write an AIR Native Extension
With a Native Extension (ANE) you could implement the SNMP client in C/C++. This has the advantage that you could use an open source library like Net-SMTP to do the heavy lifting, but you'd still need some experience in developing and building C/C++ libraries.
Use a command-line tool
The easiest solution is probably to use one of the free SNMP command-line utilities from Net-SMTP or SnmpSoft, for example. All you have to do is to call one of these programs using flash.desktop.NativeProcess providing the correct arguments and then parse the output.
In a Windows 8 Store App I would like to read Data from a SmartCard. After installing the SmartCard reader (USB Device) I can read its device path and connection state via the Windows.Devices.Enumeration namespace. Even the device interface id is retrievable (50dd5230-ba8a-11d1-bf5d-0000f805f530) and I put this as a required capability in the App's manifest file.
For the interaction with the device I use a C++ Component calling the CreateDeviceAccessInstance Method. But this call always results in an ACCESS_DENIED exception.
Further research taught me, that interacting with a custom hardware device (everything that is not a printer, microphone, mouse, ...) would need several adjustments in the device driver published to the windows 8 driver store.
I'd be glad to do so, but I am no IHV and would like to use the generic driver and the generic interface.
Could anyone give me a hint how to proceed from here and use the generic interface for USB SmartCard devices?
This is not a real answer, but I have the same problem and I have spent quite some time looking for the hard-to-find bits of information on this subject around the internet, and I'd like to share my results.
Windows 8.1 has some specific APIs for (virtual) SmartCards (API reference, sample), but it seems like they can only be used for authentication and there is no way to send APDU commands to a card at the moment (see this comment by Himanshu Soni). I guess one could use the new USB APIs to talk to the reader directly, but then you'd have to implement the whole protocol yourself.
How to Read SMS/MMS in UIQ ?
I am going to assume that you want information about how to write some C++ source code that will allow an application to receive SMS/MMS and read the content of the messages it receives.
On Symbian OS, the message store can store SMS, MMS, EMAIL...
The API of the message store is generic.
In order to write and read data to/from the message store, you'll need to familiarise yourself with the following classes : TMsvId, CMsvSession, CClientMtmRegistry, TMsvEntry and CMsvEntry.
I am obviously biased but I would advise reading the messaging chapter of http://www.quickrecipesonsymbianos.com in order to get an explanation of how the messaging store works and the sample code to use it easily.
Receiving messages, on the other hand, is more complicated.
Listening for and receiving SMS is done using the generic networking API. That's RSocketServ and RSocket. Mostly, you need to use to the right IOCTL parameters on the socket.
You can specify a specific port in order to only receive SMS that are intended for your application. Trying to receive all SMS could be an issue as the native message viewer engine and the embedded Java virtual machine PushRegistry module could both be listening for all SMS already.
You will find useful classes and constants in the following header files in your SDK:
gsmuset.h smsuaddr.h smsustrm.h gsmubuf.h gsmumsg.h.
TSmsAddr, KSMSDatagramProtocol, KSMSAddrFamily, TSmsUserDataSettings, CSmsBufferBase, CSmsPDU, RSmsSocketReadStream, RSmsSocketWriteStream and CSmsMessage are of particular interest. Asynchronously receiving an SMS is actually done using RSocket.Ioctl().
There are SMS-specific error codes whose names start with "KSmsErr"
Receiving MMS on UIQ is done through a UQI-specific API. One that you won't find on Series60 phones. This is the reason why you won't find much talk of a Symbian-generic MMS API in the litterature. You are better off going directly to the UIQ or Sony-Ericsson development communities when you have more detailled questions.
Your application shouldn't have to use RSocket to receive MMS.
Careful, once again, both the Embedded Java virtual machine PushRegistry module and the native message viewer application engine are probably already listening for all incoming MMS messages.
The interesting header files are mmsclient.h, MmsSettingsStore.h, mmsentry.h, MmsApiExtensions.h
Of particular interest are CMmsClientMtm, MmsApiExtensions, MMsvSessionObserver and MMMSMessageHandler.
Good luck.