USB SDK Installation

Hi,
Thank you for the latest SDK - I am attempting to get the Python version working and have encountered a couple of problems.

The first is that when I load the goTenna library, the following error is generated:

Python 3.5.3 (default, Sep 27 2018, 17:25:39) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import goTenna
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/goTenna/__init__.py", line 21, in <module>
    from goTenna import device
  File "/usr/local/lib/python3.5/dist-packages/goTenna/device.py", line 31, in <module>
    import goTenna.message
  File "/usr/local/lib/python3.5/dist-packages/goTenna/message.py", line 13, in <module>
    from goTenna.tlv import message_tlv
  File "/usr/local/lib/python3.5/dist-packages/goTenna/tlv/__init__.py", line 23, in <module>
    from goTenna.tlv import l1l1l11l1l_opy_
  File "/usr/local/lib/python3.5/dist-packages/goTenna/tlv/l1l1l11l1l_opy_.py", line 299
    l1l1l1_opy_ (u"ࠨࡧࡦ࠱ࠦࡥࡧࡪࡣࡃ࠭") \
              ^
SyntaxError: invalid syntax

If I then fix (or think I have fixed the line by adding a comma to the line), I get the following error:

Python 3.5.3 (default, Sep 27 2018, 17:25:39) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import goTenna
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/goTenna/__init__.py", line 25, in <module>
    from goTenna import driver_backend
  File "/usr/local/lib/python3.5/dist-packages/goTenna/driver_backend.py", line 399
    l1l1l1_opy_ (u"ࠨ࡛ࠥࠣࠠࡧࡧࡦࠢࡁࠤࠠࡢࡧࠤࡁࡃࠠࠪੳ")
              ^
SyntaxError: invalid syntax

I can then load the library, although when I run the sample.py file, the following happens:

goTenna>sdk_token ****
goTenna>device_present: devices present: pro MX***** on /dev/ttyACM0
Device physically connected, configure to continue

The device I am using is a goTenna Mesh, not a Pro.

I can then set the region and gid, but when I try to send a broadcast, the following error is generated:

ERROR:goTenna.driver.Driver:Error during device handshake!
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/goTenna/driver_backend.py", line 264, in _11l11lll1_opy_
    self._device_specifics[device_type][l1l1l1_opy_ (u"ࠩࡩࠨ")]()
  File "/usr/local/lib/python3.5/site-packages/goTenna/driver_backend.py", line 243, in _11l1ll111_opy_
    self.device.l1l11l1111_opy_(self._storage.groups.values(), self._settings.rf_settings)
  File "/usr/local/lib/python3.5/site-packages/goTenna/device.py", line 477, in l1l11l1111_opy_
    self.set_operation_mode(goTenna.constants.OperationModes.NORMAL)
  File "/usr/local/lib/python3.5/site-packages/goTenna/device.py", line 412, in set_operation_mode
    res = self._1l1lllll1_opy_(l1ll1111ll_opy_, l1l1ll1ll1_opy_)
  File "/usr/local/lib/python3.5/site-packages/goTenna/device.py", line 448, in _1l1lllll1_opy_
    (now-l1l11l11l_opy_).total_seconds())
  File "/usr/local/lib/python3.5/site-packages/goTenna/pcb_connection.py", line 218, in read_binary_blocking
    for to_return in l1l1l1111_opy_:
  File "/usr/local/lib/python3.5/site-packages/goTenna/pcb_connection.py", line 190, in l1l1l111l_opy_
    l1l111111_opy_()
  File "/usr/local/lib/python3.5/site-packages/goTenna/pcb_connection.py", line 188, in l1l111111_opy_
    (now-l1l11l11l_opy_).seconds)
goTenna.constants.TimeoutException: GoTenna communication timed out after 10s. Command: read_binary

If I remove the two lines which throw the syntax error, the library still loads but when I try to send a broadcast, the script reports “no device connected”.

“can_connect” reports:

PRO - TX Power: Not Set
PRO - Frequencies: Not Set
PRO - Bandwidth: Not Set
MESH - Geo region: OK

I have tried this on Mac OSX 10.13, a Raspberry Pi 3 Model B running Stretch and Virtualbox running Raspberry PI Desktop (a clean install), all with the same problems.

What am I missing or doing wrong…

Thank you in advance.

Pete

1 Like

Not sure how much this helps, but if you’re working with the GTM and not the Pro, this sounds right. There is control over which freq and transmit power independent of any potential regional settings in the Pro. In the goTenna Mesh, freq and output power are set strictly according to the region. To me, your “can_connect” report seems accurate and expected, rather than indicating a fault. That doesn’t explain your lack of results, though.

