Monday, May 15, 2023

Wireshark does not work with Tightvncserver

Using kali linux on raspberry pi 4 but wireshark does not work with tightvnc server...  According to this issue report, it's the issue with Qt 

Version of Kali linux I'm using:

$ cat /etc/os-release                       

PRETTY_NAME="Kali GNU/Linux Rolling"

NAME="Kali GNU/Linux"

VERSION="2023.1"

VERSION_ID="2023.1"

VERSION_CODENAME="kali-rolling"

ID=kali

ID_LIKE=debian

HOME_URL="https://www.kali.org/"

SUPPORT_URL="https://forums.kali.org/"

BUG_REPORT_URL="https://bugs.kali.org/"

ANSI_COLOR="1;31"

To fix this issue, changing from "tightvnc" to "tigervnc-standalone-server" and confirmed that the issue is actually fixed

Steps to install and my config:

1. Fist install "tigervnc-standalone-server"
$ sudo apt install tighervnc-standalone-server
After this step, "update-alternatives" will change the link of "vncserver" from "/usr/bin/tightvncserver" to "/usr/bin/tigervncserver"

2. Generate password
$ vncpasswd

3. Then create "/etc/systemd/system/vnc-server.service" file as below:
$ cat /etc/systemd/system/vnc-server.service
[Unit]
Description=VNC Server

[Service]
ExecStart = sudo -u kali vncserver -geometry 1440x900 :1 -localhost=0
ExecStop = sudo -u kali vncserver -kill :1
Type = forking

[Install]
WantedBy = multi-user.target

After this just enable/start the service...

Note: "-localhost=0" option is intentionally used in my environment (not secured) because I just want to directly connect to the VNC service, without using a SSH tunnel. By default this option of "tigervncserver" is "-localhost=1"




Thursday, May 11, 2023

CH341 rom programmer

 CH341 :

Driver: CH341PAR.EXE - 南京沁恒微电子股份有限公司https://www.wch.cn/downloads/CH341PAR_EXE.html

このBlogによると英語のサイトからダウンロードしたDriverを使うとうまく認識位されない(実際自分も英語のページからダウンロードしたが,やはり認識できなかった)

ドライバインストールの後,下記のソフトを使って読み出し・書き込みできる

Releases · nofeletru/UsbAsp-flash · GitHub
https://github.com/nofeletru/UsbAsp-flash/releases

Wednesday, May 03, 2023

About ESP32-S3 N16R8 DevKit (AI-S3) board RGB LED

 このAI-S3ボードをAliexpressで購入(ここ

サンプルプログラムのBlinkRGBでこのボードの上にあるRGB LEDを点滅させる.このボードのレイアウトはESP32-S3-DevKitC-1に似ているが,所々異なっている・・・探してもこのボード自体のschematicが出てこないため,RGB LEDの型番は不明,接続先も不明・・そのためサンプルプログラムがなかなか動かすことができなかった.結論からいうとこのRGB LEDはGPIO38ではなく,GPIO48で制御することができる.

オリジナルのESP32-S3-DevKitC-1schematicを見るとGPIO38に接続されているがこれはESP-IDF v5.0.1のバージョンで,ESP-IDF v4.4.xのバージョンだとGPIO48になっていた.おそらくAI-S3ボードはこの古いバージョンをベースに作られていると思われる.


環境
- Arduino IDE + esp32 v2.0.8
- Board: ESP32S3 Dev Module

サンプルプログラム
/*
  BlinkRGB
*/

#define RGB_BRIGHTNESS 150 // Change white brightness (max 255)

// Explicitly define the pin here, overwrite the one in 
// C:\Users\...\AppData\Local\
//    Arduino15\packages\
//       esp32\hardware\esp32\2.0.8\variants\esp32s3\pins_arduino.h
#define RGB_BUILTIN 48 
void setup() {
  Serial.begin(115200);
  Serial.println("setup done...");
}

void loop() {
#ifdef RGB_BUILTIN
  digitalWrite(RGB_BUILTIN, HIGH);   // Turn the RGB LED white
  delay(1000);
  digitalWrite(RGB_BUILTIN, LOW);    // Turn the RGB LED off
  delay(1000);

  neopixelWrite(RGB_BUILTIN,RGB_BRIGHTNESS,0,0); // Red
  delay(1000);
  neopixelWrite(RGB_BUILTIN,0,RGB_BRIGHTNESS,0); // Green
  delay(1000);
  neopixelWrite(RGB_BUILTIN,0,0,RGB_BRIGHTNESS); // Blue
  delay(1000);
  neopixelWrite(RGB_BUILTIN,0,0,0); // Off / black
  delay(1000);
#endif
}

RGB_BUILTINをコード内に再定義しておくことでesp32s3/pins_arduino.h内に定義されているののを上書きさせる

ちなみに,上のAI-S3ボードを購入するのであれば,下記のYD-ESP32-S3ボードを購入した方がいい.このボードのschematicはGithubにある(ここ