wasp-os / wasp-os

A MicroPython based development environment for smart watches (including Pine64 PineTime)
https://wasp-os.readthedocs.io/
GNU General Public License v3.0
828 stars 224 forks source link

[Bug] wasptool doesn't find PineTime #514

Open Tuxilio opened 2 hours ago

Tuxilio commented 2 hours ago

(discussion started in Matrix chat)

I just installed wasp-os 0.4 and followed the guide about writing a first app. When I try to upload it using wasptool (tried with 0.4 and master branch), the message comes:

tuxilio@ice-pad > ~/Programme/PineTime/wasp-os > master >> tools/wasptool \
        --exec docs/hello.py \
        --eval "wasp.system.register(HelloApp())"
ERROR: Cannot find suitable wasp-os device
~~~
Scanning...
~~~
tuxilio@ice-pad > ~/Programme/PineTime/wasp-os > master > sudo hcitool lescan
LE Scan ...
D0:03:DF:91:3C:4F (unknown)
CB:08:1E:3E:2B:59 PineTime
CB:08:1E:3E:2B:59 (unknown)
01:35:5D:C0:7D:15 (unknown)
77:7B:20:D0:C8:4E (unknown)
9C:3E:53:0F:68:87 (unknown)
9C:3E:53:0F:68:87 (unknown)
^C
tuxilio@ice-pad > ~/Programme/PineTime/wasp-os > master > tools/wasptool --device CB:08:1E:3E:2B:59 --console
Traceback (most recent call last):
  File "/home/tuxilio/Programme/PineTime/wasp-os/tools/wasptool", line 447, in <module>
    console.expect(r'Connect.*\(([0-9A-F:]*)\)')
  File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 354, in expect
    return self.expect_list(compiled_pattern_list,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 383, in expect_list
    return exp.expect_loop(timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 179, in expect_loop
    return self.eof(e)
           ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 122, in eof
    raise exc
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
<pexpect.pty_spawn.spawn object at 0x7fc87a7affb0>
command: tools/pynus/pynus.py
args: [b'tools/pynus/pynus.py', b'--address', b'CB:08:1E:3E:2B:59']
buffer (last 100 chars): ''
before (last 100 chars): 'ecurity policy blocked the reply, the reply timeout expired, or the network connection was broken.\r\n'
after: <class 'pexpect.exceptions.EOF'>
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 4501
child_fd: 5
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: <_io.StringIO object at 0x7fc87a9cda80>
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
    0: re.compile('Connect.*\\(([0-9A-F:]*)\\)')
tuxilio@ice-pad > ~/Programme/PineTime/wasp-os > master > tools/wasptool --device "CB:08:1E:3E:2B:59" --console
ERROR: Cannot find suitable wasp-os device
~~~
Scanning...
~~~

So I installes master branch micropython.zip, but that doesn't help:

tuxilio@ice-pad > ~/Programme/PineTime/wasp-os > master ± > tools/wasptool --device CB:08:1E:3E:2B:59 --console        
Traceback (most recent call last):
  File "/home/tuxilio/Programme/PineTime/wasp-os/tools/wasptool", line 447, in <module>
    console.expect(r'Connect.*\(([0-9A-F:]*)\)')
  File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 354, in expect
    return self.expect_list(compiled_pattern_list,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 383, in expect_list
    return exp.expect_loop(timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 179, in expect_loop
    return self.eof(e)
           ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 122, in eof
    raise exc
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
<pexpect.pty_spawn.spawn object at 0x7f8a353506b0>
command: tools/pynus/pynus.py
args: [b'tools/pynus/pynus.py', b'--address', b'CB:08:1E:3E:2B:59']
buffer (last 100 chars): ''
before (last 100 chars): 'ecurity policy blocked the reply, the reply timeout expired, or the network connection was broken.\r\n'
after: <class 'pexpect.exceptions.EOF'>
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 7854
child_fd: 5
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: <_io.StringIO object at 0x7f8a353b1a80>
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
    0: re.compile('Connect.*\\(([0-9A-F:]*)\\)')

I'm on Debian Unstable.

any ideas?

GaryM0101 commented 2 hours ago

Not a wasp-os issue, you need to bind the pinetime mac address with Debian BLE services using bluetoothctl or other.

fgaz commented 12 minutes ago

Is bluez installed? What's the full output of tools/pynus/pynus.py --address CB:08:1E:3E:2B:59?