Same problems, using the same steps and also reported problems with the SDK on GitHub. Instead of a comma I added a “.” on the new lines in the driver, and get the same goTenna.constants.TimeoutException when using the sample application after configuring the Mesh’s region to 1 and GID. Seems like there are some pretty big QA issues if you’re shipping an SDK with broken libraries and aren’t able to communicate with devices at a basic level at the same time I’ve got three out of six mesh units stuck in DFU mode after 1.1.8 firmware upgrades…

Hi,
I have just installed the latest build of the Python SDK, posted today, and can confirm the installation problems are fixed.

But I am still having problems with the sample.py script.

It still reported the goTenna Mesh as a “Pro” device when I connect, although I the script is connecting to the goTenna, as it reports the correct serial number (I have checked with two different devices).

When I run the set_guid device, I now get a different error message:

goTenna>ERROR:goTenna.driver.Driver:SDK not supported, not X-device product pro!

Both devices are running Firmware version 1.1.8.

The full trace is:

ERROR:goTenna.driver.Driver:Error during device handshake!
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/goTenna/driver_backend.py", line 264, in _11l1ll1l1_opy_
    self._device_specifics[device_type][l1l11l_opy_ (u"ࠩࡶࡩࡹࡻࡰࠨ੊")]()
  File "/usr/local/lib/python3.5/dist-packages/goTenna/driver_backend.py", line 243, in _11l1l11ll_opy_
    self.device.l1l11lll1l_opy_(self._storage.groups.values(), self._settings.rf_settings)
  File "/usr/local/lib/python3.5/dist-packages/goTenna/device.py", line 477, in l1l11lll1l_opy_
    self.set_operation_mode(goTenna.constants.OperationModes.NORMAL)
  File "/usr/local/lib/python3.5/dist-packages/goTenna/device.py", line 412, in set_operation_mode
    res = self._1ll111ll1_opy_(l1l11111l1_opy_, l1l111l1l1_opy_)
  File "/usr/local/lib/python3.5/dist-packages/goTenna/device.py", line 448, in _1ll111ll1_opy_
    (now-l11llllll_opy_).total_seconds())
  File "/usr/local/lib/python3.5/dist-packages/goTenna/pcb_connection.py", line 218, in read_binary_blocking
    for to_return in l11ll1l11_opy_:
  File "/usr/local/lib/python3.5/dist-packages/goTenna/pcb_connection.py", line 191, in l11ll1l1l_opy_
    l1l111111_opy_ = self.port.inWaiting()
  File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 572, in inWaiting
    return self.in_waiting
  File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 456, in in_waiting
    s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str)
OSError: [Errno 5] Input/output error
device_present: devices present: pro MX****** on /dev/ttyACM0
Device physically connected, configure to continue
ERROR:goTenna.driver.Driver:SDK not supported, not X-device product pro!
ERROR:goTenna.driver.Driver:Error during device handshake!
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/goTenna/driver_backend.py", line 264, in _11l1ll1l1_opy_
    self._device_specifics[device_type][l1l11l_opy_ (u"ࠩࡶࡩࡹࡻࡰࠨ੊")]()
  File "/usr/local/lib/python3.5/dist-packages/goTenna/driver_backend.py", line 243, in _11l1l11ll_opy_
    self.device.l1l11lll1l_opy_(self._storage.groups.values(), self._settings.rf_settings)
  File "/usr/local/lib/python3.5/dist-packages/goTenna/device.py", line 477, in l1l11lll1l_opy_
    self.set_operation_mode(goTenna.constants.OperationModes.NORMAL)
  File "/usr/local/lib/python3.5/dist-packages/goTenna/device.py", line 412, in set_operation_mode
    res = self._1ll111ll1_opy_(l1l11111l1_opy_, l1l111l1l1_opy_)
  File "/usr/local/lib/python3.5/dist-packages/goTenna/device.py", line 448, in _1ll111ll1_opy_
    (now-l11llllll_opy_).total_seconds())
  File "/usr/local/lib/python3.5/dist-packages/goTenna/pcb_connection.py", line 218, in read_binary_blocking
    for to_return in l11ll1l11_opy_:
  File "/usr/local/lib/python3.5/dist-packages/goTenna/pcb_connection.py", line 191, in l11ll1l1l_opy_
    l1l111111_opy_ = self.port.inWaiting()
  File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 572, in inWaiting
    return self.in_waiting
  File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 456, in in_waiting
    s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str)
