I'm trying to send a protocol version message to my node on port 8333. I found this site that explains how to send a version message from the command line. I have a C++ app that is creating the message, but I thought I would try sending it from the command line before trying to do it in my C++ application.
I'm on a local network sending the message from 192.168.1.44 to the node at 192.168.1.47. The node is running Bitcoin Core 23.0.
According to the site linked above, the following command can be used to send a version message and print the verack that it receives. Instead, it pauses for a few seconds and prints nothing.
echo -en "f9beb4d976657273696f6e00000000005a000000365c501771110100010000000000000091211e6300000000010000000000000000000000000000000000ffffc0a8012f208d010000000000000000000000000000000000ffffc0a8012c208daabbccddeeff11350454657374d87f0b0000" | xxd -r -p | nc 192.168.1.47 8333 -i 2 | xxd
Here is a breakdown of the most recent message I've tried to send:
f9beb4d9 76657273696f6e0000000000 5a000000 365c5017 71110100 0100000000000000 91211e6300000000 010000000000000000000000000000000000ffffc0a8012f208d 010000000000000000000000000000000000ffffc0a8012c208d aabbccddeeff1135 0454657374 d87f0b00 00
Here is what each of the above lines is supposed to be:
Mainnet byte sequence "version" padded with zeroes Length of payload (little endian) Payload checksum (1st 4 bytes of double SHA256 converted to little endian) Version 70001 (little endian) NODE_NETWORK service Timestamp (little endian) Recipient address/port = 192.168.1.47:8333 Sender address/port = 192.168.1.44:8333 Nonce (random) User agent = "Test" Last block received = 753624 (little endian) Relay = false
bitcoin.conf file contains:
txindex=1 server=1 rpcbind=192.168.1.47:8901 rpcallowip=192.168.1.44 rpcuser=username rpcpassword=xxxxxxxx
Is there something that needs to be added to bitcoin.conf?
Is there something wrong with the version message I am trying to send?
What else could the problem be?