Encoders at gpio

Hi all.

I followed the discription of using Encoders directly on gpio here:

HW-Pins like here:

and entered the Pins in the Webconf like here

As soon was I change to custom/prototype 1/2/… the Pi restarts and I get the Zynthian Splash reporting an IP Error. DHCP works and I can even after reboot conect via Webconf.

Any ideas what I’m missing?

Regards,
Sven

1 Like

The first thing to check is wether you have switch to 0V encoders or connected to +5V encoders ( on a small board) with + +5V label on it. It’s worth checking because the second sort are a different beast all together.

You can get a fair way with tsting encoders with a multimeter. Connected between the two outer pins you should see a brief buzz of continuity if they are ok.

Could you put a picture of the encoder up here? That frequently reveals issues.

Check you have soundcard and display configured correctly. With custom config you must define all the parameters.

Hi wyleu,

sorry for the long link to the big A, I got these here, connected directly without any small board. They are 5V

Hi Riban,

without the encoders plugged, everything is fine. I use an external USb Card, Behringer UMC202HD (configured as UMC404HD, as the UCA222 didn’t work for me)

Input and Output work fine, HD Display works with onscreen buttons

Ok. They look correct. It’s just we’ve had a few wild goose chases because off that mistake! it’s good to get it out of the way first.

This is a handy tool for seeing if things actually work at the GPIO level. it’s pretty low level but it does tell the ultimate truth but is a little involved to set up if you ain’t used to command line stuff…

As @riban says check the configs. Most errors on start up are down to audio selection and switching that to dummies will tell you if everytihng else is ok, and might well start up cleanly. It’s a good sanity check first.

Okay,

my Display works fine with WaveShare 7 HDMI+USB 1024x600

hdmi_force_hotplug=1
hdmi_drive=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0

1024x600
/dev/fb0

Soundcard:

Behringer UMC202HD

jack settings:
-P 70 -t 2000 -d alsa -d hw:U192k -r 48000 -p 256 -n 3 -s -S -X raw

Aubionotes
-O complex -t 0.5 -s -88 -p yinfft -l 0.5

RBPi Audio disabled
OTG disablerd

Mixer Controls
UMC404HD_192k_Output,Mic Left,Mic Right

Wiring is switched to Mcp23017 Zynscreen Zynface with the defaults.

Everthing works fine.

Just changed Audio to dummy. Worked. Then I changed wiring to custom and I get the message red Message ERROR: IP 192.168.XXX.YYY and the screen is locked.

Same with the UMC202.

If I switch back to Mcp23017 Zynscreen Zynface , everything is normal

I’m stuck

The error message is generic, in that it isn’t related to the IP address, that is displayed so you can log onto the zynth with the webconf to sort out problems…

You should probably examine UI log under Interface in the webconf and see if anything is displayed there…

If nothing to obvious try with debug on but that can produce a fair bit of output.

Post screenshi of your webconf dashboard and hardware config pages

So here we go…

