Arduino Fix IP wifi

ใส่ code นี้ตอนกำหนด parameter

IPAddress staticIP(192, 168, xx, xx); //ESP static IP address
IPAddress gateway(192, 168, xx, 1); //IP Address of your WiFi Router (Gateway)
IPAddress subnet(255, 255, 255, 0); //Subnet mask
IPAddress primaryDNS(8, 8, 8, 8); //optional
IPAddress secondaryDNS(8, 8, 4, 4); //optionalDNS

แทรก code ถัดจาก void setup()

// Configures static IP address
if (!WiFi.config(staticIP, gateway, subnet, primaryDNS, secondaryDNS)) {
Serial.println(“STA Failed to configure”);
}

 

ESP32 wind Speed (Anemometer) thingspeak+fix IP wifi

// create 04-dec-2019

#include<WiFi.h>
#include “ThingSpeak.h”

//—————- Fill in your credentails thingspeak 2019 ———————
char ssid[] = “XXXX”; // your network SSID (name)
char pass[] = “xxxxxx”; // your network password
unsigned long myChannelNumber = xxxxxx; // Replace the 0 with your channel number
const char * myWriteAPIKey = “xxxxxxxxxxxx”; // Paste your ThingSpeak Write API Key between the quotes
String myStatus = “”;
//——————————————————————

WiFiClient client;
int number = 0;
//Static IP address configuration
IPAddress staticIP(192, 168, xx,xx); //ESP static IP address
IPAddress gateway(192, 168, xx, 1); //IP Address of your WiFi Router (Gateway)
IPAddress subnet(255, 255, 255, 0); //Subnet mask
IPAddress primaryDNS(8, 8, 8, 8); //optional
IPAddress secondaryDNS(8, 8, 4, 4); //optionalDNS

//wind speed parameter
const int m_time = 5; //Measure time in Seconds
int wind_ct = 0;
float windkm = 0.0;
float windms = 0.0;
unsigned long ttime = 0;

void setup()
{
Serial.begin(115200);
// Configures static IP address
if (!WiFi.config(staticIP, gateway, subnet, primaryDNS, secondaryDNS)) {
Serial.println(“STA Failed to configure”);
}

// connect wifi
Connect_to_Wifi();

// time parameter
ttime = millis();

WiFi.mode(WIFI_STA);
ThingSpeak.begin(client); // Initialize ThingSpeak

}

void loop()
{

meassure();

Serial.print(“ความเร็วลม: “);
Serial.print(windkm); //Speed in Km/h
Serial.print(” km/h – “);
Serial.print(windms); //Speed in m/s
Serial.println(” m/s”);

// Write to ThingSpeak. There are up to 8 fields in a channel, allowing you to store up to 8 different
// pieces of information in a channel. Here, we write to field 1.
// set the fields with the values
ThingSpeak.setField(1, windkm);
ThingSpeak.setField(2, windms);

// set the status
ThingSpeak.setStatus(myStatus);

//int x = ThingSpeak.writeField(myChannelNumber, 1, windkm, myWriteAPIKey);
int x = ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);
// Check the return code
if(x == 200) {
Serial.println(“ThingSpeak Channel update successful.”);
}
else{
Serial.println(“Problem updating channel. HTTP error code ” + String(x));
}

number++;
if(number > 99){
number = 0;
}

delay(20000); // Wait 20 seconds before sending a new value
delay(20000);

}

void countWind() {
wind_ct ++;
}

void meassure() {
wind_ct = 0;
ttime = millis();
attachInterrupt(16, countWind, RISING);
delay(1000 * m_time);
detachInterrupt(1);
windkm = (float)wind_ct / (float)m_time * 2.4;
windms = windkm/3.6;
}

void Connect_to_Wifi()
{

// We start by connecting to a WiFi network
Serial.println(“Connecting to “);
Serial.println(ssid);
WiFi.begin(ssid, pass);
//Serial.println();
Serial.println();
Serial.print(“Wait for WiFi… “);

while (WiFi.status() != WL_CONNECTED) {
Serial.print(“.”);
delay(500);
}

Serial.println(“”);
Serial.println(“WiFi connected”);
Serial.print(“IP address: “);
Serial.println(WiFi.localIP());
}

