Wednesday, August 16, 2023
Fixed: failed to execute script pyinstaller-entry-point (ADE start)
Thursday, May 18, 2023
Replay udp data using tcpreply
tcprewrite --enet-dmac=destinationMAC --enet-smac=sourceMAC -i input.pcap -o output.pcap
Replace destinationMAC with the MAC address of the destination machine or network interface you wish to send the UDP packets to. Replace sourceMAC with the MAC address of the network interface you plan to send the packets from.
Now you would be able to replay this packets
sudo tcpreplay -i input.pcap -o output.pcap
test script to read this packets ( Python3 script is provided to read data on port 9999 )
import socket
UDP_IP = "0.0.0.0"
UDP_PORT = 9999
sock = socket.socket(socket.AF_INET, # Internet
socket.SOCK_DGRAM) # UDP
sock.bind((UDP_IP, UDP_PORT))
while True:
data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes
print("received message: %s" % data)
Thursday, March 30, 2023
Failed init_port fastrtps_port7412: open_and_lock_file failed
Use following to fix the RTPS_TRANSPORT_SHM Error
Friday, May 20, 2022
Fix for HDMI to an external monitor:
Run the commands below with the HDMI connected to my monitor:
- xrandr --listproviders (to make sure you have NVIDIA-G0 as a provider)
- xrandr --setprovideroutputsource NVIDIA-G0 modesetting
- xrandr --auto
Ref: Found the info in the last post in this thread: https://www.linuxquestions.org/questions/debian-26/debian-11-bullseye-on-optimus-laptop-not-detecting-external-screen-4175690446/
Solution : how to check if the drive is ssd or hdd ?
Command : lsblk -o NAME,ROTA
Result:
NAME ROTA
sda 0
└─sda1 0
sdb 1
├─sdb1 1
├─sdb2 1
├─sdb3 1
├─sdb4 1nvmep1 1
1 for hard drive and 0 for ssd.Wednesday, January 5, 2022
Add the pem certificate to linux
Add the ca-certificate to access the site.
1# Extract pem files
2unzip cert-cas.zip
3cd cert-cas
4
5# convert all pem files to crt
6for f in *; do mv -- "$f" "${f%.pem}.crt"; done
7
8sudo mkdir /usr/local/share/ca-certificates/extra
9sudo cp *.crt /usr/local/share/ca-certificates/extra/root.cert.crt
10sudo update-ca-certificates
certificates will be available ( below shows confirmation )
1test@testM1:/usr/local/share/ca-certificates/extra$ sudo update-ca-certificates
2Updating certificates in /etc/ssl/certs...
3rehash: warning: skipping duplicate certificate in cert-cas.pem
43 added, 0 removed; done.
5Running hooks in /etc/ca-certificates/update.d...
6
7Adding debian:test.com-cachain.pem
8Adding debian:test.com-rootca.pem
9Adding debian:test.com-subca.pem
10done.
11done.
12
Find files in dir not contain a string
find . -iname "*.md" -exec grep -Li "All rights reserved" {} \+
Thursday, November 11, 2021
Error: GitHub.DistributedTask.ObjectTemplating.TemplateValidationException Unrecognized named-value: 'secrets'
Error: GitHub.DistributedTask.ObjectTemplating.TemplateValidationException: The template is not valid. /home/runner/work/test/test/./.github/actions/test/action.yml (Line: 22, Col: 14): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.PASS
Fix: actions does not have access to secrets, only the workflow is allowed to access secrets.
workflow to pass the secret as:
with:
secret_input: ${{ secrets.SUPER_SECRET }}
And then, in action.yml,
inputs:
secret_input:
description: "..."
required: true
...
runs:
.....
- name: .....
env:
MY_SECRET: ${{ inputs.secret_input }}
Friday, November 5, 2021
fix: docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
add export ADE_DISABLE_NVIDIA_DOCKER=1 to .aderc at the start