Closed phillipsnick closed 7 months ago
It looks like your I2C EEPROM is not available (and EVOK therefore cannot tell which Neuron you have), could you post the contents of your
/sys/class/i2c-dev/i2c-1/device/1-0057/eeprom
file? (i.e. by using cat /sys/class/i2c-dev/i2c-1/device/1-0057/eeprom
)
This error usually indicates that the installation didn't go through correctly. Unfortunately we haven't yet been able to replicate the error ourselves without turning off I2C in /boot/config.txt. It would help if we could know the output from:
lsmod
,
i2cdetect 1
,
and
cat /boot/config.txt
For further explanation: The identification data for your Neuron are stored in the I2C EEPROM, which requires a) I2C to be turned on b) I2C-dev to be turned on, and c) the EEPROM device overlay to be loaded correctly. Hardware fault in the EEPROM is certainly possible, but very unlikely. The error mostly comes up when EVOK is installed over an existing image which has I2C configured in some other manner.
Another instance of this error on the forums: https://forum.unipi.technology/topic/488/internal-error-500-after-fresh-evok-installation/11
The latest commit (5271b84c56c7facc17797a47e3824cf86efc485d) should make the I2C handling more robust. It's possible that I2C-dev did not enable correctly, the latest version should fix that.
Release v2.0.1 has solved this issue, thanks!
Hi, I experience the same error after updating to latest evok with apt upgrade (and other related packages, run apt upgrade today and reboot, see fragment bellow).
I tried replace my current /etc/evok.conf file with repo's evok-neuron.conf and no change. Installed evok to raspbian stretch with repo from apt repository.
Any idea where to debug/fix it? Thanks!
...
Removing 'diversion of /boot/overlays/ds2482.dtbo to /usr/share/rpikernelhack/overlays/ds2482.dtbo by rpikernelhack'
Removing 'diversion of /boot/overlays/neuronee.dtbo to /usr/share/rpikernelhack/overlays/neuronee.dtbo by rpikernelhack'
Removing 'diversion of /boot/overlays/neuron-spi-new.dtbo to /usr/share/rpikernelhack/overlays/neuron-spi-new.dtbo by rpikernelhack'
Removing 'diversion of /boot/overlays/neuron-spi.dtbo to /usr/share/rpikernelhack/overlays/neuron-spi.dtbo by rpikernelhack'
Removing 'diversion of /boot/overlays/unipiee.dtbo to /usr/share/rpikernelhack/overlays/unipiee.dtbo by rpikernelhack'
OK
update-initramfs: Generating /boot/initrd.img-4.14.71-v7+
WARNING: missing /lib/modules/4.14.71-v7+
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.14.71-v7+: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_opXti4/lib/modules/4.14.71-v7+/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_opXti4/lib/modules/4.14.71-v7+/modules.builtin: No such file or directory
Setting up libtiff5:armhf (4.0.8-2+deb9u4) ...
Setting up perl (5.24.1-3+deb9u5) ...
Setting up libssl1.0.2:armhf (1.0.2q-1~deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up unipi-modbus-tools (1.1.14) ...
Installing new version of config file /etc/default/unipi-modbus-tools ...
Setting up libssl1.1:armhf (1.1.0j-1~deb9u1) ...
Setting up openssl (1.1.0j-1~deb9u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for dbus (1.10.26-0+deb9u1) ...
Setting up evok (2.0.7d) ...
Setting up libpolkit-gobject-1-0:armhf (0.105-18+deb9u1) ...
root@neuronl203:/etc# cat /boot/config.txt
dtparam=i2c_arm=on
dtoverlay=neuronee
dtoverlay=i2c-rtc,mcp7941x
dtoverlay=unipiee
dtoverlay=neuron-spi-new
dtparam=i2c_arm=on
dtoverlay=neuronee
dtoverlay=i2c-rtc,mcp7941x
dtoverlay=unipiee
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on
# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
[pi1]
initramfs initrd.img-4.14.71+ followkernel
[pi2]
initramfs initrd.img-4.14.71-v7+ followkernel
[pi3]
initramfs initrd.img-4.14.71-v7+ followkernel
[all]
dtoverlay=w1-gpio
root@neuronl203:/etc# cat /sys/class/i2c-dev/i2c-1/device/1-0057/eeprom
cat: /sys/class/i2c-dev/i2c-1/device/1-0057/eeprom: No such file or directory
root@neuronl203:/etc# cat /sys/class/
backlight/ bsg/ hwmon/ iscsi_host/ mem/ raw/ scsi_disk/ thermal/ vc-sm/
bcm2708_vcio/ devcoredump/ i2c-adapter/ iscsi_iface/ misc/ rc/ scsi_host/ tty/ vtconsole/
bcm2835-gpiomem/ dma/ ieee80211/ iscsi_session/ mmc_host/ regulator/ sound/ uio/ watchdog/
bdi/ gpio/ input/ iscsi_transport/ net/ rfkill/ spidev/ vc/
block/ graphics/ iscsi_connection/ leds/ power_supply/ rtc/ spi_master/ vchiq/
bluetooth/ hidraw/ iscsi_endpoint/ mdio_bus/ pwm/ scsi_device/ spi_slave/ vc-mem/
root@neuronl203:/etc# cat /sys/class/i2c-adapter/i2c-1/
1-0050/ 1-0057/ 1-006f/ delete_device device/ name new_device of_node/ power/ subsystem/ uevent
root@neuronl203:/etc# cat /sys/class/i2c-adapter/i2c-1/
1-0050/ 1-0057/ 1-006f/ delete_device device/ name new_device of_node/ power/ subsystem/ uevent
root@neuronl203:/etc# cat /sys/class/i2c-adapter/i2c-1/1-0057/
1-00570/ driver/ eeprom modalias name of_node/ power/ subsystem/ uevent
root@neuronl203:/etc# cat /sys/class/i2c-adapter/i2c-1/1-0057/eeprom
�������������������������������������������������������������������������������������������������U��L203������������������root@neuronl203:/etc#
root@neuronl203:/etc#
root@neuronl203:/etc# i2cdetect 1
Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory
root@neuronl203:/etc# lsmod
Module Size Used by
bnep 20480 2
hci_uart 36864 1
btbcm 16384 1 hci_uart
serdev 20480 1 hci_uart
bluetooth 368640 24 hci_uart,bnep,btbcm
ecdh_generic 28672 1 bluetooth
at24 16384 0
spidev 16384 0
rtc_ds1307 24576 0
brcmfmac 307200 0
brcmutil 16384 1 brcmfmac
cfg80211 573440 1 brcmfmac
rfkill 28672 6 bluetooth,cfg80211
snd_bcm2835 32768 0
snd_pcm 98304 1 snd_bcm2835
snd_timer 32768 1 snd_pcm
snd 69632 3 snd_timer,snd_bcm2835,snd_pcm
spi_bcm2835 16384 0
i2c_bcm2835 16384 0
w1_gpio 16384 0
wire 40960 1 w1_gpio
cn 16384 1 wire
hwmon 16384 2 rtc_ds1307,wire
uio_pdrv_genirq 16384 0
fixed 16384 0
uio 20480 1 uio_pdrv_genirq
ip_tables 24576 0
x_tables 32768 1 ip_tables
ipv6 425984 32
Current error in log:
2018-12-25 23:03:06,048 - evok - ERROR - 'NoneType' object has no attribute 'do_scan'
Traceback (most recent call last):
File "/opt/evok/lib/python2.7/site-packages/evok/neuron.py", line 269, in scan_boards
yield self.modbus_cache_map.do_scan()
AttributeError: 'NoneType' object has no attribute 'do_scan'
2018-12-25 23:03:06,150 - evok - ERROR - 'NoneType' object has no attribute 'do_scan'
Traceback (most recent call last):
File "/opt/evok/lib/python2.7/site-packages/evok/neuron.py", line 269, in scan_boards
yield self.modbus_cache_map.do_scan()
AttributeError: 'NoneType' object has no attribute 'do_scan'
This looks like an issue with installing the unipi driver kernel module, possibly due to kernel version incompatibility. The module is not listed on lsmod and so is not loaded, and it is an essential component for any communication with Neuron or Axon.
I am away from the office during the christmas period and so cannot give a comprehensive answer, but I can see two possible solutions without further testing - reinstalling the kernel module by first executing 'apt-get remove unipi-kernel --purge' and then installing the dynamically compiled version with 'apt-get install unipi-kernel-dkms'. (you will need to reinstall evok with 'apt-get install evok' as well)
Unfortunately I cannot guarantee that this will work without further errors, as I do not know the complete state of the device. The other option would be using a clean image, though if you are willing to wait I may be able to suggest a better solution after the christmas period.
Thanks for very quick response! I will try reinstall kernel and provide update (or use clean image if it fails, actually I use it as lights control in my house:-)). I'm happy discuss it after Christmas.
It haven't booted after kernel reinstall, so used a new card with fresh image (but I have the original memory card for possible further investigation).
Very odd to hear it hasn't booted. If you want you can upload an image of the sd card to mediafire.com (or some other filehosting site which can handle bigger files without speed limiting) and I'll have a look at it, but I can't promise I'll be able to get to the bottom of it.
Regardless I'm glad to hear it works with a fresh image. The kernel upgrade process on Linux is unfortunately prone to errors compared to other OS, it's a common problem with other 3rd-party kernel drivers, e.g. virtualbox.
I'm sorry I don't have the card anymore, but I experienced similar issue, which was solved by evok reinstall (which rebuilt kernel modules).
I think the issue can be closed, thanks.
Prerequisites
[ ] Can you reproduce the problem in safe mode? Untested
[ ] Are you running the latest Master or the latest release version? Tried latest master and release v2.0a
[] Did you try to reinstall EVOK? Yes and a fresh install of Raspbian Stretch Lite
Version:September 2017 Release date:2017-09-07 Kernel version:4.9
Log files needed
Include the output of the following commands on your Neuron/UniPi device:
/var/log/evok.log
Running in debug mode
Description
Service never starts due to error on https://github.com/UniPiTechnology/evok/blob/master/evok/neuron.py#L225
Steps to Reproduce
Install fresh Raspbian Install Evok as per documentation at https://evok.api-docs.io/1.0/jKcTKe5aRBCNjt8Az/introduction Run in debug mode