– Logs begin at Thu 2019-02-14 10:11:58 GMT. –
May 21 15:20:56 zynthian startx[5378]: Building XImage…done
May 21 15:21:01 zynthian startx[5378]: lilv_world_load_bundle(): warning: Replacing version 2071.7 of http://gareus.org/oss/lv2/b_whirl#extended from <file:///zynthian/zynthian-plugins/lv2/b_whirl.lv2/>
May 21 15:21:01 zynthian startx[5378]: lilv_world_load_bundle(): note: New version 2071.11 found in <file:///zynthian/zynthian-plugins/lv2/b_whirl/>
May 21 15:21:01 zynthian startx[5378]: lilv_world_load_bundle(): warning: Replacing version 2071.7 of http://gareus.org/oss/lv2/b_whirl#simple from <file:///zynthian/zynthian-plugins/lv2/b_whirl.lv2/>
May 21 15:21:01 zynthian startx[5378]: lilv_world_load_bundle(): note: New version 2071.11 found in <file:///zynthian/zynthian-plugins/lv2/b_whirl/>
May 21 15:21:01 zynthian startx[5378]: lilv_world_load_bundle(): warning: Ignoring bundle <file:///zynthian/zynthian-plugins/lv2/b_synth.lv2/>
May 21 15:21:01 zynthian startx[5378]: lilv_world_load_bundle(): note: Newer version of http://gareus.org/oss/lv2/b_synth loaded from <file:///zynthian/zynthian-plugins/lv2/b_synth/>
May 21 15:21:03 zynthian startx[5378]: libjackpeak registering as ‘jackpeak-01’.
May 21 15:21:03 zynthian startx[5378]: libjackpeak created input ports
May 21 15:21:04 zynthian startx[5378]: ERROR:zynthian_gui.osc_init: ZYNTHIAN-UI OSC Server can’t be started: server error 9904: b’cannot find free port’
May 21 15:21:08 zynthian startx[5378]: gpio: Unable to open GPIO direction interface for pin 8: No such file or directory
May 21 15:21:08 zynthian startx[5378]: wiringPiISR: unable to open /sys/class/gpio/gpio8/value: No such file or directory
May 21 15:21:08 zynthian startx[5378]: New instance of zynseq
May 21 15:21:08 zynthian startx[5378]: zynseq initialising as zynthstep
May 21 15:21:08 zynthian startx[5378]: Zyncoder: Zynswitches poll thread created successfully
May 21 15:21:08 zynthian startx[5378]: Jackpeak closing
May 21 15:21:09 zynthian startx[5378]: /zynthian/config/img/fb_zynthian_error_ip.png is 1024x600 PNG image, color type RGB_ALPHA, 8 bit
May 21 15:21:09 zynthian startx[5378]: Zooming image by 100%…done
May 21 15:21:09 zynthian startx[5378]: Merging…done
May 21 15:21:09 zynthian startx[5378]: Building XImage…done
May 21 15:21:14 zynthian startx[5378]: lilv_world_load_bundle(): warning: Replacing version 2071.7 of http://gareus.org/oss/lv2/b_whirl#extended from <file:///zynthian/zynthian-plugins/lv2/b_whirl.lv2/>
May 21 15:21:14 zynthian startx[5378]: lilv_world_load_bundle(): note: New version 2071.11 found in <file:///zynthian/zynthian-plugins/lv2/b_whirl/>
May 21 15:21:14 zynthian startx[5378]: lilv_world_load_bundle(): warning: Replacing version 2071.7 of http://gareus.org/oss/lv2/b_whirl#simple from <file:///zynthian/zynthian-plugins/lv2/b_whirl.lv2/>
May 21 15:21:14 zynthian startx[5378]: lilv_world_load_bundle(): note: New version 2071.11 found in <file:///zynthian/zynthian-plugins/lv2/b_whirl/>
May 21 15:21:14 zynthian startx[5378]: lilv_world_load_bundle(): warning: Ignoring bundle <file:///zynthian/zynthian-plugins/lv2/b_synth.lv2/>
May 21 15:21:14 zynthian startx[5378]: lilv_world_load_bundle(): note: Newer version of http://gareus.org/oss/lv2/b_synth loaded from <file:///zynthian/zynthian-plugins/lv2/b_synth/>
May 21 15:21:16 zynthian startx[5378]: libjackpeak registering as ‘jackpeak-01’.
May 21 15:21:16 zynthian startx[5378]: libjackpeak created input ports
May 21 15:21:18 zynthian startx[5378]: ERROR:zynthian_gui.osc_init: ZYNTHIAN-UI OSC Server can’t be started: server error 9904: b’cannot find free port’
May 21 15:21:20 zynthian startx[5378]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN!
May 21 15:21:20 zynthian startx[5378]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN!
May 21 15:21:21 zynthian startx[5378]: gpio: Unable to open GPIO direction interface for pin 8: No such file or directory
May 21 15:21:21 zynthian startx[5378]: wiringPiISR: unable to open /sys/class/gpio/gpio8/value: No such file or directory
May 21 15:21:21 zynthian startx[5378]: New instance of zynseq
May 21 15:21:21 zynthian startx[5378]: zynseq initialising as zynthstep
May 21 15:21:21 zynthian startx[5378]: Zyncoder: Zynswitches poll thread created successfully
May 21 15:21:21 zynthian startx[5378]: Jackpeak closing
May 21 15:21:23 zynthian startx[5378]: /zynthian/config/img/fb_zynthian_error_ip.png is 1024x600 PNG image, color type RGB_ALPHA, 8 bit
May 21 15:21:23 zynthian startx[5378]: Zooming image by 100%…done
May 21 15:21:23 zynthian startx[5378]: Merging…done
May 21 15:21:23 zynthian startx[5378]: Building XImage…done
May 21 15:21:28 zynthian startx[5378]: lilv_world_load_bundle(): warning: Replacing version 2071.7 of http://gareus.org/oss/lv2/b_whirl#extended from <file:///zynthian/zynthian-plugins/lv2/b_whirl.lv2/>
May 21 15:21:28 zynthian startx[5378]: lilv_world_load_bundle(): note: New version 2071.11 found in <file:///zynthian/zynthian-plugins/lv2/b_whirl/>
May 21 15:21:28 zynthian startx[5378]: lilv_world_load_bundle(): warning: Replacing version 2071.7 of http://gareus.org/oss/lv2/b_whirl#simple from <file:///zynthian/zynthian-plugins/lv2/b_whirl.lv2/>
May 21 15:21:28 zynthian startx[5378]: lilv_world_load_bundle(): note: New version 2071.11 found in <file:///zynthian/zynthian-plugins/lv2/b_whirl/>
May 21 15:21:28 zynthian startx[5378]: lilv_world_load_bundle(): warning: Ignoring bundle <file:///zynthian/zynthian-plugins/lv2/b_synth.lv2/>
May 21 15:21:28 zynthian startx[5378]: lilv_world_load_bundle(): note: Newer version of http://gareus.org/oss/lv2/b_synth loaded from <file:///zynthian/zynthian-plugins/lv2/b_synth/>
May 21 15:21:30 zynthian startx[5378]: libjackpeak registering as ‘jackpeak-01’.
May 21 15:21:30 zynthian startx[5378]: libjackpeak created input ports
May 21 15:21:31 zynthian startx[5378]: ERROR:zynthian_gui.osc_init: ZYNTHIAN-UI OSC Server can’t be started: server error 9904: b’cannot find free port’
May 21 15:21:35 zynthian startx[5378]: gpio: Unable to open GPIO direction interface for pin 8: No such file or directory
May 21 15:21:35 zynthian startx[5378]: wiringPiISR: unable to open /sys/class/gpio/gpio8/value: No such file or directory
May 21 15:21:35 zynthian startx[5378]: New instance of zynseq
May 21 15:21:35 zynthian startx[5378]: zynseq initialising as zynthstep
May 21 15:21:35 zynthian startx[5378]: Zyncoder: Zynswitches poll thread created successfully
May 21 15:21:35 zynthian startx[5378]: Jackpeak closing
May 21 15:21:36 zynthian startx[5378]: /zynthian/config/img/fb_zynthian_error_ip.png is 1024x600 PNG image, color type RGB_ALPHA, 8 bit
May 21 15:21:36 zynthian startx[5378]: Zooming image by 100%…done
May 21 15:21:36 zynthian startx[5378]: Merging…done
May 21 15:21:36 zynthian startx[5378]: Building XImage…done

