Virtual_device bled112 reference_1_0 does not cleanly exit
- Dominant language
- Python
- Stars
- 14
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
This occurs whether or not the bluetooth dongle is removed prior to exiting the virtual device.
Method used to exit the virtual device was pressing `ctrl+c`
```
$ virtual_device bled112 reference_1_0
Starting to serve virtual IOTile device
^CBreak received, cleanly exiting...
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/tfroehlich/proj/archrepos/coretools/transport_plugins/bled112/iotile_transport_bled112/async_packet.py", line 49, in read_packet
return self.queue.get(timeout=timeout)
File "/usr/lib/python3.5/queue.py", line 172, in get
raise Empty
queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/home/tfroehlich/proj/archrepos/coretools/transport_plugins/bled112/iotile_transport_bled112/bled112_cmd_co.py", line 56, in run
res = getattr(self, cmd)(*args)
File "/home/tfroehlich/proj/archrepos/coretools/transport_plugins/bled112/iotile_transport_bled112/bled112_cmd_co.py", line 543, in _set_mode
response = self._send_command(6, 1, payload)
File "/home/tfroehlich/proj/archrepos/coretools/transport_plugins/bled112/iotile_transport_bled112/bled112_cmd_co.py", line 700, in _send_command
response = self._receive_packet(timeout)
File "/home/tfroehlich/proj/archrepos/coretools/transport_plugins/bled112/iotile_transport_bled112/bled112_cmd_co.py", line 710, in _receive_packet
response_data = self._stream.read_packet(timeout=timeout)
File "/home/tfroehlich/proj/archrepos/coretools/transport_plugins/bled112/iotile_transport_bled112/async_packet.py", line 51, in read_packet
raise InternalTimeoutError("Timeout waiting for packet in AsyncPacketBuffer")
iotile_transport_bled112.async_packet.InternalTimeoutError: Timeout waiting for packet in AsyncPacketBuffer
```
Pip Freeze:
```$ pip freeze
decorator==4.4.0
entrypoints==0.3
iotile-core==5.0.2
iotile-emulate==0.5.0
iotile-sensorgraph==1.0.7
iotile-test==2.0.0
-e git+git@github.com:iotile/coretools.git@674b20b6ab8e7b01576c4c9b328cdafa62dec8c8#egg=iotile_transport_bled112&subdirectory=transport_plugins/bled112
msgpack==0.6.1
pyparsing==2.2.2
pyserial==3.4
python-dateutil==2.8.0
six==1.12.0
sortedcontainers==2.1.0
toposort==1.5
typedargs==1.0.1
```
Coretools's checkout is current, `git merge master` reports "Up to date".
Multiple `ctrl+c`'s are required to exit, which add more errors.
Contributor guide
Assessment
This issue has not been assessed yet.