Difference between revisions of "X630-Software"

From Geekworm Wiki
Jump to navigation Jump to search
 
(39 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{GD Template Impl}}
 
{{GD Template Impl}}
This wiki describes how to use x630 on the Raspberry Pi OS.
+
This wiki describes how to use x630 on the Raspberry Pi OS. <span style="color:red;">Note: The software can currently be used directly on Raspberry Pi 4B, 3B+/3B/Zero series. Software support for Raspberry Pi 5 software is not available which need to be tested.
 +
 
 +
The Raspberry Pi Foundation has updated several versions recently;
 +
 
 +
The use guide of X630 depends on the official Raspberry Pi OS version you are using. Different versions have different usage methods. If you have some questions, please contact us and attach the os version you are using.(<span style="color:red;">Email: support@geekworm.com</span>)
  
 
==For Raspberry Pi OS==
 
==For Raspberry Pi OS==
X630 has two reset mode: '''Hardware reset''' and '''Software reset''' modes, we strongly recommend you use software reset mode if you use it on raspberry pi hardware or raspberry pi os, software reset uses GPIO 509 to reset operation through GPIO, which can prevent you from restarting the Raspberry Pi repeatedly, which is very convenient. And on other hardware platforms, X630 actually reserves pins to facilitate you to use custom GPIO pin to implement software reset operations or use directly hardware reset mode.
+
'''NOTE:'''
 +
 
 +
Since the X630 V1.5 version removes the software reset&hardware reset DIP switch, for the V1.5 version, please ignore the use of software reset or directly visit to [[X630-Hardware-Reset]]
  
First, please choose your reset mode based on your hardware and OS (default is software reset mode), you can skip this step if you use software reset, it should be noted that disconnect power supply to the Raspberry Pi before changing dip switch positions.
+
X630 v1.3 has two reset mode: '''Hardware reset''' and '''Software reset''' modes;
 +
 
 +
 
 +
You can use hardware reset mode if you use it on raspberry pi hardware or raspberry pi os, software reset uses GPIO 509 to reset operation through GPIO, which can prevent you from restarting the Raspberry Pi repeatedly, which is very convenient.
 +
 
 +
 
 +
The user guide of X630 is similar to [[HDMI TO CSI-2|C779]] when X630 is in hardware mode, but X630 supports audio when used with X630-A2, and  [[HDMI TO CSI-2|C779]] does not support audio
 +
 
 +
 
 +
First, please confirm & select X630 work mode according the picture; After November 2021, the default factory mode is hardware mode;
 +
 
 +
We found that some users prefer hardware mode, so our factory default settings have been changed to hardware mode
  
 
[[File:Dip-switches.jpg|none|dip switch]]
 
[[File:Dip-switches.jpg|none|dip switch]]
  
