Creating a send and receive TCP-IP connection in labVIEW - tcp

I am trying to create a send and receive connection in labVIEW. I used the following structure to send and receive. This structure is used to difference port numbers to send and receive respectively which it is not working. Let me note that I also used one port to send and receive which hasn't worked. I am experimenting both VIs in my PC. Could it be the reason? [3]: http://i.stack.imgur.com/fRIXC.jpg [4]: http://i.stack.imgur.com/hJHGn.jpg

Open LabVIEW example finder from help -> search for TCP open Simple TCP.lvproj and explore example code. This could be good starting point for you.

Related

How to retrieve remote client IP address esp32 soft AP mode

My goal is to retrieve the IP address of client connected to an esp32 in soft Access Point mode WITHOUT client sending a request.
So far calling "remoteIP()" method from "client" object seems to be the only way I can successfully retrieve connected client IP is when an HTTP request is made.
If I call "client.remoteIP()" before the remote client sends an HTTP request I get
All zeros, yikes.
Currently I'm polling the "softAPgetStationNum()" method from "WiFi" object and I'm alerted as soon as a device is connected or disconnected.
I would like to get the client IP along with the new connection alert.
My advanced apologies for not including my code hopefully my description has enough clarity to properly relay my intended objective. Thanks
Ps- if I could get guidance on retrieving MAC of remote client too that would be dope!
I don't know what interface Arduino has built on top of Espressif's framework, but the underlying ESP IDF v4.3 has functions esp_wifi_ap_get_sta_list() which gives you a list of all connected stations (including MACs) and esp_netif_get_sta_list() which maps this list of clients to their IP addresses.

What network protocol does python influxdb use to send data?

I'm interested in the answer to this question above because I'm trying to setup my Lab so I can send data from an ESP32 device over wifi to Influx DB hosted on my local network with a raspberry pi.
I've tried doing this with udp but the arduino libraries are very poorly documented (and didn't work)
and I couldn't find anything from Influx about what and how the data sending format should be...
Also is there a way to quickly find the network method used to transmit communicate with Python and influxDB?
According to the documentation here they support several methods.
Looking in particular to the upd listener seems that you need to enable the listener on the influx db server first.

specifying connection on ESP8266 with AP and STA modes

I want to try to set up an ESP8266 (using the Arduino IDE) to occasionally connect to a wifi SSID to send telemetry back. I also would really like to be able to have it running a softAP for configuration/settings purposes. (i.e. so if you want to change internal settings in your code, you can connect directly to the device to access a web form to do so)
The problem is, I am not 100% sure how I know which is which when making an outgoing telemetry json query. I want it to go out on the STATION mode connection. Presumably in most cases the AP mode won't be connected, but there may be rare instances where both are connected at the same time. Thus how do I tell the device to specifically use the STA side of things when it needs to send data back over the internet?
I can't even seem to find any specific examples to ask if one or the other is connected. (you can poll WiFi.status() but - which one is it reporting?)
Any help is appreciated

How Can IBM Bluemix Node-RED Iotout node be set up correctly to send command to Device (Arduino)?

I have an Arduino Uno that is successfully registered as a device with IBM IoTF. It can send information to the Bluemix Node-RED app without any issues now.
Now, I would like the Node-RED app to send commands to the device (the Arduino Uno). The Arduino is subscribed to the MQTT without any error. But, it is not receiving any commands from the Node-RED. I followed the directions at the link below to create another flow in Node-RED to show when a command is published and the commands are being shown, so they seem to be going to the MQTT broker. But, the device (Arduino) is not receiving them.
How can I figure out how to get this working?
Node-RED, IOT Foundation Out Node Not Sending Commands
I have the IBM IoT Out Node parameters set as follows:
Authentication: Bluemix Service
Output type: Device command
Device type: Arduino-tempsensor (this is the same string I used for the device type (name) when I registered it in IoTF)
Device ID: I put the MAC address here, should it be more
Command Type: status (I used the word "status" here. Does capitalization matter? Where should I get this value from? I used "status" because it is in the topic: "iot-2/cmd/status/fmt/json" is that correct?)
Format: json (does capitalization matter here?)
data: {"d":{"myName":"Arduino Uno", "temperature":989}} (I used this because it's JSON and I wanted to just see anything at the device)
Name: IBM IoT App Out
I typed up this whole question and then it occurred to me that the test flow to look for the published command should have all of the parameters set to exactly the same as the output. When I tried that, I was not getting the command message coming back. Then, I realized that my mac address (device ID) was capitalized in one place, but not the other. The MAC address (Device ID) I used to register the device was all in caps, so I make the Iot-out node for the command so that it was all capitalized and made the Iot-in node to test for the message so that it was all capitalized. Now it works! Then, I looked back at the device (which was printing to the serial monitor so I could see what was happening) and I am now seeing the messages! So, make sure your parameters follow the same capitaliztion!

Sending data on COM Port while receiving data on it?

My application can send and receive data independently on COM Port (9 pin). Now the scenario is that, the destination device while sending data can also request some data. Now, in that case my application while receiving the data from the device, would have to send the requested data as well. So the question is, is it possible conceptually to send some data while receiving data from the same COM port ?
Note: If this is not the right place to ask this question, please let me know which SO site is apt for this.
Sure it is. The RS232 is a full duplex interface, hence there are two independent channels for each direction.
But note that these two channels are different pins of course. You cant send and receive on the same pin with the RS232 (Although it is theoretically possible to transmit and receive data over a single line simultaneously - but not in this case).

Resources