OSError: [Errno 5] Input/output error
device_present: devices present: pro MX***** on /dev/ttyACM0
Device physically connected, configure to continue
ERROR:goTenna.driver.Driver:SDK not supported, not X-device product pro!

If I connect to the device /dev/ttyACM0 directly with the screen command, the lights stop flashing and if you type a string of characters the goTenna responds:

[1541316-23259, USB, CLI] ERROR:Unknown command "test". Type ? for help

Thank you in advance.

Pete

2 Likes

+1 - I’m having the exact same issue now that the update has been released.

2 Likes

Hi Pete94,

Please upgrade your mesh unit to firmware version 1.1.12 by following the instructions provided in Mesh Firmware Upgrade to 1.1.12.pdf

4 Likes

Hi Warren,
Thank you for the advice, I have installed 1.1.12 and successfully sent a message through the goTenna from a Raspberry Pi :grinning:

3 Likes

Hi Pete94,

Awesome! please keep us posted on your progress and let me know if you run into any issues.

4 Likes

Hello! My devices are stuck in DFU mode. Can you send a link to the debug application for an update?

Hello! Have you solved the problem with getting out of the DFU?

Are you using an Android or iPhone to do the firmware upgrade?

I tried both iPhone and androyd and could not remove the device from the DFU(

Hello!

Can someone tell me how to get the device out of the DFU through the usb console on raspberry pi?

In my case, no phone sees a bluetooth device, while the GM constantly flashes a LED, which indicates that the device is stuck in the DFU.

Unfortunately, the support offers only a replacement device, which is not suitable for me, because I am far outside the United States.

Yet it is very moodily that the GM team will not make the firmware load option thrught usb.

Hey Pete94! I love all the work you’re doing. I’m new to the scene, but I’d love to learn more. Right now, I’m shooting for a wired communication between the raspberr pi and the goTenna (which it looks like you just did). Could you maybe provide a little more info on how you pulled it off or point me in the right direction? Thanks so much!

  • Chad

Hi Chad,
Thank you for your comments, other commitments have meant that I have not been able to spend as much time experimenting with the SDK (or Mesh Toolkit) as I would have liked this year.

But I have given a write up of what I have done with RaspberryPi’s and Open-WRT so far:

There is also a sample script in my GitHub project:

Hope this helps.

You’re the man! More than enough to help me get started. Thanks for passing it on! Looks like I got some work to do. Have a good one!

  • Chad

Is it possible to get this going on Mac OSX ? - Using python3 I get the same errors as above - I guess mainly as there is no equivalent of spidev on Mac. So how can I get the device to work on Mac using Python ?
The mesh device is at 1.1.12 and works OK on Linux.
It seems to appear as /dev/tty.usbmodemMX183614861 but fails as per above

[warn] [goTenna] Process error: Error during device handshake!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/goTenna/driver_backend.py", line 264, in _11l1ll1l1_opy_
    self._device_specifics[device_type][l1l11l_opy_ (u"ࠩࡶࡩࡹࡻࡰࠨ੊")]()
  File "/usr/local/lib/python3.7/site-packages/goTenna/driver_backend.py", line 245, in _11l1l1111_opy_
    self.device.l1l11lll1l_opy_(self._storage.groups.values(), self._settings.geo_settings)
  File "/usr/local/lib/python3.7/site-packages/goTenna/device.py", line 534, in l1l11lll1l_opy_
    self.echo()
  File "/usr/local/lib/python3.7/site-packages/goTenna/device.py", line 260, in echo
    self._1ll111ll1_opy_(l1l11111l1_opy_, command)
  File "/usr/local/lib/python3.7/site-packages/goTenna/device.py", line 448, in _1ll111ll1_opy_
    (now-l11llllll_opy_).total_seconds())
  File "/usr/local/lib/python3.7/site-packages/goTenna/pcb_connection.py", line 218, in read_binary_blocking
    for to_return in l11ll1l11_opy_:
  File "/usr/local/lib/python3.7/site-packages/goTenna/pcb_connection.py", line 190, in l11ll1l1l_opy_
    l1l1111l1_opy_()
  File "/usr/local/lib/python3.7/site-packages/goTenna/pcb_connection.py", line 188, in l1l1111l1_opy_
    (now-l11llllll_opy_).seconds)
goTenna.constants.TimeoutException: GoTenna communication timed out after 10s. Command: read_binary