June 15, 2024

Linkit Smart 7688 OpenWRT 18.06 and I2C

The I2C bus is a bus is used to interface with small sensor devices in a system. Recently I needed to collect data from an MCP3424 ADC using the Linkit Smart 7688. The Linkit ships with the OpenWRT CC 15.05 firmware which now is 3+ years old, so I wanted to use a more updated system. Lucky for me, OpenWRT just released 18.06 this month, the first release where OpenWRT and LEDE re-aligned. I installed the 18.06 firmware on the Linkit, however the default build doesn’t have the I2C drivers. Here are the steps to get the I2C bus working on OpenWRT 18.06 on the Linkit Smart 7688.

opkg update
opkg install kmod-i2c-code kmod-i2c-mt7628
lsmod (Ensure the new modules are is loaded)
ls /dev/ (List the devices in /dev)

After running the ‘ls /dev/’ command you should see the i2c-0 device listed. This device file controls the hardware connected to the SCL and SDA pins. Use the fopen, ioctl commands in C to control the port. WARNING: The Linkit I2C driver appears to always respond with a valid return integer. This is different than other drivers, which will respond with success for an ACK message and failure integers for a NACK message. Take a look at the elinux info on I2C here: https://elinux.org/Interfacing_with_I2C_Devices


Admin and creator of Protological.com

View all posts by Drew →

2 thoughts on “Linkit Smart 7688 OpenWRT 18.06 and I2C

  1. Hello
    How did you manage to install the 18.06 firmware on the Linkit Smart 7688?
    Firmware version 0.9.4 from Mediatek site works fine, but when I try to update via USB with image “openwrt-18.06.0-ramips-mt76x8-LinkIt7688-squashfs-sysupgrade.bin” (downloaded image “LinkIt7688-squashfs-sysupgrade.bin” from https://downloads.openwrt.org/releases/18.06.0/targets/ramips/mt76x8/), LinkIt just doesn’t work.
    The Wi-Fi LED lights up and doesn’t switch off, and there is no LinkIt in Wi-Fi connections.

    I renamed downloaded image as “lks7688.img”, than my actions was same as in tutorial from Mediatek “Update the firmware with a USB drive” (https://docs.labs.mediatek.com/resource/linkit-smart-7688/en/tutorials/firmware-and-bootloader/update-the-firmware-with-a-usb-drive).
    After about a minute or bit more the Wi-Fi LED lit and didn’t switch off. I cannot see LinkIt in Wi-Fi connections.

    Best wishes,

    1. Connect it up via serial with an FT232 or similar – 115200 bps. You will get the boot loader and root console screen there

Leave a Reply

Your email address will not be published. Required fields are marked *