source:https://github.com/mathworks/thingspeak-arduino

ที่วัดความเร็วลม Wind Speed (Anemometer) กับ ESP32

ใช้ Interrupt ที่ขา GPIO

 

attachInterrupt(GPIOPin, ISR, Mode);

โดยมีรูปแบบ การตรวจจับการ Interrupt 5 Mode
LOW : เกิดเมื่อสัญญาณขา Interrupt เป็น Low
HIGH : เกิดเมื่อสัญญาณขา Interrupt เป็น High
CHANGE : เกิดเมื่อสัญญาณขา Interrupt มีการเปลี่ยนแปลงค่าแรงดัน เช่น เปลี่ยนจาก 0 เป็น 3.3V หรือจาก 3.3 เป็น 0V
FALLING : เกิดเมื่อสัญญาณขา Interrupt เปลี่ยนจาก High เป็น Lowfrom HIGH to LOW.
RISING : เกิดเมื่อสัญญาณขา Interrupt เปลี่ยนจาก Low เป็น High

+

จากวงจรต่อ กับ ขา GPIO16

//bosblog.cz

const int m_time = 5; //Meassure time in Seconds
int wind_ct = 0;
float wind = 0.0;
unsigned long ttime = 0;

void setup()
{
Serial.begin(9600);
ttime = millis();
}

void loop()
{

meassure();

Serial.print(“ความเร็วลม: “);
Serial.print(wind); //Speed in Km/h
Serial.print(” km/h – “);
Serial.print(wind / 3.6); //Speed in m/s
Serial.println(” m/s”);

}

void countWind() {
wind_ct ++;
}

void meassure() {
wind_ct = 0;
ttime = millis();
attachInterrupt(16, countWind, RISING);
delay(1000 * m_time);
detachInterrupt(1);
wind = (float)wind_ct / (float)m_time * 2.4;
}

credit:http://www.bosblog.cz/93-2/

Fritzing 0.94

fritzing 0.93b

https://fritzing.org/media/downloads/fritzing.0.9.3b.64.pc.zip

fritzing 0.94

https://fritzing.org/media/downloads/fritzing.0.9.4.64.pc.zip

 

Restoring Network Connection Windows 10 1803 1903 1909 or laster

An Error occurred while reconnecting to
Microsoft Windows Network You can’t connect to the file share because it’s not secure. This share
requires the obsolete SMB1 protocol, which is unsafe and could expose your system to attack.
Your system requires SMB2 or higher.

This connection has not been restored.

ไปที่ control panel

add program & feature

ไปเพิ่ม SMB 1.0

แล้ว restart

ถ้ายังไม่ได้

SERVICES.MSC “Run as Admin”

  • “Function Discovery Provider Host” (FDPHost)
    Properties
    Set startup “Automatic (Delayed Start)”
    Start service
  • ทำแบบนี้กับ Service ที่เหลือ
  • Function Discovery Resource Publication service (FDResPub)
    Network Connections (NetMan),
    UPnP Device Host (UPnPHost),
    Peer Name Resolution Protocol (PNRPSvc),
    Peer Networking Grouping (P2PSvc), and
    Peer Networking Identity Manager (P2PIMSvc).

Install DotNet 3.5 Feature Windows Server 2012 R2 without source (Have Internet)

ปัญหาคือ บางครั้ง add .NET Framework 3.5 Feature ใน Add roles and Features Wizard แล้วมีปัญหา

เรื่องหา Source path ไม่เจอซึ่งปกติจะเก็บอยู่ใน C:\sources\sxs

ให้ เข้า CMD แบบ admin

ลองสั่ง

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\sources\sxs

ถ้าไม่ได้ก็ download online โดยสั่ง

DISM /online /enable-feature /featurename:NetFx3 /all

 

 

ติดตั้่ง Intel UHD 620 610 615 630 Iris 640 650 windows 7 x86 x64 Driver (modified)

ตรวจสอบ รุ่นของการ์ด

Control Panel -> System

เปิด Device Manager หรือกด Search เอา

มองหา Display Adapters

ปกติถ้าไม่ได้ลง Drivers จะแสดง Standard VGA Graphics Adapter

