Compare commits

...

14 Commits
0.1.3 ... 0.1.5

Author SHA1 Message Date
geeksville
e93187b630 0.1.5 add support for EU 433MHz radios thanks to @astro-arphid 2020-03-12 09:34:10 -07:00
geeksville
eca3cda8b9 fix typos 2020-03-12 09:31:31 -07:00
Kevin Hester
2874adfd69 Merge pull request #21 from astro-arphid/master
#13 - add support for 433MHz Heltec boards (thanks to @astro-arphid)
2020-03-12 09:29:54 -07:00
astro-arphid
91227b25df #13 - add support for 433MHz Heltec boards 2020-03-12 06:05:11 +00:00
geeksville
4dfac03402 add note about 3d printed cases 2020-03-11 10:59:02 -07:00
geeksville
9bc895eb57 fix formatting 2020-03-11 10:55:58 -07:00
geeksville
474026d7fe add a faq 2020-03-11 10:51:38 -07:00
geeksville
9995d2a7ab oops copypasta error fix #19. Thanks @iveskins! 2020-03-10 19:33:16 -07:00
geeksville
3028ac3f24 add note about dash7 2020-03-10 19:32:45 -07:00
geeksville
8605950eef add credits list 2020-03-10 11:43:45 -07:00
Kevin Hester
0f856dea7b Merge pull request #18 from claesg/master
Updated README for 3D cases for T-Beam.
2020-03-10 11:39:17 -07:00
claes
2a2bc5b1d6 Updated README for 3D cases for T-Beam.
T-Beam V1 has moved the antenna connector a bit to the right compared
to the V0. This makes the case not fit.
Added 2 more links for T-Beam cases.
2020-03-10 09:31:32 +01:00
geeksville
f87cb00940 show reason for last reset 2020-03-08 14:05:12 -07:00
geeksville
a4ebf83b69 minor doc update 2020-03-08 14:03:36 -07:00
11 changed files with 106 additions and 40 deletions

View File

