I got this SegFault too, on my new Domino OpenWRT.
The python script is :
import time
import smbus
MCP23017_DEVADDR = 0x20
bus = smbus.SMBus(0)
bus.write_byte_data(MCP23017_DEVADDR,0x00,0x00) # Set all of bank A to outputs
bus.write_byte_data(MCP23017_DEVADDR,0x01,0x00) # Set all of bank B to outputs
while 1:
bus.write_byte_data(address,0x13,0x80)
time.sleep(0.5)
bus.write_byte_data(address,0x13,0x00)
time.sleep(0.5)
It crash at the first write_byte_data ... :-(
The strace is showing :
open("/lib/libgcc_s.so.1", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=78632, ...}) = 0
close(4) = 0
open("/lib/libc.so.0", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=359583, ...}) = 0
close(4) = 0
open("/lib/libc.so.0", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=359583, ...}) = 0
close(4) = 0
open("/lib/ld-uClibc.so.0", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=28968, ...}) = 0
close(4) = 0
close(3) = 0
open("/dev/i2c-0", O_RDWR|O_LARGEFILE) = 3
ioctl(3, 0x703, 0x20) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
+++ killed by SIGSEGV +++
Segmentation fault
My version of OpenWRT is :
DISTRIB_ID="OpenWrt"
DISTRIB_RELEASE="Barrier Breaker"
DISTRIB_REVISION="r45620"
DISTRIB_CODENAME="barrier_breaker"
DISTRIB_TARGET="ar71xx/generic"
DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker 14.07"
DISTRIB_TAINTS="busybox"