เลือก คลิ๊กขวา เลือก Detail ที่ Property เลือกเป็น Hardware Ids ในค่า Value

ดูค่าล่างสุด Copy ใน notepad ไว้ เช่น PCI\VEN_8086&DEV_5912 เป็นต้น

.

Download Intel® HD Graphics Driver for Windows 7*/8.1* for NUC6i3SY, NUC6i5SY 15.45.19.4678

แตกไฟลฺ GFX_WIN10_64_15.45.19.4678.zip

ไปที่ Folder Graphics

หาไฟล์ igdlh64.inf เปิดด้วย notepad

ค้นหา ชื่อ DEV ดังตัวอย่าง คือ 5912 ก็พิมพ์ 5912 แล้วค้นหาจะพบข้อความ

%iKBLDTGT2% = iKBLD_w10, PCI\VEN_8086&DEV_5912

ให้คัดลอกไว้ แล้วเลื่อนหา หัวข้อ

;=====================================================================
; Windows 7 Install – DT Only
;=====================================================================
[IntelGfx.NTamd64.6.1]
; SKL HW

เลื่อนไปท้ายรายการ วางข้อความที่คัดลอกมา แล้ว แก้จาก  iKBLD_w10 เป็น iSKLD_w7 ดังรูป

%iKBLDTGT2% = iSKLD_w7, PCI\VEN_8086&DEV_5912

จากนั้น Save แล้วลองติดตั้งดู

Credit:https://www.youtube.com/watch?v=7w9JofZQkxI

esp32 esp8266 Arduino IDE

Arduino IDE

File> Preferences
เลือก Additional Board Manager URLs

https://dl.espressif.com/dl/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json

 

Tools > Board > Boards Manager

Tools > Board > Boards Manager…
กดหา ESP32 เลือก
ESP32 by Espressif Systems
กด ติดตั้ง

 

 

ที่มา:https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/

 

 

Limit Login Fail Windows

ปี 2007 มีคนทำเรื่อง การ Hack Password ไว้ แต่ว่าปัจจุบัน เปลี่ยนไปแล้ว net เร็วขึ้น

รหัสยาว รูปแบบ ใช้เวลา เจาะ เรื่องจริง
3 a-z 0.02
3 a-z,A-Z 0.86  วินาที
4 a-z น้อยกว่า 1 วินาที
4 a-z ,A-Z, 0-9 ,สัญลักษณ์ 4.8 วินาที
5 a-z 12-25 วินาที
6 a-z, A-Z, 0-9 1 ชม.
6 a-z ,A-Z, 0-9 ,สัญลักษณ์ 11 ชม.
7 a-z ,A-Z, 0-9 ,สัญลักษณ์ 6 สัปดาห์
8  a-z ,A-Z, 0-9 5 เดือน 3 สัปดาห์
8  a-z ,A-Z, 0-9 ,สัญลักษณ์ 10 ปี
9 a-z ,A-Z, 0-9 ,สัญลักษณ์ 1000 ปี
10 a-z ,A-Z, 0-9 1700 ปี
10 a-z ,A-Z, 0-9 ,สัญลักษณ์ 91800 ปี

ป้องกันการเจาะ windows ผ่าน เทคนิค Brute Force

เข้า Gpedit.msc สำหรับ Windows Desktop ทั่วไป
Local Security Policy

Computer Configuration -> Windows Settings -> Security Settings
เข้า Group Policy Management GPMC ไปตั้ง policy เพิ่ม
ที่ Default Domain Controller Policy
เลือก Computer Configuration -> Windows Settings -> Security Settings

จากนั้นเลือก
Security Settings -> Account Policies -> Account Lockout Policy.
ที่ Account lockout threshold
เดิมเป็น 0 invalid login attempts คือผิดกี่ครั้งก็ได้
แก้ไปเป็น
3 หรือ 5 ครั้ง
ระบบจะแสดง
Account Logout duration ตั้งมาเป็น 30 นาที
และ
Reset account lockout counter after ตั้งมาเป็น 30 นาที
หมายถึง login ผิด 3 หรือ 5 ครั้ง รอเข้าใหม่ 30 นาที

 

ที่มา:http://toplinestrategies.com/blogs/net/how-much-time-needed-crack-password-brute-force