Files
orangepi-rag/markdown/cai-camera-va-o-cung-ngoai-sata-voi-orange-pi-plus-2.md
T
2026-06-11 23:53:48 +07:00

188 lines
9.1 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Orange Pi Plus 2 là một phiên bản có cấu hình khá mạnh của Orange Pi với RAM 2GB, 4 cổng USB, 1 cổng LAN, Wifi, IR, AV Out và đặc biệt là cổng SATA cùng nguồn cho phép bạn nối thêm ổ cứng. Tuy nhiên một điều đặc biệt khác nữa là bạn có thể sử dụng luôn [camera cho Orange Pi](https://orangepi.vn/san-pham/camera-cho-orange-pi) mà ko cần bo mạch chuyển đổi.
[![](https://orangepivn.b-cdn.net/wp-content/uploads/2017/11/plus2-camera.jpg)](https://orangepi.vn/san-pham/may-tinh-nhung-orange-pi-plus-2-arm-h3-quad-core-cortex-a7-2gb-ddram3)
### Sau đây tôi sẽ hướng dẫn bạn cài [Camera gắn cổng CSI mã SH-2035-IPLAY của Orange Pi](https://orangepi.vn/san-pham/camera-cho-orange-pi) trên bo mạch Orange Pi Plus 2
**Bạn cần**
- Bo mạch Orange Pi Plus 2, nguồn, thẻ nhớ đã cài sẵn Armbian 5.30 (bản mới nhất)
- [Camera gắn cổng CSI mã SH-2035-IPLAY của Orange Pi](https://orangepi.vn/san-pham/camera-cho-orange-pi)
- Màn hình HDMI để test, ổ cứng để lưu video cam đã quay (nếu có)
**OK. Bắt đầu**
01. Cài Armbian cho Orange Pi Plus 2, tương tự như cho Orange Pi Zero, nhưng bạn phải tải đúng phiên bản. SSH và đăng nhập root để khởi tạo, tạo thêm 1 tài khoản nữa là admin để sử dụng cho Motion
02. Chạy câu lệnh cập nhật hệ điều hành
> _apt-get update_
>
> _apt-get upgrade_
03. Cài driver cho camera bao gồm driver gc2035 và vfe\_v4l2.
> _sudo modprobe gc2035_
>
> _sudo modprobe vfe\_v4l2_
04. Sửa file /etc/modules để luôn tải driver này khi khởi động (bỏ dấu # trước 2 driver này)
> _sudo nano /etc/modules_
05. Tạo thư mục motion để lưu video và hình ảnh của camera
> _mkdir ~/motion_
>
> _chmod 777 ~/motion_
_Thư mục này sẽ có đường dẫn là /home/admin/motion_
06. Cài motion
> _apt-get install motion_
07. Sửa các file config của motion
> _nano /etc/motion/motion.conf_
>
> _=\> target\_dir: Thư mục lưu video, ví dụ như là /home/admin/motion tạo từ trước_
>
> _=\> stream\_localhost: Set là off thì có thể xem được từ IP trong cùng 1 lớp mạng_
08. Khởi động motion như daemon
> _nano /etc/default/motion_
>
> _=\> start\_motion\_daemon = yes_
09. Các câu lệnh khởi động, tắt và kiểm tra motion
> _/etc/init.d/motion start_
>
> _/etc/init.d/motion restart_
>
> _/etc/init.d/motion status_
>
> Sau khi khởi động thành công bạn có thể test thử motion chạy ở địa chỉ IP của Orange Pi, cổng 8081, ví dụ http://192.168.1.30:8081
10. Trong trường hợp motion bị lỗi, kiểm tra các thành phần sau
File config không đúng, copy file config ra thư mục khác
> _cp /etc/motion/motion.conf /etc/motion.conf_
File log của motion ko ghi được, chmod quyền ghi cho file này
> _chmod 777 /var/log/motion/motion.log_
Xem video này có hướng dẫn và demo
Camera cho Orange PI Plus 2 - YouTube
Tap to unmute
[Camera cho Orange PI Plus 2](https://www.youtube.com/watch?v=ez6658vjzD8) [Orange Pi Vietnam](https://www.youtube.com/channel/UCl0lVmXFHAhZybuOIzu2CaA)
![thumbnail-image](https://yt3.ggpht.com/nDus3_aNISkA5x8KD3J1lcxvLAPBa0WdYl8UDthVlh1HXRK1WyCmMfqfbq6lqd3hRx8iqHc6ysA=s68-c-k-c0x00ffffff-no-rj)
Orange Pi Vietnam1.83K subscribers
[Watch on](https://www.youtube.com/watch?v=ez6658vjzD8)
[Chia sẻ trên WhatsApp](whatsapp://send?text=C%C3%A0i%20Camera%20cho%20Orange%20Pi%20Plus%202%20-%20https://orangepi.vn/cai-camera-va-o-cung-ngoai-sata-voi-orange-pi-plus-2.html "Chia sẻ trên WhatsApp")[Chia sẻ trên Facebook](https://www.facebook.com/sharer.php?u=https://orangepi.vn/cai-camera-va-o-cung-ngoai-sata-voi-orange-pi-plus-2.html "Chia sẻ trên Facebook")[Chia sẻ trên Twitter](https://twitter.com/share?url=https://orangepi.vn/cai-camera-va-o-cung-ngoai-sata-voi-orange-pi-plus-2.html "Chia sẻ trên Twitter")[Gửi email cho bạn bè](mailto:?subject=C%C3%A0i%20Camera%20cho%20Orange%20Pi%20Plus%202&body=Xem%20n%C3%A0y%3A%20https%3A%2F%2Forangepi.vn%2Fcai-camera-va-o-cung-ngoai-sata-voi-orange-pi-plus-2.html "Gửi email cho bạn bè")[Ghim trên Pinterest](https://pinterest.com/pin/create/button?url=https://orangepi.vn/cai-camera-va-o-cung-ngoai-sata-voi-orange-pi-plus-2.html&media=https://orangepi.vn/wp-content/uploads/2017/10/Plus-and-Plus2-Camera-with-wide-angle-lens-for-OrangePi-2Million-Pixels.jpg&description=C%C3%A0i%20Camera%20cho%20Orange%20Pi%20Plus%202 "Ghim trên Pinterest")[Chia sẻ trên LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https://orangepi.vn/cai-camera-va-o-cung-ngoai-sata-voi-orange-pi-plus-2.html&title=C%C3%A0i%20Camera%20cho%20Orange%20Pi%20Plus%202 "Chia sẻ trên LinkedIn")
![](https://secure.gravatar.com/avatar/fedf9d992f1e8a3e3109ac596191d91386f32fb01a7f6a91e35636c5eefb761e?s=90&d=mm&r=g)
##### superadmin
### Để lại một bình luận [Hủy](https://orangepi.vn/cai-camera-va-o-cung-ngoai-sata-voi-orange-pi-plus-2.html\#respond)
Email của bạn sẽ không được hiển thị công khai.Các trường bắt buộc được đánh dấu \*
Bình luận \*
Tên \*
Email \*
Trang web
Δ
- Tìm kiếm:
- [![](https://orangepivn.b-cdn.net/wp-content/uploads/2017/02/cropped-logo-transparent-280x280.png)Orange Pi Việt Nam](https://orangepi.vn/)
- [Giới thiệu về máy tính nhúng](https://orangepi.vn/gioi-thieu-ve-may-tinh-nhung)
- [Hướng dẫn đặt hàng](https://orangepi.vn/dat-hang-tai-orange-pi-viet-nam)
- [Chính sách Bảo hành](https://orangepi.vn/chinh-sach-ban-hang-va-bao-hanh)
- [Thư ủy quyền phân phối tại Việt Nam](https://orangepi.vn/thu-uy-quyen-phan-phoi-tai-viet-nam)
- [Chính sách bảo mật](https://orangepi.vn/chinh-sach-bao-mat)
- [Liên hệ](https://orangepi.vn/lien-he)
- [Shop](https://orangepi.vn/shop)
- [Bo Mạch Orange Pi](https://orangepi.vn/danh-muc-san-pham/bo-mach-orange-pi)
- [Chip H3](https://orangepi.vn/tu-khoa-san-pham/chip-h3)
- [Chip H6](https://orangepi.vn/tu-khoa-san-pham/chip-h6)
- [RK3399](https://orangepi.vn/tu-khoa-san-pham/chip-rk3399)
- [RK3588, RK3566](https://orangepi.vn/tu-khoa-san-pham/rk3588)
- [Chip H616, H618](https://orangepi.vn/tu-khoa-san-pham/chip-h616)
- [Allwinner A733](https://orangepi.vn/tu-khoa-san-pham/allwinner-a733)
- [RAM 1GB](https://orangepi.vn/tu-khoa-san-pham/ram-1gb)
- [RAM 2GB](https://orangepi.vn/tu-khoa-san-pham/ram-2gb)
- [RAM 4GB](https://orangepi.vn/tu-khoa-san-pham/ram-4gb)
- [RAM 6GB](https://orangepi.vn/tu-khoa-san-pham/ram-6gb)
- [RAM 8GB](https://orangepi.vn/tu-khoa-san-pham/ram8gb)
- [Phụ kiện Orange Pi](https://orangepi.vn/danh-muc-san-pham/phu-kien-orange-pi)
- [Màn hình](https://orangepi.vn/tu-khoa-san-pham/man-hinh)
- [Vỏ Mica lắp ghép](https://orangepi.vn/tu-khoa-san-pham/vo-mica)
- [Vỏ thép kiêm tản nhiệt](https://orangepi.vn/tu-khoa-san-pham/vo-thep)
- [Vỏ nhôm nhẹ tản nhiệt tốt](https://orangepi.vn/tu-khoa-san-pham/vo-nhom)
- [Nguồn Orange Pi](https://orangepi.vn/tu-khoa-san-pham/nguon-orange-pi)
- [Thẻ nhớ microSD](https://orangepi.vn/tu-khoa-san-pham/the-nho-microsd)
- [Compute Module](https://orangepi.vn/tu-khoa-san-pham/compute-module)
- [Blog](https://orangepi.vn/blog)
- [Giới thiệu](https://orangepi.vn/category/gioi-thieu)
- [Hướng dẫn](https://orangepi.vn/category/huong-dan)
- [Trình diễn](https://orangepi.vn/category/trinh-dien)
- [Đăng nhập](https://orangepi.vn/my-account "Đăng nhập")
- [**Hotline: 0923449899**](tel:0923449899)
Bạn cần trợ giúp?
[![Messenger](https://orangepi.vn/wp-content/plugins/chat-bubble/assets/images/fbmessenger.svg)Messenger](https://m.me/orangepivietnam "Messenger") [![Zalo Official Account](https://orangepi.vn/wp-content/plugins/chat-bubble/assets/images/zalo.svg)Zalo Official Account](https://oa.zalo.me/1687181280533723118 "Zalo Official Account") [![Telegram](https://orangepi.vn/wp-content/plugins/chat-bubble/assets/images/telegram.svg)Telegram](https://t.me/maytinhnhung "Telegram") [![Whatsapp](https://orangepi.vn/wp-content/plugins/chat-bubble/assets/images/whatsapp.svg)Whatsapp](https://api.whatsapp.com/send?phone=84923449899 "Whatsapp")
![Orange Pi Việt Nam](https://orangepivn.b-cdn.net/wp-content/uploads/2017/02/logo-transparent.png)
Orange Pi Việt NamNhà phân phối chính thức
Xin chào! 👋🏼👋🏼👋🏼 Tôi có thể giúp gì được bạn?
- [Hotline](tel:0923449899 "Hotline")
- [Facebook](https://www.facebook.com/orangepivietnam "Facebook")
- [Zalo](https://oa.zalo.me/1687181280533723118 "Zalo")
## Đăng nhập
Sign In - Google Accounts
Continue with GoogleContinue with Google. Opens in new tab
Tên tài khoản hoặc địa chỉ email \*Bắt buộc
Mật khẩu \*Bắt buộc
Ghi nhớ mật khẩuĐăng nhập
[Quên mật khẩu?](https://orangepi.vn/my-account/lost-password)