Merge pull request #111 from mkinney/add_content_to_docs

add more info to docs
This commit is contained in:
Jm Casler 2021-11-22 19:27:36 -08:00 committed by GitHub
commit 9eed6d3daf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 80 additions and 12 deletions

View file

@ -34,24 +34,24 @@ Q: How can I contribute to Meshtastic?
## Device (aka Node)
Q: Where do I purchase the device hardware?
* Answer TBD
* Each [supported device](https://meshtastic.org/docs/hardware/tbeam-hardware) has a "Purchase Link".
Q: I have my hardware. How do I install the firmware and any required drivers?
* See: https://meshtastic.org/docs/getting-started/flashing-esp32
Q: How do I update the firmware to the latest version?
* Answer TBD
* If the device is running Meshtastic firmware, you might be able to update over-the-air like via the Android app.
Q: My device has gone to sleep. Are received messages lost?
* The LORA radio on the node is still active and will wake up the CPU when the device is sleeping. If your phone is in range, the node will relay any messages your phone may have missed. If you're in range and your device is active, messages have not been lost.
* The LoRa radio on the node is still active and will wake up the CPU when the device is sleeping. If your phone is in range, the node will relay any messages your phone may have missed. If you're in range and your device is active, messages have not been lost.
Q: My device has gone to sleep and I can't send any messages.
* Once the node wakes up from sleep, your phone will relay any delayed messages through your node and to the mesh network. Give it a few minutes and it'll do the right thing.
Q: How do I turn off an esp32 tbeam based device?
Q: How do I turn off an esp32 t-beam based device?
* Hold down the middle button for about 10 seconds.
Q: How do I turn on an esp32 tbeam based device?
Q: How do I turn on an esp32 t-beam based device?
* Push the power button for about 1 second.
Q: How can I tell the device not to sleep?
@ -88,15 +88,21 @@ Q: How can I clear the message history?
## iOS
Q: What version of iOS does the Meshtastic iOS App Require?
* Answer TBD
* The now-in-beta iOS app requires iOS v15.
Q: How do I get the Meshtastic iOS App?
* Answer TBD
* See [iOS App](https://meshtastic.org/docs/software/ios/ios-development)
## Bluetooth
Q: How do I pair my phone to the device if my device doesn't have a screen?
* Answer TBD
* Answer TBD (perhaps consider using web if esp32)
Q: Can I have Bluetooth enabled and use WiFi radio?
* No. Only one method will work at a time.
Q: How do I disable WiFi so Bluetooth will work?
* Ensure the wifi_ssid and wifi_password values are blank.
## WiFi / Web Browser
@ -107,7 +113,7 @@ Q: When I turn on WiFi, Bluetooth turns off. Why is this?
* Currently WiFi and Bluetooth can be turned on at the same time.
Q: How do I access the network from my web browser?
* Answer TBD
* Visit http://meshtastic.local (Note: This is a work in progress.)
## Channels
@ -128,5 +134,9 @@ Q: What is a Secondary Channel?
## Commmand Line / Python
Q: Question
* Answer TBD
Q: How do I find out more about installing (and using) Meshtastic via command line?
* See https://meshtastic.org/docs/software/python/python-installation
Q: How do I find out more about using python to interact?
* See https://meshtastic.org/docs/software/python/python-usage

View file

@ -51,6 +51,40 @@ There are many ways to connect to your new radio!
- Bluetooth
- Web app over wifi (in development)
## A good first test (connect via USB and CLI)
If you have at least two radios with the Meshtastic firmware, you may consider connecting one via USB and the other simply powered. Communicate with the USB radio using a CLI like [Meshtastic-python](https://meshtastic.org/docs/software/python/python-installation).
- Ensure you can run "meshtastic --info".
- Ensure the region is set appropriately. If the radios are 915 MHz and you are in the US, then no region changes/settings are necessary. If you are in another region, you may need to run something like: "meshtastic --set region EU865".
- Send a message "meshtastic --sendtext hello1"
- The radio connected via USB should show the message almost instantly.
- Other radios may take a few seconds before they show the message. You may need to press one of the buttons on the other radio to see if the message arrived.
- Run "meshtastic --nodes" to see if other nodes show in the display.
- Messages sent from the USB radio should be sent to the other radio(s) via LoRa. The default settings should have this work by default
## A good second test (connect via Bluetooth)
The Android app is currently more robust than the iOS app. But, they both should be able to interact with the radios.
- Install Android or iOS Meshtastic app
- Start Meshtastic app
- Connect to radio(s) from inside the app
- Pair with radio(s). A paring code should show on the radio. Enter that value when prompted to pair a bluetooth device.
- Note: May want to set the bluetooth timeout (ex: "meshtastic --set wait_bluetooth_secs 28800")
- Send message(s) from inside the app.
- Verify that all radios are receiving the messages. Might have to click on the button on the radio to see most recent message.
## A good third test (connect via Wifi/http)
- Configure the *wifi_ssid* and *wifi_password*. "meshtastic --set wifi_ssid 'xxx' --set wifi_password 'yyy'" (where xxx and yyy are the appropriate values for your neetwork)
- Reboot radio by either removing power or pressing the power button.
- Click on the button to cycle thru to the screen with ip address and verify that there was a connection to the wifi access point.
- Send message(s). "meshtastic --host 192.168.1.200 --sendtext hello"
- Verify that all radios are receiving the messages. Might have to click on the button on the radio(s) to see most recent message.
- Open up a brower to http://meshtastic.local to view the web UI (currently under development). You may need to open http://meshtastic.local/static )
- If you want to switch back to bluetooth, you will need to set the *wifi_ssid* and *wifi_password* values to blank values (ex: '').
## Troubleshooting
For any issues during setup, search [our forum](https://meshtastic.discourse.group) to find a solution. If you can't find one, please post your problem, providing as much detail as possible.

View file

@ -12,6 +12,30 @@ interface.sendText("hello mesh") # or sendData to send binary data, see document
interface.close()
```
Another example using Python 3 code to send a message to the mesh when WiFi is enabled:
```python
import time
import meshtastic
from pubsub import pub
def onReceive(packet, interface): # called when a packet arrives
print(f"Received: {packet}")
def onConnection(interface, topic=pub.AUTO_TOPIC): # called when we (re)connect to the radio
# defaults to broadcast, specify a destination ID if you wish
interface.sendText("hello mesh")
pub.subscribe(onReceive, "meshtastic.receive")
pub.subscribe(onConnection, "meshtastic.connection.established")
interface = meshtastic.TCPInterface(hostname='192.168.68.74')
while True:
time.sleep(1000)
interface.close()
```
Note: Be sure to change the ip address in the code above to a valid ip address for your setup.
For the rough notes/implementation plan see [TODO](https://github.com/meshtastic/Meshtastic-python/blob/master/TODO.md). See the API for full details of how to use the library.
## A note to developers of this lib
@ -22,4 +46,4 @@ If you need to build a new release you'll need:
```bash title="Command"
apt install pandoc
sudo pip3 install markdown pandoc webencodings pyparsing twine autopep8
```
```