Commit Graph

136 Commits

Author SHA1 Message Date
Nils Werner
d04fe653d4 Regenerate protobuf docstrings 2020-10-02 13:53:49 +02:00
geeksville
413868bdd9 update protobufs for gps mode setting 2020-09-30 08:12:54 -07:00
geeksville
c258d9f4f4 Change doc mentions of StreamInterface into SerialInterface 2020-09-27 20:02:26 -07:00
geeksville
25eea6c5b9 1.0.14 fix #23 I busted setstr, thanks @mc-hamster for the headup 2020-09-27 10:46:46 -07:00
geeksville
cca38a04ee 1.0.13 2020-09-25 16:50:24 -07:00
geeksville
13be218620 use inheritence on tcp streams 2020-09-25 16:04:42 -07:00
geeksville
db9d917342 fix default behavior of debug output 2020-09-25 15:22:34 -07:00
geeksville
466da0c13d user lowercase version of the pyqrcode name - recommended 2020-09-25 15:22:07 -07:00
geeksville
46f876c13e Merge branch 'master' into dev 2020-09-25 15:06:14 -07:00
geeksville
61802aeaac Place under apache license 2020-09-22 12:11:51 -07:00
Kevin Hester
a5cc4835a7 Merge pull request #22 from timgunter/add_set_url
Added "seturl" option to main app
2020-09-21 14:51:59 -07:00
Tim Gunter
705c9e9e9e Added "seturl" option to main app 2020-09-20 11:06:41 +01:00
geeksville
d789bff9cb WIP - adding TCP client, still need to use recv/send instead of read/write 2020-09-19 12:53:19 -07:00
geeksville
e4a424ccee support new --set factory_reset true preferences option 2020-09-19 11:19:03 -07:00
geeksville
dd45429576 fix #20 - allow setting binary arrays (i.e. psk) with strings of hex digits 2020-09-18 10:05:49 -07:00
geeksville
edc366c2a5 improve docs 2020-09-17 16:24:27 -07:00
geeksville
3d9b9bc627 1.0.10 2020-09-16 10:06:03 -07:00
geeksville
653c31e1dc #18 only control RTS on OS-X 2020-09-16 10:04:56 -07:00
Kevin Hester
9642dd0817 Merge pull request #17 from timgunter/patch-1
Possible typo?
2020-09-16 09:54:00 -07:00
geeksville
3e0cc15b37 1.0.9 fix RTS handling 2020-09-16 09:40:48 -07:00
geeksville
8c86a49b63 fix #18 reset button was disabled
ooh this one was super interesting.  I was able to repro from your great description.  The problem was that leaving rts low was disabling the reset button on the board.  So I think the only fix needed was to raise rts high before we close the port.

Meshtastic-python$ bin/run.sh --setstr wifi_ssid "asdf" --debug
rm: cannot remove 'log_*': No such file or directory
DEBUG:root:Connecting to /dev/ttyUSB0
DEBUG:root:Sending: want_config_id: 42

