Skip to content

Debugging the T2 CLI - no connection to device #1748

@tanepiper

Description

@tanepiper

Following up with my conversation with @rwaldron on Twitter (https://twitter.com/tanepiper/status/1358198339662151684?s=20) I wanted to create this ticket to ensure that I was able to record the debugging I've been doing to get this CLI working with the Tessel

tl;dr

The bug seems to be in Tessel.prototype.simpleExec which never resolves it's Promise

Background

I've had the Tessel 2 board for a while now, but honestly, I could never get it to work and it sort of sat at the bottom of my cupboard for the last 5 years. Recently I've been working with Web Serial APIs and brought it out to see if I could get it working.

Currently, I am on OSX Big Sur 11.2 with node v14.15.3 - but I also tried to see if I can get this working on Windows but no luck either.

The Problem Description:

Whenever I try use the board CLI tool - if I have the device connected to USB only it never finds the device but for example if it's booting I do get a warning about a booting board.

If I plug it into the LAN, it's also seen - but the USB connection is never seen. I can confirm it's a valid USB cable however because I can see the serial connection details using https://webserial.app or t2-serial

Here is the board:

EttRihYWYAA_ys-

Discovery:

After some digging in to the code I what I thought to be the bug here that Tessel.getName never resolves as a promise because in my case this.usbConnection.intf.altSetting === 2 for me

But after doing a bit more digging (now that it was returning some kind of device) I eventually found that here never completes - the 'finish' event is never fired.

The above command creates a string touch/etc/dropbear/authorized_keys (yes, without a space!) but even adding a space did nothing here, the proc.control.end(command); doesn't seem to flush.

This is really as far as I got - it seems it's in RemoteWritableStream where the problem lies (and would also explain the original problem of the name never returning for the USB connection since it also does an exec call).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions