Skip to content
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

WCC not working on OSX Sierra #2

Open
brainstorm opened this issue Dec 30, 2017 · 1 comment
Open

WCC not working on OSX Sierra #2

brainstorm opened this issue Dec 30, 2017 · 1 comment

Comments

@brainstorm
Copy link

This is a followup on issue whitecatboard/Lua-RTOS-ESP32#83 (comment). I just wanted to make sure that after a clean reboot and go build-ing the newest whitecat-console release I still have this problem:

brainstorm:whitecat-console romanvg$ ./wcc -p /dev/cu.usbserial-FTYKHBJT -f -ffs -d
2017/12/30 17:08:53 AppFolder:  /Users/romanvg/go/src/github.com/whitecatboard/whitecat-console
2017/12/30 17:08:53 AppFileName:  /Users/romanvg/go/src/github.com/whitecatboard/whitecat-console/wcc
2017/12/30 17:08:53 AppDataFolder:  /Users/romanvg/.wccagent
2017/12/30 17:08:53 AppDataTmpFolder:  /Users/romanvg/.wccagent/tmp
2017/12/30 17:08:53 connecting to board on /dev/cu.usbserial-FTYKHBJT ...
2017/12/30 17:08:53 attaching board ...
2017/12/30 17:08:53 detaching board ...
Can't connect to any board at port /dev/cu.usbserial-FTYKHBJT.

Available serial ports on your computer:

/dev/cu.usbserial-FTYKHBJT
/dev/cu.Bluetooth-Incoming-Port
/dev/cu.lpss-serial2

Adding a few more debugging hints in connection.go:

brainstorm:whitecat-console romanvg$ git diff
diff --git a/connection.go b/connection.go
index 4458912..a08e563 100755
--- a/connection.go
+++ b/connection.go
@@ -62,11 +62,14 @@ func connect(prerequisites bool, port string) {
                return
        }

+       fmt.Printf("INFO port status: %+v\n", info)
+       fmt.Printf("ERR  port status: %+v\n", err)

Yields the following:

brainstorm:whitecat-console romanvg$ ./build-osx && ./wcc -p /dev/cu.usbserial-FTYKHBJT -f -ffs -d
2017/12/30 17:34:45 AppFolder:  /Users/romanvg/go/src/github.com/whitecatboard/whitecat-console
2017/12/30 17:34:45 AppFileName:  /Users/romanvg/go/src/github.com/whitecatboard/whitecat-console/wcc
2017/12/30 17:34:45 AppDataFolder:  /Users/romanvg/.wccagent
2017/12/30 17:34:45 AppDataTmpFolder:  /Users/romanvg/.wccagent/tmp
2017/12/30 17:34:45 connecting to board on /dev/cu.usbserial-FTYKHBJT ...
INFO port status: &{p:0x47004b0 opened:false}
ERR  port status: <nil>
2017/12/30 17:34:45 attaching board ...
2017/12/30 17:34:45 detaching board ...
Can't connect to any board at port /dev/cu.usbserial-FTYKHBJT.

Available serial ports on your computer:

/dev/cu.usbserial-FTYKHBJT
/dev/cu.Bluetooth-Incoming-Port
/dev/cu.lpss-serial2

No idea why it is opened:false but still err reports nil :/

@brainstorm
Copy link
Author

@jolivepetrus Jaume, em pots donar un cop de mà amb tot això? ;)

After updating the libserialport from sigrok into go-serial over here:

https://github.com/brainstorm/whitecat-console/commit/e21e357b5d72abbdfc419984c97fd9dda3ab904e

I've managed to get up to the point where the data shows up in the opened serial port and the notify reports some activity but the board ends up detaching anyway:

brainstorm:whitecat-console romanvg$ ./build-osx && ./wcc -p /dev/cu.usbserial-FTYKHBJT -f -ffs -d
2017/12/30 23:00:25 AppFolder:  /Users/romanvg/go/src/github.com/whitecatboard/whitecat-console
2017/12/30 23:00:25 AppFileName:  /Users/romanvg/go/src/github.com/whitecatboard/whitecat-console/wcc
2017/12/30 23:00:25 AppDataFolder:  /Users/romanvg/.wccagent
2017/12/30 23:00:25 AppDataTmpFolder:  /Users/romanvg/.wccagent/tmp
2017/12/30 23:00:25 connecting to board on /dev/cu.usbserial-FTYKHBJT ...
INFO port status: &{p:0x5100000 opened:false}
ERR  port status: <nil>
2017/12/30 23:00:25 attaching board ...
2017/12/30 23:00:25 ... to port:  /dev/cu.usbserial-FTYKHBJT
2017/12/30 23:00:25 THE ERROR ON OPENING SERIAL PORT IS:  <nil>
2017/12/30 23:00:25 start inspector ...
2017/12/30 23:00:26 waiting for ready ...
2017/12/30 23:00:28 XXX: DETECTED POWER ON RESET LINE!
2017/12/30 23:00:28 Line reads:  rst:0x1 (POWERON_RESET),boot:0x1 (ets Jun  8 2016 00:22:57
2017/12/30 23:00:28 XXX: DETECTED POWER ON RESET LINE!
2017/12/30 23:00:28 Line reads:  rst:0x1 (POWERON_RESET),boot:0x1 (DOWNLOAD_BOOT(UART0/UART1/SDIO_FEI_REO_V2))
2017/12/30 23:00:32 detaching board ...
Can't connect to any board at port /dev/cu.usbserial-FTYKHBJT.

Available serial ports on your computer:

/dev/cu.usbserial-FTYKHBJT
/dev/cu.lpss-serial2
/dev/cu.Bluetooth-Incoming-Port

Am I supposed to add some type of handler for boardPowerOnReset so that it can continue flashing Lua-RTOS?

Fins aviat, bon nadal i cap d'any!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant