-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugging the T2 CLI - no connection to device #1748
Comments
@kevinmehall Does https://github.com/tessel/node-usb have support for running on Big Sur? (I don't see why it wouldn't, but you'd know best and it doesn't hurt to ask).
@tanepiper Can you describe that setup a bit more? Are you using the built-in command prompt? Can you confirm that you followed the instructions given for Windows here: http://tessel.github.io/t2-start/index.html. Thanks! |
@rwaldron Yes, I went through each of the steps described in the docs on OSX and Windows. Windows I tried cmd and Powershell, I also tried Bash on WSL. I haven't been able to try Linux (and might not be able to as I've since bricked the device and can't currently get it re-flashed using flash.py from https://github.com/tessel/t2-firmware) How I bricked it might also help? 1: Created a public and private key At this point any time I tried to use the CLI tool I kept getting segfaults from the USB device (it would find it on the LAN fine still) - an entirely new error! I then tried flashing If I can recover the device I can keep testing but this is as far as I got. |
I know @tanepiper What did you use to flash u-boot and what's the serial port output on boot now? If you broke u-boot, there's also |
@kevinmehall I'm on Intel so it's not an ARM issue. So amazingly I've captured the serial log:
|
@tanepiper I saw your message on Twitter, re: "simpleExec"—but I'm not sure what would cause that. |
Digging and digging, I get as far as Related: nodejs/help#2112 |
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 PromiseBackground
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:
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 casethis.usbConnection.intf.altSetting === 2
for meBut 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, theproc.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 anexec
call).The text was updated successfully, but these errors were encountered: