ZeroMQ epgm error on Centos:93 Protocol not supported - zeromq

I'm trying to multicast using zmq on Centos. My program dies on the line that tries to bind to the epgm address.
here is my code segment
pContext = zmq_ctx_new();
pPubSocket = zmq_socket(pContext, ZMQ_PUB);
std::stringstream ss;
ss<<"epgm://*:"<<port;
auto ret = zmq_bind(pSubSocket,ss.str().c_str());
if bind with the unicast such as "tcp://*", it can work fine,
but bind with the multicast epgm, the code will return 93, which means Protocol not supported
os:centos
language:c++
I have installed openpgm-5.2, zeromq4.0.5, and I have enabled the --with-pgm options when build the zeromq by command:
./configure --with-pgm=libpgm-5.2.122~dfsg
Please suggest me why is this still happening so...and how to solve this ?

Related

Error: no device found Error: unable to open ftdi device with vid 0403, pid 6010, description '*' When trying to debug ESP32-S3 on macOS

Trying to debug ESP32-S3 with PlatformIO on VSCode with macOS on M1.
Installed ftdi drivers from their website. (installed the VCP drivers, not the D3XX ones as I couldn't find a way to compile and install them).
As ESP32-S3 has an internal debugger, I just created a USB that connects D-/D+ pins to the board gpio 19 and 20 (and grd). BTW, when I connect it to the macbook, I dont see any additional port under /dev/*
Getting the following error, regardless of my platform.ini configuration.
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz
adapter speed: 5000 kHz
Info : tcl server disabled
Info : telnet server disabled
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6014, description '*', serial '*' at bus location '*'
.pioinit:11: Error in sourced command file:
Remote connection closed
My platformio.ini:
[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
upload_port = /dev/cu.wchusbserial553C0085431
monitor_speed=115200
build_type = debug
debug_init_break = tbreak setup
;debug_tool = esp-builtin
debug_tool = esp-prog
Removed and installed the ftdi drivers.
Got a similar error when trying with ESP-IDF.
Any thoughts?
If you are connecting the USB conector directly on esp32s3 module, you should try to change the board parameter from esp32-s3-devkitc-1 to esp32s3-builtin. This way you specify that you are using the built-in debugger.

Cannot receive UDP packets on Windows 10 from Ubuntu 16.04

My Windows (130.203.223.236) and Ubuntu (130.203.223.228) systems are on the same network. I'm able to ping one from the other. I want to transfer information between these two systems using UDP. I can send data from Windows to Ubuntu using the code below:
Running on Windows:
# This module provides access to the BSD socket interface. It is available on all modern Unix systems, Windows, Mac OS X, BeOS, OS/2, and probably additional platforms.
import socket
# port details to send data to Ubuntu
send_host = '130.203.223.228'
send_port = 5001
# we made a socket instance and passed it two parameters. The first parameter is AF_INET and the second one is SOCK_DGRAM. AF_INET refers to the address family ipv4. The SOCK_DGRAM means connection oriented UDP protocol.
send_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
while True:
send_sock.sendto("Welcome", (send_host, send_port))
print('Data Sent')
Running on Ubuntu
# This module provides access to the BSD socket interface. It is available on all modern Unix systems, Windows, Mac OS X, BeOS, OS/2, and probably additional platforms.
import socket
# UDP port details, to receive data from Windows
receive_host = '130.203.223.228'
receive_port = 5001
receive_buffer_size = 1024
# Create socket connection to receive data from Windows
receive_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
receive_sock.bind((receive_host, receive_port))
while True:
data, addr = receive_sock.recvfrom(receive_buffer_size)
print('Data Received', data, addr)
But I couldn't send data from Ubuntu to Windows using
Running on Ubuntu:
# This module provides access to the BSD socket interface. It is available on all modern Unix systems, Windows, Mac OS X, BeOS, OS/2, and probably additional platforms.
import socket
# UDP port details, to send data to Windows
send_host = '130.203.223.236'
send_port = 5002
# Create socket connection to send data to Windows
send_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
while True:
send_sock.sendto("Welcome", (send_host, send_port))
print('Data Sent')
Running on Windows:
# This module provides access to the BSD socket interface. It is available on all modern Unix systems, Windows, Mac OS X, BeOS, OS/2, and probably additional platforms.
import socket
# port details to receive data from Ubuntu
receive_host = '130.203.223.236'
receive_port = 5002
receive_buffer_size = 1024
# we made a socket instance and passed it two parameters. The first parameter is AF_INET and the second one is SOCK_DGRAM. AF_INET refers to the address family ipv4. The SOCK_DGRAM means connection oriented UDP protocol.
receive_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
receive_sock.bind((receive_host, receive_port))
while True:
try:
ego_data, addr = receive_sock.recvfrom(receive_buffer_size)
print('Data Received', ego_data, addr)
except socet.error as error:
print(error)
There are no errors while running the code

ovs2.6: could not create netdev dpdk1 of unknown type dpdk

I am trying to setup OVS2.6 with DPDK16.07. I am following INSTALL.DPDK.md instructions that came under openvswitch-2.6.0.tar.gz. Getting following warning message in ovs-vswitchd.log:
00034|netdev|WARN|could not create netdev dpdk1 of unknown type dpdk
00035|bridge|WARN|could not open network device dpdk1 (Address family not supported by protocol)
Googling little bit shows this issue is faced by earlier ovs version as well, but I didn't find any satisfactory solution.
Any idea what could be rootcause, and how to fix it?
Thanks!
All ports that are to be used by Open vSwitch must be bound to the uio_pci_generic, igb_uio or vfio-pci module before the application is run. Any network ports under Linux control will be ignored by OvS or any DPDK application.
Please check the output of $DPDK_DIR/tools/dpdk-devbind.py scripts with -s parameter. You must see some ports in "Network devices using DPDK-compatible driver" section like below;
$/dpdk-stable-16.07.2/tools$ ./dpdk-devbind.py -s
Network devices using DPDK-compatible driver
============================================
0000:05:00.0 '82571EB Gigabit Ethernet Controller (Copper)' drv=igb_uio unused=e1000e
0000:05:00.1 '82571EB Gigabit Ethernet Controller (Copper)' drv=igb_uio unused=e1000e
I have the same issue as well, and by checking the code I found that before starting ovs-vswitchd, we should use the command below, to initialize dpdk.
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true

Issues with custom build NodeMCU Firmware, After flashing the custom build firmware to ESP-12E module giving the following error messages

Flashed NodeMCU_float_0.9.6-dev_20150704 on ESP-12E module gpio,timers,file,wifi, mqtt ,tcp and udp connections are working with no issues but i tried HTTP requests like HTTP GET and POST now this time it's giving error
attempt to index global 'http' (a nil value))
HTTP GET request code
http.get("http://httpbin.org/ip", nil, function(code, data)
if (code < 0) then
print("HTTP request failed")
else
print(code, data)
end
end)
it's giving the error messages as
PANIC: unprotected error in call to Lua API (test.lua:1: attempt to
index global 'http' (a nil value))
I thought that the Firmware version i am using Flashed NodeMCU_float_0.9.6-dev_20150704 is not included HTTP module and built the custom build firmware with http,mqtt,net,node,wifi,timer,uart,file and gpio after flashing this custom build firmware contentiously sending the error message
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 29308, room 16
tail 12
chksum 0x9c
ho 0 tail 12 room 4
load 0x3ffe8000, len 2228, room 12
tail 8
chksum 0xe5
load 0x3ffe88b4, len 8, room 0
tail 8
chksum 0x86
csum 0x86
Fatal exception 0(IllegalInstructionCause):
epc1=0x40270858, epc2=0x00000000, epc3=0x00000000, excvaddr=0x4026d205, depc=0x00000000
with 748800 baud rate
You need to make sure that you also flash the esp_init_data_default.bin to its correct location.
Get Espressif NON-OS SDK 1.5.1 and extract esp_init_data_default.bin. Then flash it to address 0x7c000.
With esptool the command would be as follows:
esptool.py --port <USB-port-with-ESP8266> write_flash -fm dio -fs 32m 0x00000 <nodemcu-firmware>.bin 0x7c000 esp_init_data_default.bin
See http://nodemcu.readthedocs.io/en/master/en/flash/#upgrading-from-sdk-09x-firmware for details.

Why does Veins crash when commandSetSpeedMode() is used?

I am trying to simulate a scenario in Veins where I want to disable the
right of way checks at the road junctions. I looked up at the Sumo wiki and
found that the bitset is 23 for the purpose. Another lookup in the
TraCIMobility.h header bundled with Veins helped me to know that this can
be done using the function commandSetSpeedMode() for a TraCIDemo11p node
which models the vehicles in the Veins demo simulation. I am trying to
build up my model using this demo bundled with Veins.
But as I am trying to do so, SUMO crashes. I am trying to initialize the
nodes in the initialize() function of TraCIDemo11p through the following
code:
void TraCIDemo11p::initialize(int stage) {
BaseWaveApplLayer::initialize(stage);
if (stage == 0) {
traci = TraCIMobilityAccess().get(getParentModule());
annotations = AnnotationManagerAccess().getIfExists();
ASSERT(annotations);
traci->commandSetSpeedMode(23); // This is the point of modification
sentMessage = false;
lastDroveAt = simTime();
findHost()->subscribe(parkingStateChangedSignal, this);
isParking = false;
sendWhileParking = par("sendWhileParking").boolValue();
}
}
I tried to set the modes with other standard values such as 0 or 31, but
every time I get SUMO crashed.
I am unable to figure out where else I should place this command. I tried
to set the mode in some other initialization stage by adding an else clause
to it but it crashes still. What's more, eve nthe the debugger on, no error
is being shown, either in the OMNeT++ window or the sumolaunchd.py output
in OMNeT++ cmd.
Please help to understand my error. Thanks.
EDIT: adding Error message info
To make things clear, I am not receiving any error message but the exit code. I searched for the code but got no help. The usual 'this app is not responding' window pops up and the sim ends, so I suspect SUMO to crash.
The OMNeT++ environment shows the following message:
Simulation terminated with exit code: -1073741819
Working directory: C:/Users/stes-2/veins-3.0/examples/Cross Roads
Command line: c:/Users/stes-2/omnetpp-4.4/bin/opp_run.exe -r 0 -n ../veins;../../src --tkenv-image-path=../../images -l ../../src/veins omnetpp.ini
Environment variables:
OMNETPP_ROOT=c:/Users/stes-2/omnetpp-4.4
PATH=;C:/Users/stes-2/veins-3.0/src;c:\Users\stes-2\omnetpp-4.4\bin;c:\Users\stes-2\omnetpp-4.4\msys\bin;c:\Users\stes-2\omnetpp-4.4\mingw\bin;c:/Users/stes-2/omnetpp-4.4/ide/jre/bin/client;c:/Users/stes-2/omnetpp-4.4/ide/jre/bin;c:/Users/stes-2/omnetpp-4.4/ide/jre/lib/i386;.;C:\Users\stes-2\omnetpp-4.4\msys\local\bin;c:\Users\stes-2\omnetpp-4.4\mingw\bin;C:\Users\stes-2\omnetpp-4.4\msys\bin;c:\Users\stes-2\omnetpp-4.4\bin;c:\ProgramData\Oracle\Java\javapath;c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Python27;c:\Users\stes-2\sumo-0.21.0;c:\Users\stes-2\omnetpp-4.4;
OMNETPP_IMAGE_PATH=c:\Users\stes-2\omnetpp-4.4\images
Since I am running SUMO through the sumoLaunchd.py script, the error message that turns up at the MingW cmd of OMNeT++ is:
Starting SUMO (c:/Users/stes-2/sumo-0.21.0/bin/sumo-gui.exe -c cross.sumo.cfg) o
n port 64161, seed 0
Connecting to SUMO (c:/Users/stes-2/sumo-0.21.0/bin/sumo-gui.exe -c cross.sumo.c
fg) on port 64161 (try 1)
Releasing lock on port
Starting proxy mode
Done with proxy mode
Done with proxy mode, killing SUMO
SIGTERM
Done running SUMO
Cleaning up
Result: "<?xml version="1.0"?>
<status>
<exit-code>15</exit-code>
<start>1433944271</start>
<end>1433944276</end>
<status>Exited with error code 15</status>
<stdout><![CDATA[Loading configuration... done.
]]></stdout>
<stderr><![CDATA[]]></stderr>
</status>
"
Closing connection from 127.0.0.1 on port 64160
I think you are missing some lines.
You have assigned the TraCIMobility to traci, and then you don't even consider the general commandInterface and the vehicleCommandInterface
TraCIMobility* mobility = TraCIMobilityAccess().get(getParentModule());
TraCICommandInterface* traci = mobility->getCommandInterface(); /* missing command interface */
TraCICommandInterface::Vehicle* traciVehicle = mobility->getVehicleCommandInterface(); /* missing vehicle command interface */
traciVehicle->setSpeedMode(someNumber);
I even tried to compile your code but it complains that there is no method available for TraCIMobility called commandSetSpeedMode(). But that could be due to difference in Veins versions.
Multi-stage initialization
A module/variable you are trying to access might not be ready, i.e. still has not been created, by the time you are trying to use it. In that case the multi-stage initialization feature of OMNeT++ can be used.
This means a "task" may be delayed to a later stage of the initialization of the current module:
void SomeModule::initialize(int stage)
{
ApplicationBase::initialize(stage); /* ignore if causes error */
if(stage == 0)
{
/* do this */
else if (stage == 3)
{
/* do this later */
}
}

Resources