EigenD - pico issue (debugging)

this is a follow up to our experiments at 3e…

here is what @keymanpal and I thought we had discovered after testing EigenD on both his MacBook and Duncan’s.

if has pico has just been plugged in (so fresh power cycle), then EigenD will not fully connect to it.
(so that if we look in workbench, we will NOT see pico keyboard)
if we then restart EigenD, then the pico will then be seen.
also we noted, that EigenD will not reconnect if you unplug the pico, and plug it in again.

the working assumption for the issue…
when the pico is first connected, we download the firmware to it (pico.ihx), it then reboots, and reappears as a new usb device.

we can see the firmware update/reboot has been done when you first start EigenD.
however, it does not reconnect as it should (after its ‘reboot’)
we don’t know why… perhaps its not retrying, or perhaps there is a timing issue and it ‘gives up’.
but it appeared to be consistent, and also the not reconnecting, also was consistent.

also, EigenLite (thru ECMapper works correctly, so we know it not a hardware issue )

now the problem…
I’ve just tried the same thing with EigenD on my Mac (mini m1) and my pico, and none of this happens… it connects first time with EigenD, and I can unplug it and plug it back in , and it happily reconnects everytime.
arghhhh… I can’t fix whats not broken :wink:

I tried two different Mac mini m1s using different power hubs, and also straight into the mini (no hub), and it works every time as you’d expect.

ok, so we are a bit back to square one…

I wonder if others could test, and see if they can get some more info
there are two tests to try… though they are kind of the same.

first setup…
lets be consistent …

you can try with or without a powered hub… do not use a non-powered hub, or any adapters.
make sure ECMapper is NOT running, and has not run previously.

start with Pico unconnected
start EigenD and set it to have ‘blank’ preset as default start up ,
(exit EigenD once you have done this)

ok now the test… (which you can repeat)

TEST 1 - using simple setup

plug in pico
start EigenD (so we have blank)
load experimental/pico/midi basic

what should happen:
some LEDS come on
what happened for some at 3e:
leds would not come on

here it would be useful to grab eigend.0.log !!

if it failed, exit EigenD , but leave pico connected
start EigenD (so we have blank)
load experimental/pico/midi basic

we would now expect it to work, for everyone
so, leds come on.

now unplug pico, and plug it back in

what should happen:
some LEDS come on
what happened for some at 3e:
leds would not come on

TEST 2 - use workbench

very similar test, but will produce a smaller log file :slight_smile:

disconnect pico,
start EigenD (blank preset)
start Workbench

create pico manager in workbench
(no pico keyboard yet, since we haven’t plugged in pico !)

connect pico

what should happen
pico keyboard will appear … (no LEDs is ok!)

if this does not happen, then grab the eigend.0.log

as I say, this test is pretty much the same as test 1, but eigend.0.log will be a bit smaller as we are not creating lots of other modules.

please do NOT send me logs when loading other setup, just the above tests. there is too much noise to make them of any use.

I should say in advance, when I checked at 3e, logs just appeared to say something like it couldn’t find the interface… which doesnt give me anything to go on, what I really want to see is if there are any other differences around the same time between non-working logs and mine… this is why its important we follow a very precise procedure.

I do have a MacBook that I can also test with, however, I dont really want to do that until we have eliminated any possible setup/install differences…
simply because its the only Mac I have that does not have EigenD installed on it, so once thats done… I’ll have no ‘fresh machines’ to attempt installs on.


I’ll do another run with TEST 2 - use workbench with my Mac’s and report back :wink:

(correction = Thanks! for summing things up)

1 Like

I’m kind of irritated it works on my Macs … though unsurprised :wink:

it would also be super useful if you can also see if it works (properly) on any of your machines, with various hubs etc… at present, we have little to go on other than it works on some machines and not others. it be great to find some way of narrowing down the differences.

also Im assuming, this is a pico only issue (unless anyone says otherwise.)
which is why we are considering it may be power related.
given the basestations do exactly the same start up process, and we have no reports of issues on them.