Only 2 Things I find are:

May 21 15:21:31 zynthian startx[5378]: ERROR:zynthian_gui.osc_init: ZYNTHIAN-UI OSC Server can’t be started: server error 9904: b’cannot find free port’
May 21 15:21:35 zynthian startx[5378]: gpio: Unable to open GPIO direction interface for pin 8: No such file or directory
May 21 15:21:35 zynthian startx[5378]: wiringPiISR: unable to open /sys/class/gpio/gpio8/value: No such file or directory

May 21 15:21:35 zynthian startx[5378]: gpio: Unable to open GPIO direction interface for pin 8: No such file or directory

I’ve seen this before. The PIn has been reallocated withing the Pi, and you need to find an alternative pin to use …

I resoldered two of my GPIO encoder boards because of this …

If you set that pin to value 0 rather than the appropriate number ( I can’t remember which coding the pin 8 refers to), I suspect things might start up allbiet with a broken encoder that youve set the None to…

Nothings is fixed on Pin8 (the HW-Pin)

How do I do that?

BTW, it’s the same on two identical RBPi4

ERROR:zynthian_gui.osc_init: ZYNTHIAN-UI OSC Server can’t be started:

This is indicative of attempting to start a second instance of Zynthian.

I’m not entirely sure the pin 8 refers to the GPIO header. Basically the attempt to allocate a pin for the encoder whilst previously it worked this was altered in some subsequent Pi software release.

Well I’m fairly sure that will be the error that is stopping the zynth start.

Well, actually I don’t know what to do now :smiley:

How are you stopping and starting Zynthian?

One of the pins that had previously worked produced this error after an update. The solution I employed was to disconnect the encoder from that pin and choose another Pin and alter the settings in wbconf.

IT’s important that you understand the quite involved pin allocations on the setup, because the values in the webconf settings are found in this table…

pi_pins_encoders

Either via admin Menu, but as I’m fiddling around I reboot via Webconf.

After poweroff I plug the powersupply into USB-C

I think we use the wiring pi pin numbering scheme. Pin 8 is used for I2C. Try using a different pin.