Skip to content

Commit

Permalink
Merge branch 'docusaurus-version' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
limengdu authored Oct 25, 2024
2 parents f2b8165 + 6514084 commit 332fcc5
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords:
image: https://files.seeedstudio.com/wiki/wiki-platform/S-tempor.png
slug: /recomputer_r1000_flash_OS
last_update:
date: 05/8/2023
date: 10/25/2024
author: Parker Hu
---
# reComputer R1000 Raspbian OS to eMMC
Expand Down Expand Up @@ -438,6 +438,21 @@ sudo reboot

This process will ensure that your drivers are up to date before updating the firmware.

For reComputer R1000 V1.0, it need to change the `/boot/firmware/config.txt` file after restarting and enter the following command:
```shell
sudo nano /boot/firmware/config.txt
```
Modify the final content of the file to:
```shell
enable uart=1
dtoverlay=dwc2,dr mode=host
dtoverlay=vc4-kms-v3d
dtoverlay=reComputer-R100x,uart2
```
Then restart:
```shell
sudo reboot
```

## Tech Support & Product Discussion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,12 @@ keywords:
image: https://files.seeedstudio.com/wiki/wiki-platform/S-tempor.png
slug: /reComputer_r1000_use_rs485_modbus_rtu
last_update:
date: 06/24/2024
date: 10/25/2024
author: ShuishengPeng
---

## Introduction
This article mainly introduces how to use the 485 communication function of reComputer R1000, and tests the RS485 and Modbus communication functions.
We need to control the DE pin of the 485 transceiver, which is used by the device to switch between data sending mode and receiving mode. By default, R1000 does not control the DE pin, so when the user does not control this pin, the 485 can only communicate in one direction.

