GL.iNet6416 and I2C RTC DS1307 AT24C32 RTC


Sorry for the weird formatting in my post–it wasn’t visible when I posted it. I’ve edited the post to remove the garbage.

I found the very interesting polish site you referred to and looked through it (using translation). I found and downloaded kmod-rtc-ds1307, but it wouldn’t install to my device with openWrt 15.05 because the kernel was slightly later. So I’m still looking for how to get a useful version. I may have to compile my own. Unfortunately, the build system I usually use is in another country.

Do you have any links to general usage of i2c on a microprocessor/router? I’m looking to use a MCP23017 to add more gpios.


Here looking as I have not in a while.


Firmware Version OpenWrt Chaos Calmer 15.05 / LuCI (git-15.309.32930-5511c29)

Kernel 3.18.23

I thought he posted the firmware for download. That said he either sent me the firmware or provided me with a link to the updated 15.05 firmware.

Relating to our communications it was all english and he did understand my writing just fine. Thinking I tested some 3 updates of the firmware at the time and the 3rd update worked. Looking at the emails and they are half polish and partially translated.

He sent me an updated firmware. I am surprised though that it is not on his site?

> Yes; it appears that the rtc-1307 module is not there.

Make upgrade with this firmware and install all required modules.

I can post it for download on Microsoft or Google…let me know what you can get to?

Do you have any links to general usage of i2c on a microprocessor/router? I’m looking to use a MCP23017 to add more gpios

Doing this on an RPi2 initially then the GliNet router and a couple of weeks ago I did tap in to an Intel motherboard which was originally designed as a cloud based tabletop (no CMOS and an EFI old bios ROM). The i2C chip traces were documented and I installed an RTC clock using tiny (hair sized) wires mini soldered then used hot melt glue drops and I am impressed that it works. (IE too utilize a hot air station these days). Originally though was going to connect an i2C slave but it used up too much space. (using a PFC8574)

IE: just looked at the chip nomenclature drawing and the traces had been documented. I did utilize a large magnifying glass though.





Thank you, petey,

I’ve managed to set the time and date on my super-cheap DS3132 RTC (similar to DS1307 but more accurate) one byte at a time with i2cset:

insmod i2c-gpio-custom bus0=0,20,19

i2cdetect -y 0

i2cset -y 0 0x68 6 0x16 b

i2cset -y 0 0x68 5 0x02 b

i2cset -y 0 0x68 4 0x12 b

i2cset -y 0 0x68 2 0x11 b

i2cset -y 0 0x68 1 0x28 b

i2cdump -y -r 0-7 0 0x68 b

Theoretically, i2cset can write multiple bytes, but I haven’t gotten that to work yet. I’m now playing with the AT24C32 i2c eeprom on the module with the DS3132, since if I can get that to work, I can probably get an MCP23017 to work, and also a picaxe X2 microprocessor, which has memory which can appear on the i2c bus as a 128-byte eeprom.


Very nice Iyzby!!!

Here I always mention baby steps…(one byte at a time with i2cset:)

BTW you will see a UU when the location on the i2c is being utilized.

Here it was adding a DS18A20 1-wire temperature sensor and making it work. The inside of the Gl dot Net never really gets very warm anyways. The traces and picture on the tiny dot RTC are backwards. That and the tiny dot RTC has a charging circuit. You can either remove the charging circuit or replace the battery with a lithium chargable battery.

Here is was more about getting it to work as I utilize internal NTP via a GPS/PPS NTP server and I prefer an ARM based device to get its start up time from an RTC with battery. I have the GPS in the attic today and it sees 12 GPS satellites which is pretty good I think.

You got me to look up the DS3132 RTC and I will probably use it the next time.

Hello Alzhao,

I am switching gears a bit here going to your MT series microrouter. Really though looking to play with the 7620 CPU.

