mirror of
https://github.com/meshtastic/meshtastic.git
synced 2025-01-26 05:01:38 -08:00
commit
cbd54ce262
53
website/docs/developers/android/build.md
Normal file
53
website/docs/developers/android/build.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
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 phoneor 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
|
27
website/docs/developers/build.md
Normal file
27
website/docs/developers/build.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
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.
|
||||
|
||||
## GUI Installation
|
||||
|
||||
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.
|
||||
:::
|
28
website/docs/developers/codespaces.md
Normal file
28
website/docs/developers/codespaces.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
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 like 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.
|
||||
<!--add images for this section once I have access to Codespaces-->
|
||||
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.
|
||||
<!--add examples of usage-->
|
|
@ -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.
|
||||
|
|
@ -41,14 +41,14 @@ A number of [key services](http://github.com/meshtastic/meshtastic-device/tree/m
|
|||
|
||||
- [TextMessagePlugin](http://github.com/meshtastic/meshtastic-device/tree/master/src/plugins/TextMessagePlugin.h) - receives text messages and displays them on the LCD screen/stores them in the local DB
|
||||
- [NodeInfoPlugin](http://github.com/meshtastic/meshtastic-device/tree/master/src/plugins/NodeInfoPlugin.h) - receives/sends User information to other nodes so that usernames are available in the databases
|
||||
- [RemoteHardwarePlugin](http://github.com/meshtastic/meshtastic-device/tree/master/src/plugins/RemoteHardwarePlugin.h) - a plugin that provides easy remote access to device hardware (for things like turning GPIOs on or off). Intended to be a more extensive example and provide a useful feature of its own. See [remote-hardware](remote-hardware-service.md) for details.
|
||||
- [RemoteHardwarePlugin](http://github.com/meshtastic/meshtastic-device/tree/master/src/plugins/RemoteHardwarePlugin.h) - a plugin that provides easy remote access to device hardware (for things like turning GPIOs on or off). Intended to be a more extensive example and provide a useful feature of its own. See [remote-hardware](/docs/software/other/remote-hardware-service) for details.
|
||||
- [ReplyPlugin](http://github.com/meshtastic/meshtastic-device/tree/master/src/plugins/ReplyPlugin.h) - a simple plugin that just replies to any packet it receives (provides a 'ping' service).
|
||||
|
||||
## Getting started
|
||||
|
||||
The easiest way to get started is:
|
||||
|
||||
- [Build and install](build-instructions.md) the standard codebase from github.
|
||||
- [Build and install](/docs/software/other/build-instructions) the standard codebase from github.
|
||||
- Copy [src/plugins/ReplyPlugin.\*](http://github.com/meshtastic/meshtastic-device/tree/master/src/plugins/ReplyPlugin.cpp) into src/plugins/YourPlugin.*. Then change the port number from *PortNum_REPLY_APP* to *PortNum_PRIVATE_APP\*.
|
||||
- Edit plugins/Plugins.cpp:setupPlugins() to add a call to create an instance of your plugin (see comment at head of that function)
|
||||
- Rebuild with your new messaging goodness and install on the device
|
|
@ -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%'}} />
|
|
@ -44,7 +44,7 @@ FIXME - explain this more, talk about how useful for users and security domains.
|
|||
|
||||
## On device API
|
||||
|
||||
For information on the related on-device API see [here](device-api.md).
|
||||
For information on the related on-device API see [here](/docs/developers/device/device-api).
|
||||
|
||||
## MQTT transport
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ sidebar_label: Software Design
|
|||
This is a mini design doc for developing the meshtastic software.
|
||||
|
||||
- [Build instructions](build-instructions.md)
|
||||
- [On device plugin API](plugin-api.md) - a tutorial on how to write small Plugins which run on the device and can message other nodes.
|
||||
- [On device plugin API](/docs/developers/device/plugin-api) - a tutorial on how to write small Plugins which run on the device and can message other nodes.
|
||||
- Our [project board](https://github.com/orgs/meshtastic/projects/1) - shows what things we are currently working on and remaining work items for the current release.
|
||||
- [Power Management](power.md)
|
||||
- [Mesh algorithm](mesh-alg.md)
|
||||
- [External client API](device-api.md) and porting guide for new clients (iOS, python, etc...)
|
||||
- [Mesh algorithm](/docs/developers/device/mesh-alg)
|
||||
- [External client API](/docs/developers/device/device-api) and porting guide for new clients (iOS, python, etc...)
|
||||
- TODO: how to port the device code to a new device.
|
||||
|
|
|
@ -89,14 +89,11 @@ module.exports = {
|
|||
"software/other/remote-hardware-service",
|
||||
"software/other/rak815",
|
||||
"software/other/power",
|
||||
"software/other/plugin-api",
|
||||
"software/other/pinetab",
|
||||
"software/other/nrf52-TODO",
|
||||
"software/other/mqtt",
|
||||
"software/other/mesh-alg",
|
||||
"software/other/install-OSX",
|
||||
"software/other/esp32-arduino-build-notes",
|
||||
"software/other/device-api",
|
||||
"software/other/build-instructions",
|
||||
"software/other/ant",
|
||||
],
|
||||
|
@ -150,15 +147,26 @@ module.exports = {
|
|||
Protobufs: ["developers/protobufs/api"],
|
||||
},
|
||||
"developers/api",
|
||||
"developers/build-env",
|
||||
"developers/codespaces",
|
||||
{
|
||||
Device: [
|
||||
"developers/device/device-api",
|
||||
"developers/device/radio-settings",
|
||||
"developers/device/mesh-alg",
|
||||
"developers/device/encryption",
|
||||
"developers/device/portnum",
|
||||
"developers/device/plugin-api",
|
||||
"developers/device/http-api",
|
||||
"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