Skip to content

Commit

Permalink
Merge branch 'Seeed-Studio:docusaurus-version' into weeklywiki
Browse files Browse the repository at this point in the history
  • Loading branch information
nfs0619 authored Sep 3, 2024
2 parents 84c35b8 + 656d554 commit 3811b32
Show file tree
Hide file tree
Showing 2 changed files with 333 additions and 3 deletions.
127 changes: 124 additions & 3 deletions docs/Network/Meshtastic_Network/sensecap_t1000_e.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,19 +295,140 @@ Now that you have set the LoRa region on your device, you can continue with conf



* **Step 1**: Enter DFU mode
### Flash the Bootloader

:::danger note
Not recommended to flash the bootloader unless advised by tech support!
:::


* [Bootloader download](https://files.seeedstudio.com/wiki/SenseCAP/lorahub/t1000_e_bootloader-0.9.1-5-g488711a_s140_7.3.0.zip)

**Step1: Adafruit-nrfutil Installation**

**Prerequisites**

- [Python3](https://www.python.org/downloads/)
- [pip3](https://pip.pypa.io/en/stable/installation/)



<Tabs>
<TabItem value="pypi" label="Installing from PyPI">

This is recommended method, to install latest version:

```
pip3 install --user adafruit-nrfutil
```



</TabItem>

<TabItem value="sou" label="Installing from Source">

Use this method if you have issue installing with PyPi or want to modify the tool. First clone this repo and go into its folder.

```
git clone https://github.com/adafruit/Adafruit_nRF52_nrfutil.git
cd Adafruit_nRF52_nrfutil
```

Note: following commands use `python3`, however if you are on Windows, you may need to change it to `python` since windows installation of python 3.x still uses the name python.exe

To install in user space in your home directory:

```
pip3 install -r requirements.txt
python3 setup.py install
```

If you get permission errors when running `pip3 install`, your `pip3` is older
or is set to try to install in the system directories. In that case use the
`--user` flag:

```
pip3 install -r --user requirements.txt
python3 setup.py install
```

If you want to install in system directories (generally not recommended):
```
sudo pip3 install -r requirements.txt
sudo python3 setup.py install
```


To generate a self-contained executable binary of the utility (Windows and MacOS), run these commands:

```
pip3 install pyinstaller
cd Adafruit_nRF52_nrfutil
pip3 install -r requirements.txt
cd Adafruit_nRF52_nrfutil\nordicsemi
pyinstaller __main__.py --onefile --clean --name adafruit-nrfutil
```
You will find the .exe in `Adafruit_nRF52_nrfutil\nordicsemi\dist\adafruit-nrfutil` ( with `.exe` if you are on windows).
Copy or move it elsewhere for your convenience, such as directory in your %PATH%.

</TabItem>
</Tabs>


**Step2: Flash the bootloader**

Connect the device to your PC and run the following command:

* **For Windows**:
```
adafruit-nrfutil --verbose dfu serial --package t1000_e_bootloader-0.9.1-5-g488711a_s140_7.3.0.zip -p COMxx -b 115200
```

* **For others**:
```
adafruit-nrfutil --verbose dfu serial --package t1000_e_bootloader-0.9.1-5-g488711a_s140_7.3.0.zip -p /dev/tty.SLAB_USBtoUART -b 115200
```

Replace the serial port with your device port. Example:
<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/Meshtastic/usb-port.png" alt="pir" width={600} height="auto" /></p>







### Flash the Application Firmware


* **Step 1**: Download the firmware

You may use the [Meshtastic Web Flasher](https://flasher.meshtastic.org/) to download and copy firmware.

Select the device to `Seeed Card Tracker T1000-E` and the latest firmware, and download the `UF2` file.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/Meshtastic/e-uf2.png" alt="pir" width={800} height="auto" /></p>


* **Step 2**: Enter DFU mode

Connect the USB cable to your PC, press and hold the device button, then **quickly** connect the charging cable twice, the LED will be solid on, the device will enter the DFU mode, and there should be a driver named `T1000-E` display.

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/Meshtastic/dfu2.gif" alt="pir" width={400} height="auto" /></p>


<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/Meshtastic/e-driver.png" alt="pir" width={600} height="auto" /></p>

* **Step 2**: Copy UF2 file
* **Step 3**:

Download and Copy UF2 file to the DFU drive. Firmware should be flashed after the file is downloaded and the device reboots.

* [Application Firmware](https://files.seeedstudio.com/wiki/SenseCAP/Meshtastic/firmware-t1000-e-2.4.0.46d7b82_Alpha_pre_release.uf2)(Recommended version)






## FAQ

Expand Down
209 changes: 209 additions & 0 deletions docs/Network/single_channel_lorahub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
---
description: Single Channel LoRaHub
title: Single Channel LoRaHub
keywords:
- gateway
- XIAO ESP32C6
- SX1262
image: https://files.seeedstudio.com/wiki/wiki-platform/S-tempor.png
slug: /single_channel_lorahub
last_update:
date: 8/27/2024
author: Jessie
---

This project demonstrates how to implement a single channel LoRa gateway (LoRaHub) using a [XIAO ESP32C6](https://www.seeedstudio.com/Seeed-Studio-XIAO-ESP32C6-p-5884.html) as host MCU and Wio SX1262 LoRa radio.


## Get Started

### Setup environment


This project is based on the Espressif ESP-IDF development, check this [guide](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/index.html#installation ) to setup the environment.


#### Get ESP-IDF

```
mkdir -p ~/esp
cd ~/esp
git clone -b v5.2.1 --recursive https://github.com/espressif/esp-idf.git
```


#### Set up Tools

```
cd esp-idf/
./install.sh
```



### Start Project



#### Install driver

```
cd ~/this_project_directory/components/radio_drivers
```

```
git clone -b v2.3.2 https://github.com/Lora-net/sx126x_driver.git sx126x_driver
```

```
git clone -b v2.3.2 https://github.com/Lora-net/llcc68_driver.git llcc68_driver
```

```
git clone -b v2.4.1 https://github.com/Lora-net/SWDR001.git lr11xx_driver
```

#### Start

```
cd ~/this_project_directory/lorahub
```



* Set up Environment Variables:

This step can be skipped on Windows, as the installed "ESP-IDF x.x CMD" command will prepare it automatically.

```
. ~/esp/esp-idf/export.sh
```

* Set the target device:

```
idf.py set-target esp32c6
```

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/lorahub/set-target.png" alt="pir" width={600} height="auto" /></p>


Customize the build if necessary (it is configured for the Heltec board by default).
```
idf.py menuconfig
```

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/lorahub/hub-config.png" alt="pir" width={600} height="auto" /></p>


### Build this Project

Build the project by running:

```
idf.py build
```



### Flash this Project

#### Flash via ESP-IDF

To flash the binaries, run the following command:

```
idf.py -p /dev/ttyUSB0 flash
```


Launch the monitor console to see logs (optional).
```
idf.py -p /dev/ttyUSB0 monitor
```




#### Flash via ESPTOOL

If not using the complete ESP-IDF environment,you can also flash the binary files using the [esptool](https://docs.espressif.com/projects/esptool/en/latest/esp32/) utility.



for Linux/MacOS:
```
esptool.py --chip esp32s3 -p /dev/ttyUSB0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x0 bootloader.bin 0x10000 lorahub.bin 0x8000 partition-table.bin
```

for Windows:

```
py -m esptool --chip esp32s3 -p COM14 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x0 bootloader.bin 0x10000 lorahub.bin 0x8000 partition-table.bin
```

### Wi-Fi Configuration


Download `ESP BLE prov` App:

* [for Android](https://play.google.com/store/apps/details?id=com.espressif.provble)
* [for IOS](https://apps.apple.com/in/app/esp-ble-provisioning/id1473590141)


Press the `RST` button on the board, and then press the `BOOT` button, the LED will be on.


<div class="table-center">
<iframe width="200" height="400" src="https://files.seeedstudio.com/wiki/SenseCAP/lorahub/wifi-pro.mp4" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>
</div>

Click Provision New Device button, click `I don't have a QR code` .
Change the prefix to `LRHB_`.

A device should be listed with a name prefixed with `LRHB_xxxx`.

Click on the device name, enter the proof of possession PIN. Default is `abcd1234`.

Select the WiFi network to be joined and enter credentials.







### LoRa Configuration

A web interface is available at:

```
http://xx.xx.xx.xx:8000
```
The IP can be checked in the serial monitor.


<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/lorahub/ip-port.png" alt="pir" width={800} height="auto" /></p>

The web interface allows to configure the following:

channel parameters: frequency, datarate, bandwidth
LoRaWAN network server: address, port
SNTP server address (to get UTC time)
There are 2 buttons at the bottom of the configuration form:

`Configure`: when pressed, the parameters set in the HTML form are written to flash memory (NVS).<br/>
`Reboot`: when pressed, a reboot command is triggered, the LoRaHub will restart and the new configuration is applied.

:::note
Note that the configuration written in flash memory is only taken into account on the next reboot.
:::


<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/lorahub/web-config.png" alt="pir" width={800} height="auto" /></p>



### Resource

[Github-LoRaHub](https://github.com/Seeed-Studio/SWDM019-LoRaHub-modified)

0 comments on commit 3811b32

Please sign in to comment.