First, check that the /boot/config.txt
you are editing is actually the on the first partition of the SD card. Although it is not technically necessary, Raspbian is set up to mount this partition on /boot
automatically, so online tutorials will refer to it that way -- and raspi-config
, used in the Adafruit guide, presumes this is the case.
However, if the file doesn't exist it will be created, and if Kali doesn't use the scheme Raspbian does (comments here imply that), this means it will just create a file in the otherwise empty /boot
directory, which won't actually be used when the system boots. The Pi makes use of a vfat formatted partition at the beginning of the SD card, where firmware and bootloader must be located (and generally also the kernel). You can set things up the same way by adding the following line to /etc/fstab
:
/dev/mmcblk0p1 /boot vfat defaults 0 2
Note this will render anything actually in that directory inaccessible (but not delete it) although from the sounds of things there was nothing there to start with.
In any case, the contents of that partition -- /dev/mmcblk0p1
-- should resemble this -- and it must be there or the Pi would not work. That github repo actually doesn't contain a config.txt
, but whether or not there's one there on your system, that partition is where you want to apply it. If you mount this before running raspi-config
it should work out. If you don't want it in fstab
, manually:
mount -t vfat /dev/mmcblk0p1 /boot
Kernal: 4.1.19-v7
This may be an issue. It predates the release of the Pi 3 and may never have been updated for it. Further, there is a Pi 3 specific device tree overlay in /boot
and this implies you don't have that either.
You need to replace the contents of the /boot
partition referred to above with this and copy the -v7+
modules directory from here into /lib/modules
. It must remain named exactly the same.
sudo modprobe i2c-dev
i2c-dev
in/modules
folder.sudo lsmod | grep i2c
. Also checkls -1 /dev | grep i2c
. Both of them should output something. The only required config.txt option isdtparam=i2c_arm=on
. Also, I would removei2c-bcm2708
from /etc/modules; technically the Pi 3 SoC uses a "BCM 2710" -- although I dunno if it matters WRT that module, just loadingi2c-dev
will pull in any required dependencies. If you have done both those things (enabled in config.txt, andi2c-dev
is shown loaded withlsmod
), you should have a/dev/i2c-1
node or something is wrong.sudo lsmod | grep i2c
shows the out puti2c_dev 5654 i2c_bcm2708 5020
, butls -1 /dev | grep i2c
shows nothing.i2c_bcm2708
. All I can say is I've been using the I2C bus for years on B/B+/2/3 models and that's all I've ever had to do as far as I can remember. Try powering down, unplug everything from the pins, and reboot. If the module is loaded you should get the dev node andi2cdetect -y 1
should work (but show nothing connected). If not something may be busted. Also double checkconfig.txt
to make sure nothing is overridden by multiple entries (and removedtparam=i2c1=on
).