@@ -29,7 +29,7 @@ Prebuilt binaries for the supported radios is available in our [releases](https:
The instructions currently require a few commmand lines, but it should be pretty straightforward. Please post comments on our group chat if you have problems or successes. Steps to install: The instructions currently require a few commmand lines, but it should be pretty straightforward. Please post comments on our group chat if you have problems or successes. Steps to install:
1. Purchase a radio (see above) with the correct frequencies for your country (915MHz for US or JP, 470MHz for CN, 870MHz for EU). 1. Purchase a radio (see above) with the correct frequencies for your country (915MHz for US or JP, 470MHz for CN, 433MHz and 870MHz for EU).
2. Install "pip". Pip is the python package manager we use to get the esptool installer app. Instructions [here](https://www.makeuseof.com/tag/install-pip-for-python/). 2. Install "pip". Pip is the python package manager we use to get the esptool installer app. Instructions [here](https://www.makeuseof.com/tag/install-pip-for-python/).
3. Run "pip install --upgrade esptool" to get esptool installed on your machine 3. Run "pip install --upgrade esptool" to get esptool installed on your machine
4. Connect your radio to your USB port 4. Connect your radio to your USB port
@@ -87,4 +87,16 @@ After our rate of change slows a bit, we will make beta builds available here (w
# Development # Development
We'd love to have you join us on this merry little project. Please see our [development documents](./docs/software/sw-design.md) and join us on the gitter chat above. We'd love to have you join us on this merry little project. Please see our [development documents](./docs/software/sw-design.md) and join us on the gitter chat above.
# Credits
This project is run by volunteers. Past contributors include:
* @astro-arphid: Added support for 433MHz radios in europe.
* @claesg: Various documentation fixes and 3D print enclosures
* @girtsf: So far our CI system, but soon lots of device improvements
# IMPORTANT DISCLAIMERS AND FAQ
For a listing of currently missing features and a FAQ click [here](docs/faq.md).

View File

@@ -4,7 +4,7 @@ set -e
source bin/version.sh source bin/version.sh
COUNTRIES="US EU CN JP" COUNTRIES="US EU433 EU865 CN JP"
# COUNTRIES=US # COUNTRIES=US
SRCMAP=.pio/build/esp32/output.map SRCMAP=.pio/build/esp32/output.map

View File

@@ -1,3 +1,3 @@
export VERSION=0.1.3 export VERSION=0.1.5

View File

@@ -62,21 +62,12 @@ sure to buy the frequency range which is legal for your country. For the USA, y
Instructions for installing prebuilt firmware can be found [here](https://github.com/meshtastic/Meshtastic-esp32/blob/master/README.md). Instructions for installing prebuilt firmware can be found [here](https://github.com/meshtastic/Meshtastic-esp32/blob/master/README.md).
For a nice TTGO 3D printable case see this [design](https://www.thingiverse.com/thing:3773717) by [bsiege](https://www.thingiverse.com/bsiege). For a nice printable cases:
For a nice Heltec 3D printable case see this [design](https://www.thingiverse.com/thing:3125854) by [ornotermes](https://www.thingiverse.com/ornotermes).
# Disclaimers 1. TTGO T-Beam V0 see this [design](https://www.thingiverse.com/thing:3773717) by [bsiege](https://www.thingiverse.com/bsiege).
2. TTGO T_Beam V1 see this [design](https://www.thingiverse.com/thing:3830711) by [rwanrooy](https://www.thingiverse.com/rwanrooy) or this [remix](https://www.thingiverse.com/thing:3949330) by [8ung](https://www.thingiverse.com/8ung)
3. Heltec Lora32 see this [design](https://www.thingiverse.com/thing:3125854) by [ornotermes](https://www.thingiverse.com/ornotermes).
This project is still pretty young but moving at a pretty good pace. Not all features are fully implemented in the current alpha builds. # IMPORTANT DISCLAIMERS AND FAQ
Most of these problems should be solved by the beta release:
* We don't make these devices and they haven't been tested by UL or the FCC. If you use them you are experimenting and we can't promise they won't burn your house down ;-) For a listing of currently missing features and a FAQ click [here](faq.md).
* Encryption is turned off for now
* A number of (straightforward) software work items have to be completed before battery life matches our measurements, currently battery life is about three days. Join us on chat if you want the spreadsheet of power measurements/calculations.
* The current Android GUI is pretty ugly still
* The Android API needs to be documented better
* The Bluetooth API needs to be documented better
* The mesh protocol is turned off for now, currently we only send packets one hop distant
* No one has written an iOS app yet ;-)
For more details see the [device software TODO](https://github.com/meshtastic/Meshtastic-esp32/blob/master/TODO.md) or the [Android app TODO](https://github.com/meshtastic/Meshtastic-Android/blob/master/TODO.md).

36
docs/faq.md Normal file
View File

@@ -0,0 +1,36 @@
# Disclaimers
This project is still pretty young but moving at a pretty good pace. Not all features are fully implemented in the current alpha builds.
Most of these problems should be solved by the beta release (within three months):
* We don't make these devices and they haven't been tested by UL or the FCC. If you use them you are experimenting and we can't promise they won't burn your house down ;-)
* Encryption is turned off for now
* A number of (straightforward) software work items have to be completed before battery life matches our measurements, currently battery life is about three days. Join us on chat if you want the spreadsheet of power measurements/calculations.
* The current Android GUI is slightly ugly still
* The Android API needs to be documented better
* The mesh protocol is turned off for now, currently we only send packets one hop distant. The mesh feature will be turned on again [soonish](https://github.com/meshtastic/Meshtastic-esp32/issues/3).
* No one has written an iOS app yet. But some good souls [are talking about it](https://github.com/meshtastic/Meshtastic-esp32/issues/14) ;-)
For more details see the [device software TODO](https://github.com/meshtastic/Meshtastic-esp32/blob/master/docs/software/TODO.md) or the [Android app TODO](https://github.com/meshtastic/Meshtastic-Android/blob/master/TODO.md).
# FAQ
If you have a question missing from this faq, please ask on our gitter chat. And if you are feeling extra generous send in a pull-request for this faq.md with whatever we answered ;-).
## Q: Which of the various supported radios should I buy?
Basically you just need the radio + (optional but recommended) battery. The TBEAM is usually better because it has gps and huge battery socket. The Heltec is basically the same hardware but without the GPS (the phone provides position data to the radio in that case, so the behavior is similar - but it does burn some battery in the phone). Also the battery for the Heltec can be smaller.
In addition to Aliexpress, (banggood.com) usually has stock and faster shipping, or Amazon. If buying a TBEAM, make sure to buy a version that includes the OLED screen - this project doesn't absolutely require the screen, but we use it if is installed.
@claesg has added links to various 3D printable cases, you can see them at (www.meshtastic.org).
## Q: Do you have plans to commercialize this project
Nope. though if some other person/group wanted to use this software and a more customized device we think that would be awesome (as long as they obey the GPL license).
## Q: Does this project use patented algorithms?
(Kindly borrowed from the geeks at [ffmpeg](http://ffmpeg.org/legal.html))
We do not know, we are not lawyers so we are not qualified to answer this. Also we have never read patents to implement any part of this, so even if we were qualified we could not answer it as we do not know what is patented. Furthermore the sheer number of software patents makes it impossible to read them all so no one (lawyer or not) could answer such a question with a definite no. We are merely geeks experimenting on a fun and free project.

View File

@@ -10,6 +10,13 @@ See [this site](https://www.rfwireless-world.com/Tutorials/LoRa-channels-list.ht
The maximum power allowed is +14dBM. The maximum power allowed is +14dBM.
### 433 MHz
There are eight channels defined with a 0.2 MHz gap between them.
Channel zero starts at 433.175 MHz
### 870 MHz
There are eight channels defined with a 0.3 MHz gap between them. There are eight channels defined with a 0.3 MHz gap between them.
Channel zero starts at 865.20 MHz Channel zero starts at 865.20 MHz

View File

@@ -10,6 +10,7 @@ TODO:
* DONE read about mesh routing solutions (DSR and AODV) * DONE read about mesh routing solutions (DSR and AODV)
* DONE read about general mesh flooding solutions (naive, MPR, geo assisted) * DONE read about general mesh flooding solutions (naive, MPR, geo assisted)
* DONE reread the disaster radio protocol docs - seems based on Babel (which is AODVish) * DONE reread the disaster radio protocol docs - seems based on Babel (which is AODVish)
* possibly dash7? https://www.slideshare.net/MaartenWeyn1/dash7-alliance-protocol-technical-presentation https://github.com/MOSAIC-LoPoW/dash7-ap-open-source-stack
* update duty cycle spreadsheet for our typical usecase * update duty cycle spreadsheet for our typical usecase
* generalize naive flooding on top of radiohead or disaster.radio? (and fix radiohead to use my new driver) * generalize naive flooding on top of radiohead or disaster.radio? (and fix radiohead to use my new driver)

2
proto

Submodule proto updated: f309ee8f9e...66e926740a

View File

@@ -5,5 +5,5 @@ release. It is used by the android app for forcing software updates. Do not ed
Generated by bin/buildall.sh --> Generated by bin/buildall.sh -->
<resources> <resources>
<string name="cur_firmware_version">0.1.0</string> <string name="cur_firmware_version">0.1.3</string>
</resources> </resources>

View File

@@ -13,17 +13,22 @@
#define CH_SPACING_US 2.16f // MHz #define CH_SPACING_US 2.16f // MHz
#define NUM_CHANNELS_US 13 #define NUM_CHANNELS_US 13
// EU channel settings // EU433 channel settings
#define CH0_EU 865.2f // MHz #define CH0_EU433 433.175f // MHz
#define CH_SPACING_EU 0.3f // MHz #define CH_SPACING_EU433 0.2f // MHz
#define NUM_CHANNELS_EU 10 #define NUM_CHANNELS_EU433 8
// EU865 channel settings
#define CH0_EU865 865.2f // MHz
#define CH_SPACING_EU865 0.3f // MHz
#define NUM_CHANNELS_EU865 10
// CN channel settings // CN channel settings
#define CH0_CN 470.0f // MHz #define CH0_CN 470.0f // MHz
#define CH_SPACING_CN 2.0f // MHz FIXME, this is just a guess for 470-510 #define CH_SPACING_CN 2.0f // MHz FIXME, this is just a guess for 470-510
#define NUM_CHANNELS_CN 20 #define NUM_CHANNELS_CN 20
// CN channel settings // JP channel settings
#define CH0_JP 920.0f // MHz #define CH0_JP 920.0f // MHz
#define CH_SPACING_JP 0.5f // MHz FIXME, this is just a guess for 920-925 #define CH_SPACING_JP 0.5f // MHz FIXME, this is just a guess for 920-925
#define NUM_CHANNELS_JP 10 #define NUM_CHANNELS_JP 10
@@ -33,10 +38,14 @@
#define CH0 CH0_US #define CH0 CH0_US
#define CH_SPACING CH_SPACING_US #define CH_SPACING CH_SPACING_US
#define NUM_CHANNELS NUM_CHANNELS_US #define NUM_CHANNELS NUM_CHANNELS_US
#elif defined(HW_VERSION_EU) #elif defined(HW_VERSION_EU433)
#define CH0 CH0_EU #define CH0 CH0_EU433
#define CH_SPACING CH_SPACING_EU #define CH_SPACING CH_SPACING_EU433
#define NUM_CHANNELS NUM_CHANNELS_EU #define NUM_CHANNELS NUM_CHANNELS_EU433
#elif defined(HW_VERSION_EU865)
#define CH0 CH0_EU865
#define CH_SPACING CH_SPACING_EU865
#define NUM_CHANNELS NUM_CHANNELS_EU865
#elif defined(HW_VERSION_CN) #elif defined(HW_VERSION_CN)
#define CH0 CH0_CN #define CH0 CH0_CN
#define CH_SPACING CH_SPACING_CN #define CH_SPACING CH_SPACING_CN

View File

@@ -19,7 +19,7 @@
#ifdef T_BEAM_V10 #ifdef T_BEAM_V10
#include "axp20x.h" #include "axp20x.h"
extern AXP20X_Class axp; extern AXP20X_Class axp;
#endif #endif
// deep sleep support // deep sleep support
RTC_DATA_ATTR int bootCount = 0; RTC_DATA_ATTR int bootCount = 0;
@@ -28,8 +28,6 @@ esp_sleep_source_t wakeCause; // the reason we booted this time
#define xstr(s) str(s) #define xstr(s) str(s)
#define str(s) #s #define str(s) #s
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Application // Application
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@@ -63,7 +61,7 @@ void setLed(bool ledOn)
void setGPSPower(bool on) void setGPSPower(bool on)
{ {
DEBUG_MSG("Setting GPS power=%d\n", on); DEBUG_MSG("Setting GPS power=%d\n", on);
#ifdef T_BEAM_V10 #ifdef T_BEAM_V10
if (axp192_found) if (axp192_found)
@@ -84,9 +82,24 @@ void initDeepSleep()
wakeButtons = ((uint64_t)1) << buttons.gpios[0]; wakeButtons = ((uint64_t)1) << buttons.gpios[0];
*/ */
DEBUG_MSG("booted, wake cause %d (boot count %d)\n", wakeCause, bootCount); // If we booted because our timer ran out or the user pressed reset, send those as fake events
} const char *reason = "reset"; // our best guess
RESET_REASON hwReason = rtc_get_reset_reason(0);
if (hwReason == RTCWDT_BROWN_OUT_RESET)
reason = "brownout";
if (hwReason == TG0WDT_SYS_RESET)
reason = "taskWatchdog";
if (hwReason == TG1WDT_SYS_RESET)
reason = "intWatchdog";
if (wakeCause == ESP_SLEEP_WAKEUP_TIMER)
reason = "timeout";
DEBUG_MSG("booted, wake cause %d (boot count %d), reset_reason=%s\n", wakeCause, bootCount, reason);
}
void doDeepSleep(uint64_t msecToWake) void doDeepSleep(uint64_t msecToWake)
{ {
@@ -175,9 +188,6 @@ void doDeepSleep(uint64_t msecToWake)
esp_deep_sleep_start(); // TBD mA sleep current (battery) esp_deep_sleep_start(); // TBD mA sleep current (battery)
} }
/** /**
* enter light sleep (preserves ram but stops everything about CPU). * enter light sleep (preserves ram but stops everything about CPU).
* *
@@ -188,7 +198,7 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r
//DEBUG_MSG("Enter light sleep\n"); //DEBUG_MSG("Enter light sleep\n");
uint64_t sleepUsec = sleepMsec * 1000LL; uint64_t sleepUsec = sleepMsec * 1000LL;
Serial.flush(); // send all our characters before we stop cpu clock Serial.flush(); // send all our characters before we stop cpu clock
setBluetoothEnable(false); // has to be off before calling light sleep setBluetoothEnable(false); // has to be off before calling light sleep
// NOTE! ESP docs say we must disable bluetooth and wifi before light sleep // NOTE! ESP docs say we must disable bluetooth and wifi before light sleep