Skip to content

Commit

Permalink
Merge branch 'changes_in_docs' into 'master'
Browse files Browse the repository at this point in the history
docs/Setup.md: Added description.

See merge request app-frameworks/esp_hosted!34
  • Loading branch information
Mangesh Malusare committed Jun 22, 2020
2 parents f56cf01 + de97a1e commit 0db0a37
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 15 deletions.
24 changes: 14 additions & 10 deletions docs/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Currently we support ESP32 WROVER-Kit with Raspberry-Pi (3 Model B+, 4 Model B) for evaluation with Raspbian operating system.

## Raspberry-Pi Software Setup

### Kernel setup:
We recommend full version Raspbian install on Raspberry-Pi to ensure easy driver compilation. Please make sure to use kernel version `v4.19` and above. Prior kernel versions may work, but are not tested. Kernel headers are required for driver compilation. Please install them as:
```sh
$ sudo apt update
Expand All @@ -11,6 +13,8 @@ Verify that kernel headers are installed properly by running following command.
```sh
$ ls /lib/modules/$(uname -r)/build
```

### Python setup:
Python is required to run utility scripts. Please install it as:
```sh
$ sudo apt-get install python
Expand All @@ -20,19 +24,19 @@ To start with control path on Raspberry-Pi, `protobuf` and `utils` python module
pip install utils
pip install protobuf
```
Raspi-gpio utility is required to configure GPIO pins. Please install it as:
```sh
$ sudo apt-get install raspi-gpio
```

To test BT/BLE functionality on Raspberry-Pi `bluez`(official Linux Bluetooth protocol stack) is needed. check if Raspberry-Pi has installed `bluez` or not.
[link that can help to install bluez](https://scribles.net/updating-bluez-on-raspberry-pi-from-5-43-to-5-50/)
### Source code repository:
* Clone esp-hosted repository on Raspberry Pi.

### Note
```
We have tested BT/BLE solution at bluez 5.43 and 5.45.
* To test BT/BLE functionality on Raspberry-Pi `bluez`(official Linux Bluetooth protocol stack) is needed. check if Raspberry-Pi has installed `bluez` or not.
[link that can help to install bluez](https://scribles.net/updating-bluez-on-raspberry-pi-from-5-43-to-5-50/). We have tested BT/BLE solution at bluez 5.43 and 5.45.

### Utilities:
* Raspi-gpio utility is required to configure GPIO pins. Please install it as:
```sh
$ sudo apt-get install raspi-gpio
```
make sure Raspberry-Pi should have `bluetoothctl`, `bluetoothd`, `hcitool`, `hciconfig` utilities.
* make sure Raspberry-Pi should have `bluetoothctl`, `bluetoothd`, `hcitool`, `hciconfig` utilities.

## Wi-Fi and BT/BLE connectivity Setup over SDIO
### Hardware Setup/Connections
Expand Down
24 changes: 19 additions & 5 deletions host/linux/host_control/rpi_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,18 @@ wlan_init()
{
cd ../host_driver/esp32/
make -j8
if [ `lsmod | grep esp32 | wc -l` != "0" ]; then
sudo rmmod esp32
sudo rm /dev/esps0
fi
sudo insmod esp32.ko
sudo mknod /dev/esps0 c 221 0
sudo chmod 666 /dev/esps0
if [ `lsmod | grep esp32 | wc -l` != "0" ]; then
echo "esp32 module inserted "
sudo mknod /dev/esps0 c 221 0
sudo chmod 666 /dev/esps0
echo "/dev/esps0 device created"
echo "RPi init successfully completed"
fi
}

bt_init()
Expand All @@ -42,10 +51,15 @@ if [ "$1" = "-h" ]; then
exit 0
fi

sudo modprobe bluetooth
wlan_init
if [ `lsmod | grep bluetooth | wc -l` = "0" ]; then
echo "bluetooth module inserted"
sudo modprobe bluetooth
fi

if [ `lsmod | grep bluetooth | wc -l` != "0" ]; then
wlan_init
fi

if [ "$1" = "btuart" ]; then
bt_init
fi

0 comments on commit 0db0a37

Please sign in to comment.