'''<span style="color:red;">Disconnect power to the Raspberry Pi before changing dip switch positions!!!</span>
+
<span style="color:red;">Disconnect power to the Raspberry Pi before changing dip switch positions!!!</span>
'''
+
 
 
{| class="wikitable"
 
{| class="wikitable"
 
! SELECTION !! SWITCH SETTINGS !!  
 
! SELECTION !! SWITCH SETTINGS !!  
 
|-
 
|-
| Hardware reset || HW = 1 || SW = 0
+
| Hardware reset(Default) || HW = 1 || SW = 0
 
|-
 
|-
 
| Software reset || HW = 0 || SW = 1
 
| Software reset || HW = 0 || SW = 1
Line 23: Line 40:
 
Explain:
 
Explain:
 
* Hardware reset: After starting RASPISTILL or RASPIVID <span style="color:red;">once</span> then you will need to reboot Raspberry Pi to restart it again (Please use when operating system cannot control the X630 module via GPIO509)
 
* Hardware reset: After starting RASPISTILL or RASPIVID <span style="color:red;">once</span> then you will need to reboot Raspberry Pi to restart it again (Please use when operating system cannot control the X630 module via GPIO509)
* Software reset: Starting RASPISTILL or RASPIVID <span style="color:red;">multiple times</span> and don't need to reboot Raspberry Pi ('''Recommend''')
+
* Software reset: Starting RASPISTILL or RASPIVID <span style="color:red;">multiple times</span> and don't need to reboot Raspberry Pi.
* Default setting is 'Software reset';
+
* Default setting is 'Hardware reset'.
 
* Please remove the yellow protective film before change dip switch.
 
* Please remove the yellow protective film before change dip switch.
 
<hr/>
 
<hr/>
'''Preparations:'''
 
 
1. Once booted, update your Raspberry Pi by running the following commands in a terminal window:
 
sudo apt-get-update
 
sudo apt-get upgrade -y
 
 
2. Run the following command to go into the Raspberry Pi configuration tool
 
sudo raspi-config
 
 
[[File:Raspi-config-1.jpg|800px]]
 
 
3. Navigate to ''''Interfacing Options'''' and hit Enter. Now select the ''''Camera'''' option, and hit the Enter key to enable it. Select “Finish” and select to '''reboot''' your Raspberry Pi.
 
[[File:Raspi-config-2.jpg|800px]]
 
 
Setting for Software Reset - Starting RASPISTILL or RASPIVID multiple times and no need to reboot Raspberry Pi
 
 
4. Once rebooted, You will need to edit /etc/rc.local to execute CAM GPIO initialization at startup
 
 
<span style="color:red;"'''>IMPORTANT PROCEDURE!!!''' Your X630 cannot work if this is not edited correctly.</span>
 
 
sudo nano /etc/rc.local
 
Scroll down, and just before the exit 0 line, enter the following:
 
echo "509" > /sys/class/gpio/export
 
echo "out" > /sys/class/gpio/gpio509/direction
 
echo "1" > /sys/class/gpio/gpio509/value
 
 
[[File:X630 setting1.jpg|X630]]
 
 
Save and exit with ctrl + x, followed by y when prompted to save, and then enter.
 
 
5. Reboot your Raspberry Pi to verify that the CAM LED lights up.
 
sudo reboot
 
[[File:X630-led.png|X630]]
 
 
6. Once rebooted, you need to make sure that the ‘/dev/video0’ device is available. Use this command to check:
 
 
ls /dev/video0
 
 
[[File:Raspi-config-3.jpg|800px]]
 
 
If you see anything other than ‘file not found‘, then it’s available.
 
 
7. Create a script to reset the X630 module
 
sudo nano reset.sh
 
enter the following:
 
echo "0" > /sys/class/gpio/gpio509/value
 
sleep 1
 
echo "1" > /sys/class/gpio/gpio509/value
 
 
Save and exit with ctrl + x, followed by y when prompted to save, and then enter.
 
 
8. Reboot your Raspberry Pi
 
sudo reboot
 
 
9. To take first photo with the X630 Module
 
sudo bash reset.sh
 
raspistill -o image1.jpg
 
 
Here, "image1" is the name of your image that will be saved to your Raspberry Pi
 
 
10. To take second photo with the X630 Module
 
sudo bash reset.sh
 
raspistill -o image2.jpg
 
 
Here, "image2" is the name of your image that will be saved to your Raspberry Pi.
 
 
11. Record first video with the X630 module
 
sudo bash reset.sh
 
raspivid -o video1.h264 -t 10000
 
 
Here, "video1" is the name of your video and "10000" is the number of milliseconds.
 
 
12. Record second video with the X630 module
 
sudo bash reset.sh
 
raspivid -o video2.h264 -t 10000
 
 
Here, "video2" is the name of your video and "10000" is the number of milliseconds.
 
 
'''Note: "sudo bash reset.sh" is always required to execute before starting RASPISTILL or RASPIVID. the CAM LED will go off for 1second then turn on.
 
'''
 
 
For Hardware Reset - Starting RASPISTILL or RASPIVID once then reboot your Raspberry Pi.
 
 
(Please use when operating system cannot control the X630 module via GPIO509)
 
 
13. To take a photo with the X630 Module
 
raspistill -o image.jpg
 
 
Here, "image" is the name of your image that will be saved to your Raspberry Pi
 
 
14. If you need to take second image, then you will need to reboot the Raspberry Pi and execute the "raspistill" again
 
sudo reboot
 
 
15. To record a video with the X630 module
 
raspivid -o video.h264 -t 10000
 
 
Here, "video" is the name of your video and "10000" is the number of milliseconds.
 
 
16. If you need to record second video, then you will need to reboot the Raspberry Pi and execute the "raspivid" again
 
sudo reboot
 
 
<hr>
 
'''For Hardware Reset''' - Starting RASPISTILL or RASPIVID once then reboot your Raspberry Pi
 
 
Please use the following guide if your dip switch is changed to 'Hardware reset' position.
 
 
12. To take a photo with the X630 Module
 
raspistill -o image.jpg
 
Here, "image.jpg" is the name of your image that will be saved to your Raspberry Pi
 
 
13. If you need to take second image, then you will need to reboot the Raspberry Pi and execute the "raspistill" again.
 
sudo reboot
 
 
14. To record a video with the X630 module
 
raspivid -o video.h264 -t 10000
 
Here, "video" is the name of your video and "10000" is the number of milliseconds.
 
  
15. If you need to record second video, then you will need to reboot the Raspberry Pi and execute the "raspivid" again.
 
sudo reboot
 
  
==How to check kernel version==
+
'''For Hardware Reset'''  refer to [[X630-Hardware-Reset]]
Please run the following command to get the linux kernel version
 
uname -a
 
[[File:Raspi-kernel-version.jpg|800px]]
 
  
Maybe you can refer to [https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=281972 TC358743 HDMI to CSI-2 install instructions] if your kernel version is lower than 5.X.
+
'''For Software Reset''' refer to [[X630-Software-Reset]]
  
  

Latest revision as of 09:59, 12 March 2024

This wiki describes how to use x630 on the Raspberry Pi OS. Note: The software can currently be used directly on Raspberry Pi 4B, 3B+/3B/Zero series. Software support for Raspberry Pi 5 software is not available which need to be tested.

The Raspberry Pi Foundation has updated several versions recently;

The use guide of X630 depends on the official Raspberry Pi OS version you are using. Different versions have different usage methods. If you have some questions, please contact us and attach the os version you are using.(Email: support@geekworm.com)

For Raspberry Pi OS

NOTE:

Since the X630 V1.5 version removes the software reset&hardware reset DIP switch, for the V1.5 version, please ignore the use of software reset or directly visit to X630-Hardware-Reset

X630 v1.3 has two reset mode: Hardware reset and Software reset modes;


You can use hardware reset mode if you use it on raspberry pi hardware or raspberry pi os, software reset uses GPIO 509 to reset operation through GPIO, which can prevent you from restarting the Raspberry Pi repeatedly, which is very convenient.


The user guide of X630 is similar to C779 when X630 is in hardware mode, but X630 supports audio when used with X630-A2, and C779 does not support audio


First, please confirm & select X630 work mode according the picture; After November 2021, the default factory mode is hardware mode;

We found that some users prefer hardware mode, so our factory default settings have been changed to hardware mode

dip switch

Disconnect power to the Raspberry Pi before changing dip switch positions!!!

SELECTION SWITCH SETTINGS
Hardware reset(Default) HW = 1 SW = 0
Software reset HW = 0 SW = 1
X630 dip switch setting

Explain:

  • Hardware reset: After starting RASPISTILL or RASPIVID once then you will need to reboot Raspberry Pi to restart it again (Please use when operating system cannot control the X630 module via GPIO509)
  • Software reset: Starting RASPISTILL or RASPIVID multiple times and don't need to reboot Raspberry Pi.
  • Default setting is 'Hardware reset'.
  • Please remove the yellow protective film before change dip switch.


For Hardware Reset refer to X630-Hardware-Reset

For Software Reset refer to X630-Software-Reset


Return to X630

Add your comment
Geekworm Wiki welcomes all comments. If you do not want to be anonymous, register or log in. It is free.