Control chain, device timeout

Hi,

I’m running successfully the Mod Duo software on my little SBC and that’s great!

I’m trying now to add the cc functionality, so I programmed my Arduino Uno board with

the Pot example and (cc-arduino-lib v0.5.1) and connected it to my board.

I’m running the cc-master succesfully on the target

export LIBCONTROLCHAIN_DEBUG=2
controlchaind /dev/ttyUSB0 -f

this gives me this output

controlchaind /dev/ttyUSB0 -f
[cc-lib] control chain started (port: /dev/ttyUSB0, baud rate: 115200)
RECV: device: 0, command: handshake, data size: 7
data: FF FF 00 05 00 05 01
text:

[cc-lib] handshake received
[cc-lib] random id: 65535
[cc-lib] protocol: v0.5
[cc-lib] firmware: v0.5.0
SEND: device: 0, command: handshake, data size: 4
data: FF FF 00 01
text:

SEND: device: 1, command: device descriptor, data size: 1
data: 00
text:

RECV: device: 1, command: device descriptor, data size: 87
data: 45 68 74 74 70 73 3A 2F 2F 67 69 74 68 75 62 2E 63 6F 6D 2F 6D 6F 64 64 65 76 69 63 65 73 2F 63
63 2D 61 72 64 75 69 6E 6F 2D 6C 69 62 2F 74 72 65 65 2F 6D 61 73 74 65 72 2F 65 78 61 6D 70 6C
65 73 2F 50 6F 74 03 50 6F 74 01 06 54 75 72 6E 4D 65 30 00 00 00 01
text: Ehttps://github.com/moddevices/cc-arduino-lib/tree/master/examples/PotPotTurnMe0

[cc-lib] device descriptor received
[cc-lib] id: 1, uri: https://github.com/moddevices/cc-arduino-lib/tree/master/examples/Pot
[cc-lib] label: Pot
[cc-lib] channel: 0
[cc-lib] actuators count: 1
SEND: device: 1, command: device descriptor, data size: 1
data: 01
text:

and /tmp/control-chain.sock is created

The problem is when running mod-ui, no cc device is recognized and I get a device timeout error from
the cc-lib but control_chain.py is giving me no additional logs except Control Chain initialized…

sh startModui start
root@nanopi-neo2:/etc/init.d# Can’t create a device key: No module named ‘Crypto’
WARN: Missing file /usr/local/mod-ui/data/mod_api_key.pub with the public API KEY
Using HMI => True
[cc-lib] device timeout (device id: 1)
jack client activated
INFO:root:[host] popped from queue: feature_enable processing 0
INFO:root:[host] sending -> feature_enable processing 0
INFO:root:[host] received <- ‘resp 0\x00’
Control Chain initialized
INFO:root:[host] popped from queue: remove -1
INFO:root:[host] sending -> remove -1
last state file does not exist or is corrupt
INFO:root:[host] popped from queue: feature_enable link 0
INFO:root:[host] sending -> feature_enable link 0
INFO:root:[host] popped from queue: transport 0 4.000000 120.000000
INFO:root:[host] sending -> transport 0 4.000000 120.000000
INFO:root:[host] popped from queue: connect system:capture_1 system:playback_1
INFO:root:[host] sending -> connect system:capture_1 system:playback_1
INFO:root:[host] popped from queue: connect system:capture_2 system:playback_2
INFO:root:[host] sending -> connect system:capture_2 system:playback_2
INFO:root:[host] popped from queue: midi_program_listen 1 15
INFO:root:[host] sending -> midi_program_listen 1 15
INFO:root:[host] popped from queue: feature_enable processing 2
INFO:root:[host] sending -> feature_enable processing 2
INFO:root:[host] received <- ‘resp 0\x00’
INFO:tornado.access:200 GET /ping?=1537723078932 (10.10.10.2) 9.75ms
INFO:tornado.access:200 GET /?v=1537547580 (10.10.10.2) 140.81ms
INFO:tornado.access:200 GET /js/templates.js?v=1537547580 (10.10.10.2) 27.24ms
INFO:tornado.access:200 GET /ping?
=1537725360327 (10.10.10.2) 4.67ms
INFO:tornado.access:101 GET /websocket (10.10.10.2) 5.29ms
websocket open
INFO:tornado.access:200 GET /pedalpreset/name?id=-1&=1537725360330 (10.10.10.2) 4.07ms
INFO:tornado.access:200 GET /ping?
=1537725360331 (10.10.10.2) 5.63ms
INFO:tornado.access:200 GET /ping?=1537725360332 (10.10.10.2) 7.34ms
Error opening file /home/root/.lv2/GxTubeDistortion.lv2/modgui.ttl (No such file or directory)
INFO:tornado.access:200 GET /effect/list?
=1537725360333 (10.10.10.2) 3116.29ms
INFO:tornado.access:200 GET /ping?=1537725360334 (10.10.10.2) 5.40ms
INFO:tornado.access:200 GET /ping?
=1537725360335 (10.10.10.2) 5.34ms

2 Likes

Some time has passed, yesterday I tried again and discover my problem was a timing issue. In details, if I keep the Arduino board reset button pressed until mod-ui has started loading, then when I release the button the popup
“New CC Pot etc.” on mod-ui web interface appears. I think that this behaviour should be fixed, the external CC hardware doesn’t know how much time does it take for mod-ui to finish the initialization…in order to make it works at the moment I should plan to handle the reset line of the Arduino from my linux board…very unhandy…ideas?

NOTE: now the cc is listed in the mapping popup. However when I try to assign this control a Bug! popup appears:
“Couldn’t address parameter, not allowed”
which is located into html/js/desktop.js. However it’s another problem and I will open a new thread for that.

Thank you.

1 Like

I buddy, kind of facing the same issue. Would you mind sharing the new thread link?

Regards,
Hahu Smith

2 Likes