Installing RTC on Mifi - can't get it working


#1

Hi,

I am trying to retrofit our gl-mifi stock with RTC boards which I ordered from gl-inet.

I was sent instructions when I ordered, basically to solder on as in photo attached.

This looks like the way the way to RTC boards are soldered on to our newer stock that come from the factory pre-installed. The only difference is the model we ordered already has headers on the two rows of 5 pins.

I can’t get the mifi to detect the device at all even though I have installed all the same packages etc as I install on the ones we get from with RTC pre-installed.

Running I2C detect doesn’t find anything.

I’ve tried on a few different mifis and RTC boards just to be sure it’s not a faulty board.

I’m soldering all 9 pins to the board, I’m wondering if that is what I’m doing wrong. Which pins do I actually need to connect from the board to the mifi?

I’m pretty sure the model of RTC is SD3077.

Sorry, I’m not an expert on this so help appreciated.


#2

Seem you do the right way.

Which firmware version are you using for? Could you please upgrade to v3.009 and try those commands?

opkg update
opkg install kmod-i2c-gpio-custom
opkg install kmod-rtc-sd2068
insmod i2c-gpio-custom bus0=0,13,17
echo "i2c-gpio-custom bus0=0,13,17" > /etc/modules.d/i2c-gpio-custom
echo sd2068 0x32 > /sys/bus/i2c/devices/i2c-0/new_device
reboot

Here is all my steps.

root@GL-MIFI:/# opkg update
Downloading http://download.gl-inet.com/releases/kmod-3.0/ar71xx/generic/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_core
Downloading http://download.gl-inet.com/releases/packages-3.x/ar71xx/base/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_base
Downloading http://download.gl-inet.com/releases/packages-3.x/ar71xx/gli_pub/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_gli_pub
Downloading http://download.gl-inet.com/releases/packages-3.x/ar71xx/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_packages
Downloading http://download.gl-inet.com/releases/packages-3.x/ar71xx/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_luci
Downloading http://download.gl-inet.com/releases/packages-3.x/ar71xx/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_routing
Downloading http://download.gl-inet.com/releases/packages-3.x/ar71xx/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_telephony
Downloading http://download.gl-inet.com/releases/packages-3.x/ar71xx/glinet/Packages.gz
Updated list of available packages in /var/opkg-lists/glinet_glinet
root@GL-MIFI:/# opkg install kmod-i2c-gpio-custom
Installing kmod-i2c-gpio-custom (4.9.120-2) to root...
Downloading http://download.gl-inet.com/releases/kmod-3.0/ar71xx/generic/kmod-i2c-gpio-custom_4.9.120-2_mips_24kc.ipk
Installing kmod-i2c-core (4.9.120-1) to root...
Downloading http://download.gl-inet.com/releases/kmod-3.0/ar71xx/generic/kmod-i2c-core_4.9.120-1_mips_24kc.ipk
Installing kmod-i2c-algo-bit (4.9.120-1) to root...
Downloading http://download.gl-inet.com/releases/kmod-3.0/ar71xx/generic/kmod-i2c-algo-bit_4.9.120-1_mips_24kc.ipk
Installing kmod-i2c-gpio (4.9.120-1) to root...
Downloading http://download.gl-inet.com/releases/kmod-3.0/ar71xx/generic/kmod-i2c-gpio_4.9.120-1_mips_24kc.ipk
Configuring kmod-i2c-core.
[  336.165751] kmodloader: loading kernel modules from /etc/modules.d/*
[  336.183076] i2c /dev entries driver
[  336.194914] u32 classifier
[  336.196167]     input device check on
[  336.199811]     Actions configured
[  336.221557] kmodloader: done loading kernel modules from /etc/modules.d/*
Configuring kmod-i2c-algo-bit.
[  336.423351] kmodloader: loading kernel modules from /etc/modules.d/*
[  336.443092] kmodloader: done loading kernel modules from /etc/modules.d/*
Configuring kmod-i2c-gpio.
[  336.642956] kmodloader: loading kernel modules from /etc/modules.d/*
[  336.657537] kmodloader: done loading kernel modules from /etc/modules.d/*
Configuring kmod-i2c-gpio-custom.
root@GL-MIFI:/# opkg install kmod-rtc-sd2068
Installing kmod-rtc-sd2068 (4.9.120-1) to root...
Downloading http://download.gl-inet.com/releases/kmod-3.0/ar71xx/generic/kmod-rtc-sd2068_4.9.120-1_mips_24kc.ipk
Configuring kmod-rtc-sd2068.
[  349.575436] kmodloader: loading kernel modules from /etc/modules.d/*
[  349.593743] kmodloader: done loading kernel modules from /etc/modules.d/*
root@GL-MIFI:/# insmod i2c-gpio-custom bus0=0,13,17
[  352.360042] Custom GPIO-based I2C driver version 0.1.1
[  352.364370] i2c-gpio i2c-gpio.0: using pins 13 (SDA) and 17 (SCL)
root@GL-MIFI:/# echo sd2068 0x32 > /sys/bus/i2c/devices/i2c-0/new_device
[  360.536561] rtc-sd2068 0-0032: rtc core: registered sd2068 as rtc0
[  360.547823] i2c i2c-0: new_device: Instantiated device sd2068 at 0x32
root@GL-MIFI:/# 
root@GL-MIFI:/# 
root@GL-MIFI:/# 
root@GL-MIFI:/# hwclock -w
root@GL-MIFI:/# hwclock -r
Wed Feb 27 04:18:51 2019  0.000000 seconds

#3

Hi,

Sorry for delayed reply on this.

I have tried again, running the commands above and at latest firmware, still no success.

Please can you confirm my annotation of which pin is which on the RTC module?

I2Cdetect does not find anything at all when the RTC is connected. If I connect another RTC board I have (Tiny RTC) i2cdetect works fine.

I can’t work out what I am doing wrong.

Thanks


#4

One other difference is that my devices came from factory with 7 pins soldered into the 2 rows of 5 ports on the opposite side of the chip (as per my first picture). Could this make any difference? What is the VCC/GND/SDA/SCL configuration on these ports? I could test connecting to those instead of the ports at the bottom of the chip.