[tech] Coke's down

Nick Bannon nick at ucc.gu.uwa.edu.au
Fri Mar 24 23:18:31 WST 2006


Anyone know what it takes to bring it up?

Standard tricks involve "rmmod 8250; modprobe 8250", running minicom to
set up the serial port (the coke machine is working fine interactively).

In response to the serial port writes, multiple blank lines are being
read back in...

Nick.

mermaid:/home/wheel/nick# strace -s 48 dispense finger coke
[...]
open("/dev/ttyS0", O_RDWR)              = 3
flock(3, LOCK_EX|LOCK_NB)               = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 opost isig icanon -echo ...}) = 0
[...]
...}) = 0
write(3, "d7\n", 3)                     = 3
read(3, "d7\n", 100)                    = 3
read(3, "\n", 100)                      = 1
read(3, "ok\n", 100)                    = 3
open("/var/coke/coke.conf", O_RDONLY)   = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=506, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0
read(5, "slots 7 16\nslot 0 86 null coke\nslot 1 73 lemonad"..., 4096) = 506
write(3, "n0        null coke\n", 20)   = 20
read(3, "\n", 100)                      = 1
read(3, "\n", 100)                      = 1
read(3, "\n", 100)                      = 1
write(3, "n1         lemonade\n", 20)   = 20
read(3, ":\n", 100)                     = 2
read(3, "\n", 100)                      = 1
read(3, ":n0        null coke\n", 100)  = 21
write(3, "n2   screaming soda\n", 20)   = 20
read(3, "\n", 100)                      = 1
read(3, "ok\n", 100)                    = 3
read(3, "\n", 100)                      = 1
[...]
munmap(0xb7fe8000, 4096)                = 0
write(3, "s\n", 2)                      = 2
read(3, ":n2mg soda\n", 100)            = 11
read(3, "\n", 100)                      = 1
read(3, "ok\n", 100)                    = 3
read(3, "\n", 100)                      = 1
read(3, "\n", 100)                      = 1
read(3, "\n", 100)                      = 1
read(3, ":\n", 100)                     = 2
read(3, "\n", 100)                      = 1
read(3, ":n3lon foo\n", 100)            = 11
flock(3, LOCK_UN)                       = 0
close(3)                                = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0
write(1, "The UCC Coke machine.\n", 22) = 22
write(1, "\n", 1)                       = 1
write(1, "Slot 0 has sold 922 drinks of type \204\372\377\277.\n", 41) = 41
write(1, "Slot 1 has sold 106 drinks of type \204\372\377\277.\n", 41) = 41
[...]

Nick.

-- 
   Nick Bannon   | "I made this letter longer than usual because
nick-sig at rcpt.to | I lack the time to make it shorter." - Pascal


More information about the tech mailing list