Click here to Skip to main content
15,902,299 members
Everything / Communication

Communication

communication

Great Reads

by Ben M Watson
Five more attributes of highly effective programmers
by Bernhard Nebel
How does asynchronous serial communication work, what Arduino libraries are there to support it, and what can go wrong?
by Sašo Mađarić
Short and practical guide about improving your communication skills
by dzaliznyak
Introduction to MetaPubSub library - a publisher-subscriber pattern implementation with the interprocess communication layer

Latest Articles

by Sašo Mađarić
Short and practical guide about improving your communication skills
by ToughDev
How to fix PlatformNotSupportedException when running WCF apps
by ToughDev
More about ST7735 1.8-inch 128×160 Color LCD on a PIC Microcontroller
by ToughDev
Experiment with ST7920 128×64 graphical LCD on PIC

All Articles

Sort by Score

Communication 

15 Sep 2014 by Ben M Watson
Five more attributes of highly effective programmers
21 Jan 2022 by Bernhard Nebel
How does asynchronous serial communication work, what Arduino libraries are there to support it, and what can go wrong?
6 Aug 2023 by Sašo Mađarić
Short and practical guide about improving your communication skills
22 Jun 2015 by OriginalGriff
We can't tell you - because we don't know.You need to talk to the manufacturers, and try to get some idea of the communications protocol from them. You can't "guess" how to talk to it - there are far, far to many different ways to do it. If you had the communications software it's possible...
10 May 2016 by Sergey Alexandrovich Kryukov
Don't. Processes are isolated and should remain isolated. It's possible to achieve on the base of Windows messages, but this approach is too Windows-specific, contradicts to more important principles of OS architecture is is generally so bad due to other reasons, so I don't even want to discuss...
18 May 2016 by Patrice T
Advice:- use a char array to store the data received from serial. You can't have expectations about what is the data you are receiving. Never receive in a string and then transform to char.- To debug the serial link, replace 1 of the devices with a computer using a terminal emulator. it will...
21 Jul 2019 by CPallini
Why are you using a timer for reading? Use the DataReceived[^] event handler instead. See, for instance Serial Comms in C# for Beginners[^].
15 Oct 2020 by dzaliznyak
Introduction to MetaPubSub library - a publisher-subscriber pattern implementation with the interprocess communication layer
1 Nov 2021 by Bohdan Stupak
Short tip explaining the importance of asynchronous communication
3 Aug 2023 by CPallini
The good news is the manufacture provides plenty of documentation. The bad news is you have to study it (we cannot do that for you). In my experience, the MODBUS protocol is fairly simple to understand, you could start with it.
25 Mar 2014 by Babita22
#include #include #include #include #includeint main(void){ pid_t pid; int r; char buf[1024]; char cp[50]; char ans; int readpipe[2]; int writepipe[2]; long int a;...
20 Oct 2014 by swarjadhav
How to read pair key sent by the bluetooth device in c# so that I can pair with the device after returning that key? I have one Bluetooth device, while connecting it through c# it sends me pair key randomly, I wants to read that pair key in c# and needs to return within...
21 Apr 2015 by Richard MacCutchan
If no key has been pressed then GetPressedKey returns zero, so the loop continues. You should remove these two functions, as they do nothing except delay your code.
21 Jun 2015 by Anupam_Datta
Motion activated Pushbullet notification from your Arduino to your Smart Gadgets
22 Jun 2015 by User 59241
I refrained from answering your previous question because really where to start. The cost of the vendor software is probably going to be insignificant compared to the time you will need to spend here.I can give you a generic approach that I would employ in this situation.1. Obtain a...
28 Sep 2015 by George Jonsson
For your purpose I would discard the code you found "somewhere on the net" and take a look at this article.Serial Comms in C# for Beginners[^]As you have a USB to RS232 converter it will enumerate as one or more Virtual COM Ports (VCP).In most ways this is the same as connecting to a...
17 May 2016 by George Jonsson
There are quite a few different reasons why you might receive the wrong character.You are telling very little about your hardware setup, so I can only give general advice for how you can find the error.The most common is that you haven't configured the port correctly.Make dead sure you...
10 Dec 2016 by gfazzola
In this article I will explain the implementation of an infrastructure to host and manage windows services in a practical and interactive way.As a practical example of the solution will be implemented a dynamic ip update client of DucDNS
7 Feb 2017 by discompsys
An easy way to allow local objects with direct access to invoke methods on a class, but prevent them from being part of the public API, for remote invocation.
18 Nov 2017 by rohit7209
How to change state of child from parent, state of parent from child and state of sibling from another sibling
27 Aug 2020 by Gen1us2k
Choose how to build your own solution for implementing Audio/Video Calls using WebRTC
6 Feb 2014 by dinesh_redhawk
Hello All,I am facing a problem related to the HttpWebRequest's GetResponse API. In our application we are using HttpWebRequest-Response method to communicate with a device over WiFi.The problem here is when we are sending a particular request to the device, the device takes approx. more...
9 Mar 2014 by Peter Leow
You may want to explore Google Cloud Messaging for Android (GCM)[^] As per google’s documentation “Google Cloud Messaging for Android (GCM) is a service that helps developers send data from servers to their Android applications on Android devices”.
9 Mar 2014 by Krunal Rohit
Okay, Peter Leow is right.Or rather you may go for Observer Pattern[^].Where, if one application is changing its state, other would be notified and can perform operations accordingly.-KR
29 Apr 2022 by Babita22
I want parent and child processes to communicate in C linux using pipes. I have created two file descriptors. one for parent to child i.e. readpipe and other writepipe for viceversa.But I am getting null as output for ch and ch1 strings in my code below.Please help me in this.#include...
19 Mar 2014 by bling
I see two problems (there may be more) ...1. In the CHILD PROCESS half of the code, you close writepipe[1] and then write to it.2. In the PARENT PROCESS half of the code, you close BOTH writepipe handles but later close writepipe[1] again.
14 Apr 2014 by Dave Kreskowiak
The best way to do it is over a serial connection as all Arduinos have serial interfaces. You can get a USB-to-Serial converter and talk with the board over a COM port. That's been documented thousands of times all over the web. And, yes, it works over just about any speed.
14 Apr 2014 by User 59241
I assume you are using Windows.Plug in your Arduino to PC using your usb cable. Open Device Manager. Look for ports(COM & LPT ). There you will find your Arduino identified. Mine is COM3. Look at "Port Settings" mine are 9600,8,none,1,none.Now use this...
16 Apr 2014 by Ganesh Kumar Kaki
HiThis is Ganesh working on .NET platform. I know the Message Broker v8 comes with .NET support.I worked with message queues(MQ), everything is good about it and working fine.Now my requirement is to communicate MB with the help of HTTP. How it works and asny sample codes available for it...
23 Apr 2014 by Nosheen Javed
I have a program which is written by the man who is not here. Now the problem is that the program throws the exception after writing some lines.The code is as follows:Class: InclinometerCommunicator.javaimport java.io.IOException;import java.io.InputStream;import...
22 May 2014 by Member 10837700
So basically i want to make a website that upload a file (an executable one .exe)from a user, when it finish upload i have to open this file on the same server (windows server) since my application run on windows. The file will be encrypted by my C# application and i want to be returned to the...
22 May 2014 by NewPast
Almost all of hosting provider block exe running on the server.If have your on server this will be OKyou could call cgi exe form php and php form exe by posting forms as simple method
16 Jun 2014 by RAHUL(10217975)
I am working in windows Application. I am using Serial Port (Barcode). I am calling serial Port Data receive event as _SerialPort.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler2);And In every scan it got fire. The problem is when I scan card for break of 5 seconds its...
16 Jun 2014 by OriginalGriff
ReadLine is a blocking method: it does not return before a newline code is received from the serial port.But... The DataRecieved event happens every time that any data is received - so you will get a bunch of them "queued up" all trying to read the same data from the same port. And since...
24 Jul 2014 by Gihan Liyanage
Here is good blog to Learn Biztalk Online. http://sandroaspbiztalkblog.wordpress.com/
1 Aug 2014 by Member 10689667
so I have an C# WinForm that useSerialPort SerialPort1 = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);SerialPort1.Open()SerialPort1.DataReceived += new SerialDataReceivedEventHandler(...)to listen on several Virtual COM Ports that Created by other Software(I can't...
22 Aug 2014 by carefreeames
You can install the lighthttp webserver on your pi and put the outputs there for your collegue to grab. if you need to push the information, you could push to a remote CGI on a webserver, or upload the data via FTP, there are numerous other methods if I understand your question.sudo apt-get...
23 Aug 2014 by amiradar
As I've encountered an advice not to use the SerialPort.DataReceived event, nor the BytesToRead() (www.sparxeng.com/blog/software/must-use-net-system-io-ports-serialport), I am trying to implement a reader from a serial port with BeginRead & End Read. When the application reached the line:Dim...
3 Sep 2014 by VishalKadiwala
Hi,You are retrieving data in hierarchical way.If you are using any ORM like Entity Framework than it would be easy as it will generate all queries for you internally.If you are using ADO.net and you have to create a stored procedure to retrieve all data in a single table and you can...
16 Jan 2015 by Kamil Burzynski
Using HipChat to control CodeProject::Workspace deployments
16 Feb 2015 by DavidGeirola
hi i'm david and i'm new in this site, i'm here because i have a problem with my solution of Client-Server communication.I have created 3 classes 'STransferMessage', 'SServer' and 'SClient'.SServer and SClient extend STransferMessage, i thought it might be the best solution because more...
17 Mar 2015 by vinod b v
I need to write a C code for serial communication for sending bytes of data from computer to external device.i am using USB RS232 convertor for transmission. What needs to be taken care of? Can someone give me advice??
17 Mar 2015 by KarstenK
Take a look on the article Win32 SDK Serial Comm Made Easy or Creating a Serial communication on Win32 amd its code. It isnt easy to start until you understand that theses ports are slow, so you and your app must wait for answers. I used than overlapped IO to solve that.
19 Mar 2015 by enhzflep
Here's some code from a simple win32 serial-port monitor I hacked-together for use with the Atmel family of micro-controllers, specifically, for use with Arduinos.I'll leave it to you to extract the parts you want for your own console app. As you can see, I never bothered to implement the...
19 Mar 2015 by vinod b v
#include #include int main(){ // Defining hexadecimal bytes int bytes_to_send[5]; bytes_to_send[0] = 0x81; bytes_to_send[1] = 0x11; bytes_to_send[2] = 0xF1; bytes_to_send[3] = 0x11; bytes_to_send[4] = 0x04;// Declare...
19 Mar 2015 by vinod b v
#include #include int main(){ // Defining hexadecimal bytes int bytes_to_send[5]; bytes_to_send[0] = 0x81; bytes_to_send[1] = 0x11; bytes_to_send[2] = 0xF1; bytes_to_send[3] = 0x11; bytes_to_send[4] = 0x04; // Declare...
19 Mar 2015 by Jochen Arndt
There is no definition for CBR_10400 (see the CBR_* definitions in winbase.h).Did you mean CBR_14400?If you want to use a non-standard baud rate, just pass the numeric value:dcbSerialParams.BaudRate = 10400;
14 Apr 2015 by vinod b v
//Serial Port communication in Windows for test purpose!!//#include #include #include #include #include int main(){ int _kbhit(); int _getch(); // Defining hexadecimal bytes to be sent a 200 bps// unsigned...
15 Apr 2015 by CPallini
vinod b v wrote:I am supposed to get 25ms low and 25ms high square wave upon sending byte 0xF0 at 200 baud, and next my 5 databytes should be sent at 10400, but i am not able to see the exact waveform in my oscilloscope. is there something wrong in the code??What do you see on the scope?...
21 Apr 2015 by vinod b v
I have written a code that sends the byte OF at 200 bps and then should send 5 bytes at 10400, i need to loop this data continuously, how can this be done? i use two while loop one for sending single byte at 200 and then again another for sending 5 bytes of data at 10400, when i start the...
21 Apr 2015 by phil.o
In addition to solution 1 (which is a good advice because it will remove the need to press a key), you can enclose your whole process in another, root level while loop:while (true) { // Send specified text (remaining command line arguments) DWORD bytes_written = 0; ...
24 Apr 2015 by vinod b v
#include #include #include #include #include #includeint main(){ // Defining hexadecimal bytes to be sent a 200 bps for generation of low high sequence// unsigned char bytes_to_send[1]; ...
18 Jul 2015 by ttddssg
Do GPIO ports (on raspberry pi) can be used for serial communication? or, how we can connect multiple devices for simultaneous communication on single RX and TX of raspberry pi?Edit: I have two devices, a GPS module and a GPRS/GSM module to connect, both uses RX and TX to communicate with...
7 Aug 2015 by webmaster442
Have a look at #USBLib. It's built over libusb, it has device detection based on VID & PID. download: http://sourceforge.net/projects/sharpdevelop/files/SharpUSBLib/1.0.0.1/[^]
24 Aug 2015 by stixoffire
I have a publish - subscribe WCF Duplex model using NetTCpBinding (session mode). When a user is subscribing - I would like to pass in NetworkCredential - but I can't as it will not send the password and instead I see a '' (BLANK - Nada - nothing), but the username of course is there.. of course...
25 Aug 2015 by stixoffire
Since I could not pass in the Credential, I used the channel factory ClientCredential Users field - my intellisense showed it was {get; set;} so I tried to use it and immediately got an exception declaring the field was readonly (and I said hogwash!). So I ended up with code like this in order...
28 Sep 2015 by vebi1000
I had a GUI designed using C# windows forums, they are communicating using USB serial communication to communicate with Hardware electronics. I want use the same GUI with some other hardware electronics but i am using RS232 to USB converter to send data from electronics to PC. is it possible...
3 Jun 2018 by Lovi$hD
I am using usbSerialForAndroid library for serial communication in android. In my code i have successfully granted read and write permission on USB port.My problem is "I receive the data on third time when i try to read from serial port, first two times i read the data received is zero...
26 Oct 2015 by CPallini
It can happen, if there is no data available at the time of your call (for instance the attached device is slow in answering). You might act (if appropriate) on the timeoutMillis parameter of your the read method.
26 Oct 2015 by Jochen Arndt
When a serial device responds to received data, there is always a delay before it will be seen on the host. Imagine what typically happens:The host sends some data (a string here). The sending may be performed in the background so that the write function returns while the data are still on...
28 Oct 2015 by Ramiien
Hi ,I am also trying to access CAN bus data in C++. I have PCAN_USB(my hardware board connected with CAN) and I am getting heart beats which i can see from PCAN_View(PEAK systems API) but what i need to do is to save all coming CAN Data(heart beats) into a log file (pcanlog.txt) using...
29 Oct 2015 by bling
PCAN_CHANNEL_AVAILABLEPCAN_C...
30 Oct 2015 by Ramiien
I am doing CAN first time using C++: I am using API function to initialize CAN. Function for API CAN intialization is as following/// /// Initializes a PCAN Channel/// /// "The handle of a PCAN Channel"/// "The...
15 Jan 2016 by Jochen Arndt
It seems that you use a sensor described in this PDF document: Telegrams for Configuring and Operating the LMS1xx, LMS5xx, TiM3xx, JEF300, JEF500[^].But that describes the communication via a terminal program (serial connection). If the sensor is connected to a serial port, you must use...
15 Jan 2016 by Patrice T
STX and ETX usually refer to ASCII control charactersControl character - Wikipedia, the free encyclopedia[^]An ASCII control character can't be displayed, thus to show you where to put them, it is a common usage to show them as [STX] and [ETX] but you have to replace them by their ASCII...
18 Jan 2016 by Member 8857897
Hi!I am trying to do following:MainActivitiy(starts)-->TabFragment[FragmentPagerAdapter](starts) -->StyleFragment[has 4 Image Buttons to start 4 different Fragments]-->(regarding which is clicked) a proper Fragment should be shown in the next tab.MainActivity | ...
9 Jun 2016 by Member 12330615
I have been using MFC in VC++I am coding a client program using TCP/IP socket comm with Server which have a KEEP ALIVE socket option, and the client receive every data from the server. 1. If or when the client close the socket, and I check and run 'netstat' in command line of PC, I...
9 Jun 2016 by Jochen Arndt
Why you choose the server to send the keepalive packets? In most cases the client is interested in keeping a connection open.You did not tell us about the used protocol and the typical data flow. Depending on that it might help to define a disconnect message.It might be even not...
1 Nov 2016 by Richard MacCutchan
You need to study the device documentation to check what protocol it supports. you can then use the relevant .NET class to connect.
2 Nov 2016 by Ralf Meier
The LibNoDave-Library nowadays is much improved by a guy named "Jochen Kuehner". He also made a lot of samples to work with it.If you want more Information you should post this question in the German PLC-Forum www.SPS-Forum.de.Here you could also contact Jochen Kühner for more...
30 Apr 2017 by Member 11247684
I draw the a topology where each node is an object of class SensorNode, the blue links indicate the links between each node with its neighbors where the circles around the nodes represent the transmission range for each node. The sink also is an object of class Sink. I need to instantiate...
30 Apr 2017 by FranzBe
What NotPolitcallyCorrect wrote is right. Perhaps the following might give you some starting point. void Main() { var s1 = new SensorNode(1, "don't care", 0, 0); var s2 = new SensorNode(2, "don't care", 0, 0); var sink = new Sink("don't care", 3, 0, 0); sink.AddSensor(s1);...
28 Jul 2018 by OriginalGriff
No. Partly, we aren't here to do your job for you, but mostly we aren't a code translation service and didn't write Termite anyway. And if you think that 37 bytes in three seconds is "too much" then you really need to brush up on serial coms...
21 Jul 2019 by raddevus
The first and most obvious thing that I see is the two timer tick event handlers: timer1_Tick timer2_Tick Inside those timer handlers you need to stop the timer each time the timer code is running. If you don't, then the timer event handler can be entered again on another thread and your...
19 Mar 2021 by Romain Figoli
Hi, I'm using an Arduino with a Zigbee to send data from sensors and a Raspberry Pi with an another Zigbee to read the data which is 10 bytes with a head and a stop. I'm on Windows 10 IoT and I code with VS 2019. My issue is that my RPI read the...
27 Mar 2021 by EssenceGold
Hi Guys. I have a problem like this. I am writing a program about communication between the device and the computer. No problem when I test it with virtual serial port. But when there is a physical connection, the data is not complete. Below are...
26 Mar 2021 by Ralf Meier
Your problem, I suppose, is that you read what is inside the Buffer without checking if the right count of Characters are inside the Buffer. The Serialport_DataReceived-Event is raised with the first incomming Character. So perhaps your...
29 Apr 2022 by Member 15620144
Write a C Program which will create a pipe. Write your name on the pipe from write end. Then read data from pipe from the read end. Then display data on terminal.
26 Jul 2022 by Richard MacCutchan
Google has lots of useful links: serial port communication vb.net - Google Search[^]
11 Apr 2023 by Member 10426394
Hi everybody… I would like to migrate an old and quite complex WCF client-server application that was written in VB.net with Visual Studio. WCF is not supported since Framwork 4.8 and will be deprecated soon, that's why I want to replace this...
26 Jan 2016 by Chris Copeland
A managed library to launch and/or connect to the Tor network for SOCKS5 communications, and for middle-man proxy hosting.
17 Mar 2015 by Jochen Arndt
The MSDN provides an article about this: SerialCommunications[^]. It is quite old (1995) but still valid.An overview of serial communication functions can be also found in the MSDN: Communication Functions[^]. You may also read the other pages from the tree on the left.There are usually...
9 Jul 2015 by Pavel Durov
In this article I will explain how to create a local WebView hosted Html/Javascript application on Winrt Platform and how to establish the communication between both sides.
15 Jan 2014 by orouit
This article illustrates how to send command to an Arduino UNO board from an USB serial port and control the wave from of the 16 bits timer/counter
25 Apr 2014 by Sanket Saxena
I would suggest you to look here for starting points.Then follow the links might helps you:SamplesPostersVideoCode GalleryAlsoUseful InformationHope it helps :)
3 Jul 2015 by Shivachalappa Gotur
Detecting USB Modem Device using C#.NET
5 Apr 2010 by Mahdi Mansouri
This program shows you how to control, give set-point and get feedback from Hua YI made Power Supplies
11 Apr 2014 by laxman ghadage
hi, I have written for connectivity using tcpclient.but after every successful transaction it creates new session for each request.please do help..thanks in advance.my code is as..namespace CBS{ class TCPListner { private static string hostName = ""; ...
14 Apr 2014 by norazli
So I have an arduino uno board (no won't make the same mistake next time) running a c program, in there I have some variables that needs changing depending on what's happening in my main program that's written in c#. The communication is one way, as the response comes from somewhere else, I'd...
19 Mar 2015 by Jochen Arndt
This depends on your type of application. If you are going to create a GUI application or need to perform other tasks, you must use a worker thread or overlapped I/O.Your current implementation uses a blocking write call. This means that the call will not return until all data has been send...
28 Oct 2015 by CPallini
Well, they provide the API documentation, at least[^]. You should carefully study the API and then write your application.
22 Jul 2019 by JohnOz
Hi guys, i wrote a code about serial port communication and i wanna use timer because i i should read the sentdata continuously without missing any data.Read and write data are in the same code.I open interface 2 times and after clicking start button , i clicked send button.The data is starting...
7 May 2023 by ToughDev
More about ST7735 1.8-inch 128×160 Color LCD on a PIC Microcontroller
7 May 2023 by ToughDev
Experiment with ST7920 128×64 graphical LCD on PIC
19 May 2016 by Jammes_Ca
Hi there, i have a big problem with a serial port, i did an application that receive data through serial port with compact framwork on smart device with c#.the problem that i received wrong data. i should get the value 6. but i got 63 on ascii = "?"why. here it is the code that i did ...
28 Oct 2015 by 1234ctk
I did a project with a wcf service- which run as windows service, and a user interface that using the wcf service-I activated it on the same computer and it worked.my question is-what should I do in order to separate the project to 2 computers-that the wcf service will be in one computer and...
27 Mar 2021 by EssenceGold
Hello. I tried a little and I would fix the problem as follows Thanks to everyone who is interested. private void gelenData() { string route = indataclean(indata); int a = 0; foreach...
5 Aug 2015 by dinesh_redhawk
Hello Everyone,I have to write a small tool to test a LED device which will be connected to PC via USB.I did my research and found that there are 2 widely used libraries for USB communication: LibUSBDotNet & WinUSBDotNetUnfortunately, i cant use these 2 libraries in my case,...
25 May 2018 by Member 13844341
#include #include #include #include #include int main() { //for parent to child int parentToChild[2]; //for child to parent int childToParent[2]; //string data char message1[] = "massage from child to parent\n"; char message2[] = "message from parent to...