mirror of
https://github.com/meshtastic/meshtastic.git
synced 2024-12-26 22:19:46 -08:00
Add build environments
This commit is contained in:
parent
702c82d76e
commit
d80a450e4d
55
website/docs/developers/android/build.md
Normal file
55
website/docs/developers/android/build.md
Normal file
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
id: build-app
|
||||
title: Creating a build/development environment for the Android App
|
||||
sidebar_label: Building Android App
|
||||
---
|
||||
|
||||
|
||||
## Build instructions
|
||||
|
||||
If you would like to develop this application we'd love your help! These build instructions are brief
|
||||
and should be improved, please send a PR if you can.
|
||||
|
||||
* Use Android Studio 4.1.2 to build/debug (other versions might work but no promises)
|
||||
* Use "git submodule update --init --recursive" to pull in the various submodules we depend on
|
||||
* There are a few config files which you'll need to copy from templates included in the project.
|
||||
Run the following commands to do so:
|
||||
|
||||
```
|
||||
rm ./app/google-services.json
|
||||
cp ./app/google-services-example.json ./app/google-services.json
|
||||
rm ./app/src/main/res/values/mapbox-token.xml
|
||||
cp ./app/special/mapbox-token.xml ./app/src/main/res/values/
|
||||
rm ./app/src/main/res/values/curfirmwareversion.xml
|
||||
cp ./app/special/curfirmwareversion.xml ./app/src/main/res/values/
|
||||
```
|
||||
|
||||
* (unfortunately) you need to get a (free) mapbox developer token [here](https://docs.mapbox.com/android/maps/guides/install/) and put that token in your user gradle.properties.
|
||||
```
|
||||
~/development/meshtastic/MeshUtil$ cat ~/.gradle/gradle.properties
|
||||
MAPBOX_DOWNLOADS_TOKEN=sk.yourtokenherexxx
|
||||
```
|
||||
|
||||
* Now you should be able to select "Run / Run" in the IDE and it will happily start running on your phone
|
||||
or the emulator. Note: The emulators don't support bluetooth, so some features can not be used in
|
||||
that environment.
|
||||
|
||||
## Analytics setup
|
||||
|
||||
* analytics are included but can be disabled by the user on the settings screen
|
||||
|
||||
* on dev devices
|
||||
|
||||
```shell
|
||||
adb shell setprop debug.firebase.analytics.app com.geeksville.mesh
|
||||
adb shell setprop log.tag.FirebaseCrashlytics DEBUG
|
||||
```
|
||||
|
||||
for verbose logging:
|
||||
```shell
|
||||
adb shell setprop log.tag.FA VERBOSE
|
||||
```
|
||||
|
||||
## Publishing to google play
|
||||
|
||||
(Only supported if you are a core developer that needs to do releases)
|
29
website/docs/developers/android/mapbox.md
Normal file
29
website/docs/developers/android/mapbox.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
id: mapbox
|
||||
title: Setting up Mapbox with Meshtastic
|
||||
sidebar_label: Mapbox Setup
|
||||
---
|
||||
|
||||
If you build Meshtastic as per the standard instructions then you may notice that the maps are not shown. This is because there is an extra step to setting up MapBox (an external service) with Meshtastic.
|
||||
|
||||
## Getting MapBox to work with your local copy of Meshtastic
|
||||
|
||||
In order to compile a new version of Meshtastic that can use MapBox you will need to provide a token associated with your MapBox user account.
|
||||
|
||||
This is fairly simple to do.
|
||||
|
||||
* Create an account at MapBox
|
||||
* Copy the public token associated with that account to the clipboard
|
||||
* Paste that into the file "…/src/main/res/values/mapbox-token.xml"
|
||||
|
||||
## Examples of what can be achieved with MapBox
|
||||
|
||||
MapBox is an external service with many features that can be included in the Meshtastic app.
|
||||
|
||||
The following link shows many of the available features:
|
||||
https://docs.mapbox.com/mapbox-gl-js/examples/
|
||||
|
||||
## Basics of using MapBox with Android Apps
|
||||
|
||||
MapBox provide a simple example of how to display a basic map in an Android App:
|
||||
https://docs.mapbox.com/android/maps/overview/#add-a-map
|
25
website/docs/developers/build.md
Normal file
25
website/docs/developers/build.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
id: build-env
|
||||
title: Creating a build/development environment
|
||||
sidebar_label: Building Meshtastic
|
||||
---
|
||||
|
||||
This project uses the simple PlatformIO build system. PlatformIO is an extension to Microsoft VSCode. Workflows from building from the GUI or from the commandline are listed below.
|
||||
|
||||
## GUI
|
||||
|
||||
1. Install [Python](https://www.python.org/downloads/).
|
||||
2. Install [Git](https://git-scm.com/downloads) or [GitHub Desktop](https://desktop.github.com/)
|
||||
3. Install [Microsoft Visual Studio Code](https://code.visualstudio.com/)
|
||||
4. Install [PlatformIO](https://platformio.org/platformio-ide).
|
||||
5. Click the PlatformIO icon on the side bar.
|
||||
![platformio icon](https://user-images.githubusercontent.com/47490997/89482668-77c7ea00-d7ee-11ea-8785-5faf8ff99800.png)
|
||||
6. Under `Quick Access, Miscellaneous, Clone Git Project` enter the URL of the Meshtastic repo found [here](https://github.com/meshtastic/Meshtastic-device).
|
||||
![image](https://user-images.githubusercontent.com/47490997/89483047-4c91ca80-d7ef-11ea-91f4-1d53d4e8acd9.png)
|
||||
7. Select a file location to save the repo.
|
||||
8. Once loaded, open the `platformio.ini` file.
|
||||
9. At the line `default_envs` you can change it to the board type you are building for ie. `tlora-v2, tlora-v1, tlora-v2-1-1.6, tbeam, heltec, tbeam0.7` (boards are listed further down in the file).
|
||||
10. The hardware can be configured for different countries by adding a definition to the `configuration.h` file. `#define HW_VERSION_US` or `HW_VERSION_EU433, HW_VERSION_EU865, HW_VERSION_CN, HW_VERSION_JP`. Other country settings can be found in `MeshRadio.h`. The default is `HW_VERSION_US`.
|
||||
11. Click the PlatformIO icon on the side bar. Under `Project Tasks` you can now build or upload.
|
||||
|
||||
Note - To get a clean build you may have to delete the auto-generated file `./.vscode/c_cpp_properties.json`, close and re-open Visual Studio and WAIT until the file is auto-generated before compiling again.
|
27
website/docs/developers/codespaces.md
Normal file
27
website/docs/developers/codespaces.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
id: codespaces
|
||||
title: Creating a build/development environment online with Codespaces
|
||||
sidebar_label: Building with Codespaces
|
||||
---
|
||||
|
||||
GitHub Codespaces is a new feature to make is really easy for anyone to build device code (or other projects like out backend server) from scratch. This builds on our existing continuous integration test builds and uses either a bare browser or (optionally) Visual Studio Code. It is a great way for anyone who has problems installing and building locally to get a gauranteed good build environment in the cloud that works and feels just loike you are developing on your local machine.
|
||||
|
||||
GitHub Codespaces is still in active beta and you need to [sign up](https://github.com/features/codespaces) to a waiting list to get access to it.
|
||||
|
||||
![Request access to Codespaces](/img/codespaces/codespaces-request-sm.png)
|
||||
|
||||
GitHub will then ask you about what languages you code in and what editors you use.
|
||||
|
||||
![Codespaces language and editor survey](/img/codespaces/codespaces-languages-sm.png)
|
||||
|
||||
After that you will be added to the waiting list and will be contacted when you can start using it.
|
||||
|
||||
![On the Codespaces waiting list](/img/codespaces/codespaces-waitinglist-sm.png)
|
||||
|
||||
Once you have been granted access, go to the project you wish to develop (for example the [Meshtastic device code](https://github.com/meshtastic/Meshtastic-device) or the [backend server code](https://github.com/meshtastic/meshtastic-backend)) and click the button in the upper right that says "Fork". It will ask you to confirm, then GitHub will generate your "fork" of the master code.
|
||||
|
||||
Browse to your fork of the code and in the upper right of the window click on the "Code" dropdown button, then click "Open with Codespaces"
|
||||
|
||||
Github will then create a new virtual machine for you. This will take a few minutes the first time it is created as it installs Platformio and other dependancies.
|
||||
|
||||
You can now edit code and click to build and run just like you are on your own machine.
|
|
@ -4,7 +4,7 @@ title: Bluetooth/serial/TCP protocol API
|
|||
sidebar_label: Device API
|
||||
---
|
||||
|
||||
(This document describes the protocol for external API clients using our devices. If you are interested in running your own code on the device itself, see the [on-device](plugin-api.md) documentation instead)
|
||||
This document describes the protocol for external API clients using our devices. If you are interested in running your own code on the device itself, see the [plugin API](plugin-api.md) documentation instead.
|
||||
|
||||
The Device API is design to have only a simple stream of ToRadio and FromRadio packets and all polymorphism comes from the flexible set of Google Protocol Buffers which are sent over the wire. We use protocol buffers extensively both for the bluetooth API and for packets inside the mesh or when providing packets to other applications on the phone.
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ On the topic of testing - performing your own testing and providing feedback is
|
|||
|
||||
## Signal strength testing
|
||||
|
||||
Real world testing is also discussed by Andreas Speiss (the 'guy with the Swiss accent') in his [tutorial](https://www.youtube.com/watch?v=J3PBL9oLPX8). He has written [code](https://github.com/SensorsIot/Antenna-Tester) for testing antennas using two Lora32 V1 boards to compare how different antennas behave.
|
||||
Real world testing is also discussed by Andreas Speiss (the 'guy with the Swiss accent') in his [tutorial](https://www.youtube.com/watch?v=J3PBL9oLPX8). He has written [code](https://github.com/SensorsIot/Antenna-Tester) for testing antennas using two Lora32 V1 boards to compare how different antennas behave. Lilygo have also made code available for testing the rssi on the [LORA32](https://github.com/LilyGO/TTGO-LORA32) [boards](https://github.com/Xinyuan-LilyGO/TTGO-LoRa-Series) and the [T-Beam](https://github.com/LilyGO/TTGO-T-Beam).
|
||||
|
||||
Here are a [couple](https://medium.com/home-wireless/testing-lora-antennas-at-915mhz-6d6b41ac8f1d) of [excellent](https://medium.com/home-wireless/testing-and-reviewing-lora-antennas-5b37dfa594a3) aerial comparisons. Their utility goes beyond the specific aerials tested, giving insight into:
|
||||
- Aerial types & their characteristics,
|
||||
|
|
|
@ -25,5 +25,6 @@ There is currently fledgling support for the WisBlock RAK4631 module. The WisBlo
|
|||
|
||||
* Firmware file: `firmware-rak4631-1.x.x.uf2`
|
||||
* [Purchase Link](https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Overview)
|
||||
* [Installation instructions](https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Quickstart/#rak4631-lora-mesh-via-meshtastic)
|
||||
|
||||
<img alt="RAK4631 Core Module" src="/img/hardware/rak4631.png" style={{zoom:'50%'}} />
|
|
@ -147,6 +147,8 @@ module.exports = {
|
|||
Protobufs: ["developers/protobufs/api"],
|
||||
},
|
||||
"developers/api",
|
||||
"developers/build-env",
|
||||
"developers/codespaces",
|
||||
{
|
||||
Device: [
|
||||
"developers/device/device-api",
|
||||
|
@ -159,6 +161,12 @@ module.exports = {
|
|||
"developers/device/documents",
|
||||
],
|
||||
},
|
||||
{
|
||||
"Android App": [
|
||||
"developers/android/build-app",
|
||||
"developers/android/mapbox",
|
||||
],
|
||||
},
|
||||
],
|
||||
Legal: [
|
||||
"legal/overview",
|
||||
|
|
BIN
website/static/img/codespaces/codespaces-languages-sm.png
Normal file
BIN
website/static/img/codespaces/codespaces-languages-sm.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 125 KiB |
BIN
website/static/img/codespaces/codespaces-languages.png
Normal file
BIN
website/static/img/codespaces/codespaces-languages.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 140 KiB |
BIN
website/static/img/codespaces/codespaces-request-sm.png
Normal file
BIN
website/static/img/codespaces/codespaces-request-sm.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
BIN
website/static/img/codespaces/codespaces-request.png
Normal file
BIN
website/static/img/codespaces/codespaces-request.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 177 KiB |
BIN
website/static/img/codespaces/codespaces-waitinglist-sm.png
Normal file
BIN
website/static/img/codespaces/codespaces-waitinglist-sm.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
BIN
website/static/img/codespaces/codespaces-waitinglist.png
Normal file
BIN
website/static/img/codespaces/codespaces-waitinglist.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
Loading…
Reference in a new issue