LionelDarras / PySimpleBGC

PySimpleBGC is a python project which aims to allow communication with Basecam Simple-BGC coontroller board
GNU General Public License v3.0
7 stars 8 forks source link

CMD_BOARD_INFO throws BadCmdException #2

Closed maiermic closed 5 years ago

maiermic commented 5 years ago

I have a Ikan Beholder DS2-A gimbal with a SimpleBGC 32-bit board version 3.1 and firmware 2.63 b0. I tried the example using PySimpleBGC 0.1:

$ python3
Python 3.5.2 (default, Nov 12 2018, 13:43:14) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pysimplebgc import SimpleBGC32
>>> device = SimpleBGC32.from_url('serial:/dev/ttyUSB0:38400:8N1')
>>> device.getcmdlist()
['CMD_BOARD_INFO_3', 'CMD_REALTIME_DATA_4', 'CMD_BOARD_INFO', 'CMD_REALTIME_DATA_3']
>>> device.setcmd('CMD_BOARD_INFO',"")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/maiermic/.local/lib/python3.5/site-packages/pysimplebgc/device.py", line 181, in setcmd
    unpack_data = self._unpack_response(cmdid, respdata)
  File "/home/maiermic/.local/lib/python3.5/site-packages/pysimplebgc/device.py", line 319, in _unpack_response
    raise BadCmdException()            
pysimplebgc.device.BadCmdException
maiermic commented 5 years ago

It worked using device = SimpleBGC32.from_url('serial:/dev/ttyUSB0:115200:8N1')