We wrote a [**C program**](https://github.com/Seeed-Studio/seeed-linux-dtoverlays/tree/master/tools/rs485_control_DE) to manage the DE pin, If your application is only responsible for receiving/sending data, you can use this program to ensure that the sending and receiving of the RS485 interface is normal.
- In addition to the methods mentioned in this article, we also provide a script that you can execute using the following command. This script can automatically create a new /dev/ttyx and then use the newly created device number to perform rs485/modbus rtu communication is enough
```shell
curl -sSL https://raw.githubusercontent.com/Seeed-Projects/R1000-RS485-Util/main/setup_rs485.sh | sudo bash
```

## Getting Start

Expand Down Expand Up @@ -66,10 +59,17 @@ For ModbusTCP, we use Ethernet cables to connect the W10 PC and reComputer R1000

<div align="center"><img src="https://files.seeedstudio.com/wiki/reComputer-R1000/fuxa/r1000_connection.png" alt="pir" width="500" height="auto" /></div>

## Configuration required for reComputer R1000 V1.0
For reComputer R1000 V1.0,we need to control the DE pin of the 485 transceiver, which is used by the device to switch between data sending mode and receiving mode. By default, R1000 does not control the DE pin, so when the user does not control this pin, the 485 can only communicate in one direction.

We wrote a [**C program**](https://github.com/Seeed-Studio/seeed-linux-dtoverlays/tree/master/tools/rs485_control_DE) to manage the DE pin, If your application is only responsible for receiving/sending data, you can use this program to ensure that the sending and receiving of the RS485 interface is normal.
- In addition to the methods mentioned in this article, we also provide a script that you can execute using the following command. This script can automatically create a new /dev/ttyx and then use the newly created device number to perform rs485/modbus rtu communication is enough
```shell
curl -sSL https://raw.githubusercontent.com/Seeed-Projects/R1000-RS485-Util/main/setup_rs485.sh | sudo bash
```

## Steps to use the RS485 interface normally and perform Modbus RTU testing

**Step 1**: First, you need to download the [**C program**](https://github.com/Seeed-Studio/seeed-linux-dtoverlays/tree/master/tools/rs485_control_DE) provided by us, and then refer to the contents of the ReadMe. Compile and run.
### Manual configuration
First, you need to download the [**C program**](https://github.com/Seeed-Studio/seeed-linux-dtoverlays/tree/master/tools/rs485_control_DE) provided by us, and then refer to the contents of the ReadMe. Compile and run.

```shell
git clone https://github.com/Seeed-Studio/seeed-linux-dtoverlays
Expand All @@ -82,7 +82,20 @@ sudo ./rs485_DE /dev/ttyAMA2 /dev/gpiochip0 6 /dev/ttyAMA10
This program will create a new ttyAMAx device, where the device number depends on the parameters you enter when running the program.
<center><img width={600} src="https://files.seeedstudio.com/wiki/reComputer-R1000/RS485_fix/cfg_c.gif" /></center>

**Step 2**: After completing the first step, you can use the functions of RS485. Enter the following script on reComputer R1000 to open the minicom software
:::note
- The above example shows how to use one RS485 interface. If you want to use three 485 interfaces, you can use the following script to achieve it:
```shell
sudo ./rs485_DE /dev/ttyAMA2 /dev/gpiochip0 6 /dev/ttyAMA10 &
sudo ./rs485_DE /dev/ttyAMA3 /dev/gpiochip0 17 /dev/ttyAMA11 &
sudo ./rs485_DE /dev/ttyAMA5 /dev/gpiochip0 24 /dev/ttyAMA12 &
```
ttyAMA10~ttyAMA12 corresponds to ttyAMA2~ttyAMA5 one-to-one. Use ttyAMA10~ttyAMA12 in your application for normal communication (ttyAMA2~ttyAMA5 cannot be used, you need to use the device number newly created by the script)
:::

## Steps to use Modbus RTU testing


**Step 1**: Enter the following script on reComputer R1000 to open the minicom software

```shell
minicom -D /dev/ttyAMAx -b 9600
Expand All @@ -91,23 +104,15 @@ Among them, `-D` is followed by the device number you want to open, `-b` refers
<center><img width={600} src="https://files.seeedstudio.com/wiki/reComputer-R1000/RS485_fix/RS485_test.gif" /></center>


**Step 3**: After testing the RS485 function, you can perform the Modbus function test. This step allows the reComputer R1000 to be tested as a Modbus slave.Open the ModbusMechanic software on reComputer R1000, select the device number and baud rate, then click on the simulated slave function in the upper left corner to add two coils; then open Modbus poll in W10 as the master station to read the coils of the slave station. Then open the display window of Modbus poll, and you can see that the sending and receiving messages of Modbus RTU are normal.
**Step 2**: After testing the RS485 function, you can perform the Modbus function test. This step allows the reComputer R1000 to be tested as a Modbus slave.Open the ModbusMechanic software on reComputer R1000, select the device number and baud rate, then click on the simulated slave function in the upper left corner to add two coils; then open Modbus poll in W10 as the master station to read the coils of the slave station. Then open the display window of Modbus poll, and you can see that the sending and receiving messages of Modbus RTU are normal.

<center><img width={600} src="https://files.seeedstudio.com/wiki/reComputer-R1000/RS485_fix/Modbus_RTU_test.gif" /></center>

**Step 4**:This step allows the reComputer R1000 to be tested as a Modbus master. Open the ModbusMechanic software on both reComputer R1000 and W10 PC, and select the device number and baud rate. W10 PC refers to the third step of setting. Select `Read Coils(0x01)` on reComputer R1000 to read the coil of the slave, set `Slave Node` to 1, `Register` select the address you want to read, and finally click `Transmit packet`.
**Step 3**:This step allows the reComputer R1000 to be tested as a Modbus master. Open the ModbusMechanic software on both reComputer R1000 and W10 PC, and select the device number and baud rate. W10 PC refers to the third step of setting. Select `Read Coils(0x01)` on reComputer R1000 to read the coil of the slave, set `Slave Node` to 1, `Register` select the address you want to read, and finally click `Transmit packet`.

<center><img width={600} src="https://files.seeedstudio.com/wiki/reComputer-R1000/RS485_fix/Modbus_master_test.gif" /></center>

:::note
- The above example shows how to use one RS485 interface. If you want to use three 485 interfaces, you can use the following script to achieve it:
```shell
sudo ./rs485_DE /dev/ttyAMA2 /dev/gpiochip0 6 /dev/ttyAMA10 &
sudo ./rs485_DE /dev/ttyAMA3 /dev/gpiochip0 17 /dev/ttyAMA11 &
sudo ./rs485_DE /dev/ttyAMA5 /dev/gpiochip0 24 /dev/ttyAMA12 &
```
ttyAMA10~ttyAMA12 corresponds to ttyAMA2~ttyAMA5 one-to-one. Use ttyAMA10~ttyAMA12 in your application for normal communication (ttyAMA2~ttyAMA5 cannot be used, you need to use the device number newly created by the script)
:::


## Steps to use the Modbus TCP testing

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
description: reComputer R1000 V1.1 Product Change Description
title: reComputer R1000 V1.1 Product change details
keywords:
- Edge
- reComputer R1000
- Modbus RTU
- rs485
image: https://files.seeedstudio.com/wiki/reComputer-R1000/recomputer_r_images/01.png
slug: /recomputer_r1000_v1_1_description
last_update:
date: 10/16/2024
author: ShuishengPeng
---

## Introduction
We found that some users have trouble with DE pin control when using the modbus function of reComputer R1000 V1.0. For better user experience, we modified the pin assignment to make RS485 more usable.And made some adjustments to the overall product.



## Change Description
1 Add a new antenna hole. As shown in the following figure. Now there are 3 antenna holes. The interface screen printing has been adjusted accordingly.

<div align="left"><img width={700} src="https://files.seeedstudio.com/wiki/reComputer-R1000/PCN/before_after.png" /></div>


2 PCBA version changed from V1.0 to V1.1.


3 DSI interface adjustment: modified from DSI0 to DSI1.


4 Internal speaker connector deleted.


<div align="left"><img width={700} src="https://files.seeedstudio.com/wiki/reComputer-R1000/PCN/delete.png" /></div>



5 The DE transceiver direction control pins for all three RS485 groups are changed to pins that support the RTS function.


6 Some other pin adjustments. Please refer to [reComputer R1000 v1.1 Pin Assignment](https://files.seeedstudio.com/wiki/reComputer-R1000/reComputer_R1000_v1_1_Pin_Assignment.xlsx).

## Tech Support & Product Discussion

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

<div class="button_tech_support_container">
<a href="https://forum.seeedstudio.com/" class="button_forum"></a>
<a href="https://www.seeedstudio.com/contacts" class="button_email"></a>
</div>

<div class="button_tech_support_container">
<a href="https://discord.gg/eWkprNDMU7" class="button_discord"></a>
<a href="https://github.com/Seeed-Studio/wiki-documents/discussions/69" class="button_discussion"></a>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ keywords:
image: https://files.seeedstudio.com/wiki/wiki-platform/S-tempor.png
slug: /reComputer_r1000_use_bacnet_mstp
last_update:
date: 07/8/2024
date: 10/25/2024
author: ShuishengPeng
---

Expand Down Expand Up @@ -43,7 +43,7 @@ Before you start this project, you may need to prepare your hardware and softwar
</div>

### Software
* Since bacnet MS/TP uses the RS485 physical layer, you can refer to this [wiki](https://wiki.seeedstudio.com/reComputer_r1000_use_rs485_modbus_rtu/) on how to use the RS485 function on reComputer R1000 normally.
* Since bacnet MS/TP uses the RS485 physical layer, you can refer to this [wiki](https://wiki.seeedstudio.com/reComputer_r1000_use_rs485_modbus_rtu/) on how to use the RS485 function on reComputer R1000 V1.0 normally.
* We simulate a server with the help of the `bacnet-stack` library application, so you need to enter the following command to download it:
```shell
git clone https://github.com/bacnet-stack/bacnet-stack.git
Expand Down
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -3084,6 +3084,7 @@ const sidebars = {
id: 'Edge/Raspberry_Pi_Devices/reComputer_R1000/recomputer_r1000_intro',
},
items: [
'Edge/Raspberry_Pi_Devices/reComputer_R1000/recomputer_r1000_pcn',
'Edge/Raspberry_Pi_Devices/reComputer_R1000/recomputer_r',
'Edge/Raspberry_Pi_Devices/reComputer_R1000/recomputer_r1000_flash_os',
'Edge/Raspberry_Pi_Devices/reComputer_R1000/recomputer_r1000_assembly_guide',
Expand Down

0 comments on commit 332fcc5

Please sign in to comment.