in terms of machines/Os … Im testing on Mac mini m1, running latest OS Venture 13.5.2… but I don’t think this is related.

also a reminder, as far as I can see, none of this code has changed, so it feels like its something ‘environmental’… and also explains why it can work on some machines and not others.

1 Like

OK, so got the Alpha out of its case yesterday, and unsurprisingly it works just fine with both EigenD and ECMapper (limited testing time, but certainly no connection issues).

I can run through the tests for the Pico today, but I must caveat that I don’t (currently) own a powered hub (no, I don’t know why either!), so will need to use a USB-A->C adapter.

1 Like

OK, so I’m getting results pretty consistent with what happened at EEE23. I’ll send on the logs by email, but here’s a summary of the tests.


Test 1

No Pico Connected, Start EigenD, set blank as default
log saved as set_blank_default.log

Connect pico, start eigend, load midi basic
No Lights!
log saved as load_midi1.log

Close eigend, pico left connected.
open eigend, load midi basic
we have lights!

disconnect pico, reconnect
no lights :frowning:
exit eigend (this time I need to force quit?)
log saved as load_midi2.log

Diff’ing the two logs it looks like the key difference is this block
< eigend: <pico_manager1>: can’t find interface
< eigend: <pico_manager1>: Traceback (most recent call last):
< eigend: <pico_manager1>: File “plg_pkbd/pico_manager_plg.py”, line 157, in download_keyboard
< eigend: <pico_manager1>: File “lib_pico/ezload.py”, line 76, in download
< eigend: <pico_manager1>: RuntimeError : can’t find interface from picross/src/pic_usb_macosx.cpp:201 ()
< eigend: <pico_manager1>: python exception inside functor
< eigend: <pico_manager1>: python exception inside functor from tmp/obj/picross/src/picross_native_python.cpp:11375 () caught at picross/src/pic_usb_macosx.cpp:1821

Test 2

No pico connected
open eigend, open workbench
create pico manager
connect pico
no sign of pico keyboard
log saved as workbench_test.log


Im working thru this with @GoneCaving in PM, but to keep others in loop…

so what is happening is …
we are finding the pico as a usb device
we are able to open the device
but when we go to use it, we find its not presenting the ‘interface’ that we are expecting.

a further oddity (perhaps why its inconsistent?) , is sometimes it appears to be at the pre-load firmware device stage, sometimes after… and once it starts working its ok?
… at this stage, Im not quite sure if this is a red-herring or not?!

to put in layman terms… (without having to explain usb protocol)

its bit like,
plugging in a usb midi keyboard. your daw sees it and can ‘open it’, but when it tries to use it, it says it doesn’t support midi.

as you can see this is kind of strange… as its in the picos firmware what interfaces it supports, and should consistently be reporting this… i.e. a midi keyboard is not one day going to decide to say its a usb mass storage device :wink:

my guess currently…
its some on ‘on power cycle’ up behaviour of the pico, that perhaps newer versions of macOS have exposed. (as the eigend code has not changed in this area)

we are going to try to add some debugging code to see if we can get some more info…
(as it appears to be reproducible in EigenLite 1.0)

also it might be interesting to see if we get a usb app that gives us usb info, like interfaces… that we can use on different machines to also confirm what we are seeing.

1 Like

ok, thanks to huge help and patience from @GoneCaving , we tracked down the issue.
and there is now a fix for EigenLite (dev branch) and EigenD (2.2 branch)

for those interested…

the issue is when we connect to usb devices we tell it to use a configuration.
it appears on some Mac/macOS combinations this takes a very short time to take effect., on others it is instantaneous - so for some, this results in the ‘interface’ not being ready in time.
my suspicion is macOS, at some point in time, changed this behaviour/timing ever so slightly.

to fix, Ive introduced a very short delay (1 millisecond) to allow the pico to update its configuration before querying interface, and this seems to fix initial connection issue, and also re-connects.


Great news !
Thanks for time spend and solution :wink:


Just saw this, is there a chance the delay variance could be related to cable length?

Not in our testing , we used same cable and pico, just with different macOS versions.