That said I do want more CPU and more RAM. I almost didn’t wait and was just going to test with my Almond 2015 which uses 32Mb of flash and 128Mb of RAM. I still want more though and leaning instead to a MT7688 CPU which also runs at 580Mhz and has 32Mb of Flash and 128Mb of DDR RAM.

The above noted should I wait to purchase the MT300A? I prefer the play in the MT300N.

We will push our GL-MT300A into production soon, which has 128MB DDR and have a daughter board which can mount MicroSD card.

Will you be selling an MT300N version with the microSD card slot too? Will it ever include an RTC clock? I am in to time stuff if that makes any sense and do not get my time from the internet today; well now for over 10 years always utilized GPS satellites and an NTP server.

Ideally it would have two network ports, wireless, RTC with battery, more than 128Mb of ram (32 Mb of flash is OK but 64Mb would be better), GPIO connectivity (more is better for me) and smaller would be nice.

Lately here purchasing mostly from Amazon Prime and do not mind paying a bit more as long as I get it in two days.

I understand it is a holiday there right now and please have a nice holiday!

Kind Regards,



I got an MCP23017 16-bit i2c i/o expander working with the following:

i2cset -y 0 0x20 0x00 0x00 b

i2cset -y 0 0x20 0x01 0x00 b

i2cset -y 0 0x20 0x12 0x01 b

i2cset -y 0 0x20 0x13 0x20 b

These commands set port A and port B to all outputs, then turn on bit 0 of port A and bit 5 of port B.

I also was able to write to and read from a PICAXE 20X2 microprocessor set to act as an i2c slave with the first 128 bytes of its scratchpad memory acting like a 128-bit eeprom.

i2cdump -y -r 0-31 0 0x50 b

Shows first 32 bytes of scratchpad memory.

i2cset -y 0 0x50 0 0x61 b

Writes “a” to the first byte of scratchpad memory.


Just updated docs for DS1307:!mini/

Unable to find kmod-rtc-ds1307:


root@GL-AR150:~# opkg install kmod-i2c-gpio-custom
Installing kmod-i2c-gpio-custom (3.18.27-2) to root…
Downloading 404 Page not found - GL.iNet.
Installing kmod-i2c-gpio (3.18.27-1) to root…
Downloading 404 Page not found - GL.iNet.
Installing kmod-i2c-algo-bit (3.18.27-1) to root…
Downloading 404 Page not found - GL.iNet.
Configuring kmod-i2c-algo-bit.
Configuring kmod-i2c-gpio.
Configuring kmod-i2c-gpio-custom.
root@GL-AR150:~# opkg install kmod-rtc-ds1307
Unknown package ‘kmod-rtc-ds1307’.
Collected errors:

  • opkg_install_cmd: Cannot install package kmod-rtc-ds1307.

I compiled for you. Please use the attached one.

put it in your /tmp/


opkg update

opkg install /tmp/kmod-rtc-ds1307_3.18.27-1_ar71xx.ipk

Sorry but I can’t see the attachment

Where is it?


Thanks for the attachment but…


root@GL-AR150:/tmp# opkg install --force-depends /tmp/kmod-rtc-ds1307_3.18.27-1_ar71xx.ipk
Installing kmod-rtc-ds1307 (3.18.27-1) to root…
Configuring kmod-rtc-ds1307.
Collected errors:

  • satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-rtc-ds1307:
  • kernel (= 3.18.27-1-1c0c43d4908cead6b8d4cbd121ff39ce) *


@ru, I see. I will include this when compile new version firmware. Are you able to compile your own firmware?

I have tried it sometimes but always with no success

I also have notice that this fails

opkg install i2c-tools

and I think this worked on 2.13 version

@ru, please try this firmware: GL.iNet download center

kmod-rtc-ds1307 can be installed online. I am not sure where i2c-tools is.

You only need i2c-tools to view the connectivity. You can test the clock / 1-wire temperature functions without i2c-tools.

You can manually add i2c-tools by including download mirror. It should work just fine.