---
# System prepended metadata

title: 20240507地震學地震模擬實作課程

---

## -->此頁面網址HackMD
https://hackmd.io/5U0XucJ9TM63XyX_pk5j3g

## 投影片下載
https://drive.google.com/file/d/1UdTzUUHeUUxqaCEZvdJkjqqp2nHkDlyA/view?usp=sharing

Line notify
https://drive.google.com/file/d/1wbp7uSaiJNOYvVdHHTJBHsEPEnF2J-9-/view?usp=sharing

## 範例程式碼下載
https://drive.google.com/file/d/14YJ9R6D813OH6tr8MFVRmIlOiJmMLXSw/view?usp=sharing

## 軟體等網頁連結
Mosquitto官網下載頁面
https://mosquitto.org/download/

OpenSSL下載網址
https://slproweb.com/products/Win32OpenSSL.html

pthreadVC2.dll下載網址
https://www.dll-files.com/pthreadvc2.dll.html

umqtt.simple Github網址
https://github.com/micropython/micropython-lib/blob/master/micropython/umqtt.simple/umqtt/simple.py

MQTT explorer
https://mqtt-explorer.com/


## 軟體與命令提示字元指令複製區
**查看指定port是否有在運作**
`netstat -an|find “1883”`

**查看IP**
`ipconfig`

**轉送規則設定**
`netsh interface portproxy add v4tov4 listenaddress=192.168.50.22 listenport=1883 connectaddress=127.0.0.1 connectport=1883`
補充說明:當使用 netsh interface portproxy add 指令來設定轉發規則時，這些規則是即時生效的，但不會自動持久化保存於系統中。如果重新啟動電腦，這些規則就會被清空，這是因為 netsh 本身並不設計成在重新啟動後自動恢復規則。

**列出所有轉送規則**
`netsh interface portproxy show all`

**刪除指定轉送規則**
`netsh interface portproxy delete v4tov4 listenaddress=192.168.1.7 listenport=1883 `

**PC安裝MQTT套件**
    `pip install paho-mqtt`



## 參考影片
https://www.youtube.com/watch?v=Gsw0CIsJJfE&t=340s

https://www.youtube.com/watch?v=0w5DndNrFg8