Trigger powerFSM 9
DEBUG:root:Received: {'myInfo': {'myNodeNum': 2883444536, 'hasGps': True, 'numChannels': 13, 'region': 'unset', 'hwModel': 'tbeam', 'firmwareVersion': 'unset', 'packetIdBits': 32, 'currentPacketId': 380285744, 'nodeNumBits': 32, 'messageTimeoutMsec': 300000, 'minAppVersion': 172}}
DEBUG:root:Received: {'radio': {'preferences': {'positionBroadcastSecs': 900, 'sendOwnerInterval': 4, 'waitBluetoothSecs': 120, 'screenOnSecs': 300, 'phoneTimeoutSecs': 900, 'phoneSdsTimeoutSec': 7200, 'meshSdsTimeoutSecs': 7200, 'sdsSecs': 31536000, 'lsSecs': 3601, 'wifiSsid': 'asdf'}, 'channelSettings': {'modemConfig': 'Bw125Cr48Sf4096', 'psk': '1PG7OiApB1nwvP+rz05pvw==', 'name': 'Default'}}}
DEBUG:root:Received: {'nodeInfo': {'num': 2883444536, 'user': {'id': '!2462abdddf38', 'longName': 'Bob b', 'shortName': 'Bb', 'macaddr': 'JGKr3d84'}, 'position': {'batteryLevel': 100, 'time': 315965514}}}
DEBUG:root:Received: {'nodeInfo': {'num': 682754228, 'user': {'id': '!246f28b200b4', 'longName': 'Bob b', 'shortName': 'Bb', 'macaddr': 'JG8osgC0'}, 'position': {'batteryLevel': 79, 'time': 316593914}, 'snr': 9.5}}
DEBUG:root:Received: {'nodeInfo': {'num': 2441803616, 'user': {'id': '!5002918af760', 'longName': 'ryan', 'shortName': 'r', 'macaddr': 'UAKRivdg'}, 'position': {'batteryLevel': 61, 'time': 316497304}, 'snr': 10.0}}
DEBUG:root:Received: {'nodeInfo': {'num': 862631397, 'user': {'id': '!c44f336ab5e5', 'longName': 'Unknown b5e5', 'shortName': '?E5', 'macaddr': 'xE8zarXl'}, 'position': {'time': 1597965319}, 'snr': 13.25}}
DEBUG:root:Received: {'nodeInfo': {'num': 2441803548, 'user': {'id': '!5002918af71c', 'longName': 'Unknown f71c', 'shortName': '?1C', 'macaddr': 'UAKRivcc'}, 'position': {'batteryLevel': 47, 'time': 316494981}, 'snr': 9.5}}
DEBUG:root:Received: {'nodeInfo': {'num': 82599254, 'user': {'id': '!fd1004ec5d56', 'longName': 'Unknown 5d56', 'shortName': '?56', 'macaddr': '/RAE7F1W'}, 'position': {}, 'snr': 9.25}}
DEBUG:root:Received: {'nodeInfo': {'num': 2885173400, 'user': {'id': '!2462abf84098', 'longName': 'Unknown 4098', 'shortName': '?98', 'macaddr': 'JGKr+ECY'}, 'position': {'batteryLevel': 4, 'time': 315966200}, 'snr': 10.75}}
DEBUG:root:Received: {'configCompleteId': 42}
Connected to radio
Setting preference wifi_ssid to asdf
Writing modified preferences to device
DEBUG:root:Sending: set_radio {
  preferences {
    position_broadcast_secs: 900
    send_owner_interval: 4
    wait_bluetooth_secs: 120
    screen_on_secs: 300
    phone_timeout_secs: 900
    phone_sds_timeout_sec: 7200
    mesh_sds_timeout_secs: 7200
    sds_secs: 31536000
    ls_secs: 3601
    wifi_ssid: "asdf"
  }
  channel_settings {
    modem_config: Bw125Cr48Sf4096
    psk: "\324\361\273: )\007Y\360\274\377\253\317Ni\277"
    name: "Default"
  }
}

DEBUG:root:Closing serial stream
DEBUG:root:reader is exiting
2020-09-16 09:39:45 -07:00
Tim Gunter
4bfa50e3c1 Possible typo?
Should these "self.rfBuf"s be "self._rxBuf"s?
2020-09-16 09:34:02 -07:00
Kevin Hester
864cd4773c Merge pull request #16 from paulvivier/patch-1
Requires was failing
2020-09-16 08:59:14 -07:00
Paul Vivier
a8a747070a Requires was failing 2020-09-15 23:26:19 -04:00
geeksville
30930c006c 1.0.8 oops I busted setup, thanks @mc-hamster 2020-09-15 19:59:56 -07:00
geeksville
73cae01c32 add --qr to show qr code 2020-09-15 17:51:15 -07:00
geeksville
1214482ccf 1.0.6 add a channelURL property
Example usage:
```
meshtastic --setchan tx_power 100 --info
Trigger powerFSM 9
Connected to radio
Setting channel parameter tx_power to 100
Writing modified preferences to device
my_node_num: 2883444536
has_gps: true
num_channels: 13
region: "1.0-US"
hw_model: "tbeam"
firmware_version: "1.0.0"
packet_id_bits: 32
current_packet_id: 816090843
node_num_bits: 32
message_timeout_msec: 300000
min_app_version: 172

preferences {
  position_broadcast_secs: 900
  send_owner_interval: 4
  wait_bluetooth_secs: 120
  screen_on_secs: 300
  phone_timeout_secs: 900
  phone_sds_timeout_sec: 7200
  mesh_sds_timeout_secs: 7200
  sds_secs: 31536000
  ls_secs: 3601
}
channel_settings {
  tx_power: 100
  modem_config: Bw125Cr48Sf4096
  psk: "\324\361\273: )\007Y\360\274\377\253\317Ni\277"
  name: "Default"
}

Channel URL https://www.meshtastic.org/c/#CGQYAyIQ1PG7OiApB1nwvP-rz05pvyoHRGVmYXVsdA==
Nodes in mesh:
{'num': 2883444536, 'user': {'id': '!2462abdddf38', 'longName': 'Bob b', 'shortName': 'Bb', 'macaddr': 'JGKr3d84'}, 'position': {'batteryLevel': 100, 'time': 315969731}}
{'num': 682754228, 'user': {'id': '!246f28b200b4', 'longName': 'Bob b', 'shortName': 'Bb', 'macaddr': 'JG8osgC0'}, 'position': {'batteryLevel': 79, 'time': 316593914}, 'snr': 9.5}
{'num': 2441803616, 'user': {'id': '!5002918af760', 'longName': 'ryan', 'shortName': 'r', 'macaddr': 'UAKRivdg'}, 'position': {'batteryLevel': 61, 'time': 316497304}, 'snr': 10.0}
{'num': 862631397, 'user': {'id': '!c44f336ab5e5', 'longName': 'Unknown b5e5', 'shortName': '?E5', 'macaddr': 'xE8zarXl'}, 'position': {'time': 1597965319}, 'snr': 13.25}
{'num': 2441803548, 'user': {'id': '!5002918af71c', 'longName': 'Unknown f71c', 'shortName': '?1C', 'macaddr': 'UAKRivcc'}, 'position': {'batteryLevel': 47, 'time': 316494981}, 'snr': 9.5}
{'num': 82599254, 'user': {'id': '!fd1004ec5d56', 'longName': 'Unknown 5d56', 'shortName': '?56', 'macaddr': '/RAE7F1W'}, 'position': {}, 'snr': 9.25}
{'num': 2885173400, 'user': {'id': '!2462abf84098', 'longName': 'Unknown 4098', 'shortName': '?98', 'macaddr': 'JGKr+ECY'}, 'position': {'batteryLevel': 4, 'time': 315966200}, 'snr': 10.75}
```
2020-09-15 17:32:09 -07:00
geeksville
6f942c282d add a --setchan option for setting channel parameters 2020-09-15 17:11:23 -07:00
geeksville
fec58a1b6c doc updates 2020-09-15 09:29:41 -07:00
geeksville
be8c654eea 1.0.5 fix #14, let users set bool,float or string params.
Example usage:

