參考:https://zhuanlan.zhihu.com/p/80809006
經過以上設定後,程式開發者就可以在本機的 pyCharm 上撰寫 Jetson-nano 上面的程式碼。
注意,修改完程式碼後,還需要點擊右上方的 upload 箭頭符號,程式碼才會同步部屬至 Jetson-nano。
jtop 可以用來查看系統運作時各硬體的情況,使用起来極為方便,推薦安裝
$ sudo pip3 install jetson-stats –user # 安裝 jtop
$ jtop # 啟動 jtop
$ sudo fallocate -l 4G /swapfile # 建立 swap 分區,大小為4G (可自行調整)
$ sudo chmod 600 /swapfile # 修改 swap 分區使用權限,只允許 root 用户存取
$ sudo mkswap /swapfile # 標記為 swap 空間
$ sudo swapon /swapfile # 啟用 swap 空間,關機再開機後,需要再次利用此命令啟用 swap 空間
$ free -h # 驗證 swap 空間是否可用
一般選擇上應是 MAXN 10W 模式供電,因 5W 模式容易因供電不足而系統不穩, 甚至斷線當機。所以建議還是需要採 DC 5V4A 的電源供應方式,並設定為 MAXN 10W。
$ sudo nvpmodel -q # 查看供電模式
$ sudo nvpmodel -m 0 # 修改供電模式為 MAXN 10W (DC Jack 5V4A 供電)
$ sudo nvpmodel -m 1 # 修改供電模式為 5W (Micro USB 5V2A/3A 供電)
關閉用戶使用的圖形介面, 可以幫程式釋放出更多的運算資源
$ sudo systemctl set-default graphical.target
$ sudo reboot
Alias Python 3
The Jetson Nano image comes installed with Python 2 and Python 3. However, Python 2 is configured as the default version. If you’re like me and trying to move all your work to Python 3, I recommend setting an alias in your .bashrc file:
Copy Code
vi ~/.bashrc
Scroll to the bottom of the file and press ‘o’ to insert a new line and edit. Enter the following line:
Copy Code
alias python=python3
Exit by pressing ‘esc.’ Type ‘:wq’ to exit and enter the following on the command line to run the .bashrc file:
Copy Code
source ~/.bashrc
JETSON NANO 安裝USB WIFI網路卡驅動 EDIMAX EW-7811-UTC
Jetson nano在安裝好NVIDIA提供的Ubuntu 18.04後,因所使用的USB WIFI網路卡無法直接啟用 (簡單來說好像是沒有支援RTL8812AU 所造成的)。
以下為安裝型號: Edimax EW-7811-UTC
USB WIFI網路卡的安裝步驟
開啟Terminal:
先刪除原本有的驅動(雖然在下執行後顯示並無這些驅動,但保險起見還是執行後再重新安裝驅動):
sudo dkms remove rtl8812au/5.2.9 –all
sudo rm /usr/src/rtl8812au-5.2.9
sudo dkms remove rtl8812au/4.2.2 –all
sudo rm /usr/src/rtl8812au-4.2.2
安裝驅動:
sudo apt install git
git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git
cd rtl8812AU_8821AU_linux
sudo make -f Makefile.dkms install
sudo modprobe rtl8812au