Or to configure an ESP32 based board to join a wifi network as a station (wifi support in the device code is coming soon):

```
meshtastic --set wifi_ap_mode false --setstr wifi_ssid mywifissid --setstr wifi_password mywifipsw
```

Or to configure an ESP32 to run as a Wifi access point:

```
meshtastic --set wifi_ap_mode true --setstr wifi_ssid mywifissid --setstr wifi_password mywifipsw
```
2020-09-15 09:28:54 -07:00
geeksville
8c51b9bbe5 Merge branch 'master' of https://github.com/meshtastic/Meshtastic-python 2020-09-12 12:31:14 -07:00
geeksville
e485af752b OS-X was rebooting devices on connect, force RTS false
(RTS is connected to ESP32 reset).  Thanks to @mc-hamster for this fix!
2020-09-12 12:31:05 -07:00
geeksville
23f4a50f91 OS-X was rebooting devices on connect, force RTS false
(RTS is connected to ESP32 reset).  Thanks to @mc-hamster for this fix!
2020-09-12 12:30:19 -07:00
geeksville
33b31d0fb2 1.0.3 2020-09-11 13:06:21 -07:00
geeksville
cc01bc8f72 generate a clear error message if someone sends before we have nodedb 2020-09-11 12:35:43 -07:00
geeksville
2896073982 fix example code 2020-09-11 12:08:06 -07:00
geeksville
6942677b85 1.0.2 update example and handle serial disconnection gracefully 2020-09-11 11:08:16 -07:00
geeksville
a4d40a209e update todo 2020-09-08 10:35:12 -07:00
geeksville
1f4af574e6 1.0.1 2020-09-08 10:01:08 -07:00
geeksville
cb6f7097c2 fix #12 "meshtastic --sendtext fish --dest '!2462abf84098'" now works 2020-09-08 09:58:23 -07:00
Kevin Hester
b6219e003c Merge pull request #9 from mc-hamster/master
Update __main__.py ... Add a new option to auto-reply to messages
2020-09-02 14:42:45 -07:00
Jm Casler
69eac1a6d0 Update __main__.py 2020-08-31 21:10:34 -07:00
geeksville
331b83a95d fix #8 - set packet IDs 2020-08-18 15:25:43 -07:00
geeksville
848b52a437 0.9.2 2020-08-11 18:19:54 -07:00
geeksville
0c9c8bca57 Fix #7: Properly decode OPAQUE binary packets...
and add binary sending to the integration tests
2020-08-11 18:16:57 -07:00
geeksville
9da57e2d12 0.9.1 make it possible to see seriallog while sending text commands
for https://github.com/meshtastic/Meshtastic-python/issues/5
2020-08-02 13:20:17 -07:00
geeksville
2800366319 update to latest protos 2020-07-05 22:10:02 -07:00
geeksville
32f3c504d9 0.7.9 add sendPosition(lat, lng, alt) method also...
Use this method for the --settime command line flag - which sets the device
time to be the same as the local computers time (in UTC)

    def sendPosition(self, latitude=0.0, longitude=0.0, altitude=0, timeSec=0, destinationId=BROADCAST_ADDR, wantAck=False, wantResponse=False):
        """
        Send a position packet to some other node (normally a broadcast)

        Also, the device software will notice this packet and use it to automatically set its notion of
        the local position.

        If timeSec is not specified (recommended), we will use the local machine time.
        """
2020-07-05 12:01:35 -07:00
geeksville
d161468bdb update todo 2020-06-30 13:42:53 -07:00
geeksville
67ae7aca3f 0.7.8 add pygatt dependency, fix bug noticed by @slavino in #3 2020-06-28 11:48:49 -07:00