Kurobox NAS-Central Forums

Welcome to the Kuro Community
It is currently Fri Jul 20, 2018 8:12 am

All times are UTC-06:00




Forum locked  This topic is locked, you cannot edit posts or make further replies.  [ 79 posts ]  Go to page Previous 1 2 3 4 5 6 Next
Author Message
 Post subject:
PostPosted: Thu Sep 20, 2007 2:23 am 
Offline

Joined: Fri Oct 29, 2004 6:00 am
Posts: 91
Location: UK
phlegmer wrote:
It's like it's not touching Eventscript nor the avr_evtd config file at all. :?

It must be reading the config file, because you successfully changed the DEVICE to /dev/ttyS1.

I think the log file will only be created when an event occurs... I've just deleted the logfile and restarted avr_evtd on my Kuro - no new log has appeared. (I'm 15 miles away right now, so can't press the power button!)

You may like to run the program in non-daemon mode, to see if there's any other useful output:
Code:
avr_evtd -c

Oh, and what version are you using?
Code:
avr_evtd -v

Looking at the most recent version of the code ( v1.8 ) I can't find any reference to the "LOG" setting. I *think*, in this version at least, it logs to syslog instead of /var/log/avr_evtd.

I'm using v1.7.2.


Top
   
 Post subject:
PostPosted: Thu Sep 20, 2007 4:07 am 
Offline

Joined: Thu Jul 20, 2006 2:46 am
Posts: 82
Lardmonster wrote:
monkeyboy wrote:
cant get any output cus at work theyve blocked all outgoing except web , dang

I've found that a package called "http-tunnel" works extremely well :)

I run "hts" on the Kuro, and "htc" on my work machine. Then connect PuTTY to "127.0.0.1". Sneaky ;)


I was puttying with tunnels, but they've not blocked all outgoing ports except from the internal proxy, so i'll need to go via the proxy to port 80 at home, problem was i was browsing down it, and letting oter people use it too, they didnt like that.. do be do...

_________________
monkeyboy


Top
   
 Post subject:
PostPosted: Thu Sep 20, 2007 10:17 am 
Offline

Joined: Mon Mar 27, 2006 9:09 pm
Posts: 110
Lardmonster wrote:
It must be reading the config file, because you successfully changed the DEVICE to /dev/ttyS1.


Excellent observation!

What I should have said is that the EventScript doesn't seem to be touched since it is now changed to only create a hello temp file. (which it never does)

Lardmonster wrote:
You may like to run the program in non-daemon mode, to see if there's any other useful output:
Code:
avr_evtd -c



I'm not sure if I need to kill the daemon before running it with -c. When I type avr_evtd -c I get

Code:
>>>>ZZZZ


on the screen and nothing would respond. I had to open another instance in order to kill it.

Lardmonster wrote:
Oh, and what version are you using?


Code:
# avr_evtd -v
Linkstation/Kuro AVR daemon Version 1.7.2


Thanks for helping me resolve this!


Top
   
 Post subject:
PostPosted: Thu Sep 20, 2007 3:38 pm 
Offline

Joined: Fri Oct 29, 2004 6:00 am
Posts: 91
Location: UK
phlegmer wrote:
I'm not sure if I need to kill the daemon before running it with -c.
I did...
phlegmer wrote:
When I type avr_evtd -c I get
Code:
>>>>ZZZZ

Me too (but I started it with "avr_evtd -d /dev/ttyS0 -c"). And when I briefly press the power button...
Code:
>>>>ZZZZ
[avr_evtd]: Power Button Down[avr_evtd]: Power Button Up

At the same time, I see the following in "/var/log/avr_evtd.log":
Code:
Thu Sep 20 22:30:59 BST 2007 command is 4[0] for /dev/ttyS0
Thu Sep 20 22:31:00 BST 2007 command is 3[0] for /dev/ttyS0

Matthew


Top
   
 Post subject:
PostPosted: Fri Sep 21, 2007 7:32 am 
Offline

Joined: Mon Mar 27, 2006 9:09 pm
Posts: 110
OK, this time I stopped the daemon and tried starting it with "avr_evtd -d /dev/ttyS1 -c". I'm assuming that since mine was using ttyS1 that I should stick with it.

Got

Code:
>>>>ZZZZ


as before. This time I tried pressing the power button a couple times....nothing. There was no feedback at all on the SSH session. I didn't get any logs either.

Could the fact that mine is using ttyS1 be causing all this headache? It seems that everyone elses uses ttyS0.

Thanks


Last edited by phlegmer on Fri Sep 21, 2007 8:43 am, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Fri Sep 21, 2007 8:04 am 
Offline

Joined: Fri Oct 29, 2004 6:00 am
Posts: 91
Location: UK
phlegmer wrote:
OK, this time I stopped the daemon and tried starting it with "avr_evtd -d /dev/ttyS1 -c". I'm assuming that since mine was using ttyS1 that I should stick with it.

Got

Code:
>>>>ZZZZ


as before. This time I tried pressing the power button a couple times....nothing. There was not feedback at all on the SSH session. I didn't get any logs either.

Could the fact that mine is using ttyS1 be causing all this headache? It seems that everyone elses uses ttyS0.

Thanks

I don't know... this is starting to get beyond my understanding :)

If your machine is using ttyS1 then you should probably stick with it.

(To test, try "echo -n "WWWW" > /dev/ttyS1" then "echo -n "VVVV" > /dev/ttyS1" - the disk-full light should come on and go off. But, if the watchdog is being prodded correctly when using ttyS1, then this must be OK)

I don't know what the ">>>>ZZZZ" output means when running avr_evtd manually. If I were you, I'd probably upgrade to the latest version (1.8 I think) to see if that makes any difference.

http://downloads.nas-central.org/Users/ ... /avr_evtd/

Matthew


Top
   
 Post subject:
PostPosted: Fri Sep 21, 2007 8:56 am 
Offline

Joined: Mon Mar 27, 2006 9:09 pm
Posts: 110
Yeah, I was afraid that this problem may be too tough to troubleshoot over a forum setting. :(

I tried "echo -n "WWWW" > /dev/ttyS1" then "echo -n "VVVV" > /dev/ttyS1" as suggested. No light came on. Tried a few times just in case I missed it. For fun, I tried ttyS0. It didn't like that at all. The session hung so I had to ^c out.

Since the light never came on for me, does this tell us that there's an issue somewhere beyond avr_evtd?

Thanks!!


Top
   
 Post subject:
PostPosted: Fri Sep 21, 2007 9:38 am 
Offline

Joined: Fri Oct 29, 2004 6:00 am
Posts: 91
Location: UK
phlegmer, you might be better off speaking to the author of avr_evtd, "lb_worm" at nas-central.

http://forum.nas-central.org/memberlist ... ofile&u=17

Hope we've done enough investigation in this thread for him to have some ideas...

Alternatively, there's another thread in which Andre appears to be offering avr_evtd assistance.

Do keep the thread updated with your progress though - you might not be the only one who has problems like these :)

Matthew


Top
   
 Post subject:
PostPosted: Fri Sep 21, 2007 10:10 am 
Offline

Joined: Mon Mar 27, 2006 9:09 pm
Posts: 110
I took Andre on his offer and posted.

If anything comes of this, I'll update this thread.

Thanks all!


Top
   
 Post subject:
PostPosted: Sun Sep 23, 2007 4:35 am 
Offline

Joined: Fri Oct 29, 2004 6:00 am
Posts: 91
Location: UK
Hey phlegmer...

I've added a load more debuging to version 1.7.2 of avr_evtd. See http://insignificant.org/wiki/index.php ... r_evtd.zip

I'd be interested to see what (if anything) appears in /var/log/syslog.

(Note that the "make install" for avr_evtd stops the service, builds, installs and then restarts, so you'll need to "tail -f /var/log/syslog" while "make install"ing)

For your info, when it starts I see this:
Code:
Sep 23 11:23:43 blanco avr_evtd: main() about to call open_serial() for device /dev/ttyS1
Sep 23 11:23:43 blanco avr_evtd: Opening device /dev/ttyS1
Sep 23 11:23:43 blanco avr_evtd: Got read/write access to /dev/ttyS1
Sep 23 11:23:43 blanco avr_evtd: This is PPC box, so /dev/ttyS1 is being probed...
Sep 23 11:23:43 blanco avr_evtd: Returning 80004600
Sep 23 11:23:43 blanco avr_evtd: call to open_serial() succeeded
Sep 23 11:23:43 blanco avr_evtd: main() about to call open_serial() for device /dev/ttyS0
Sep 23 11:23:43 blanco avr_evtd: Opening device /dev/ttyS0
Sep 23 11:23:43 blanco avr_evtd: Got read/write access to /dev/ttyS0
Sep 23 11:23:43 blanco avr_evtd: writeUART called with A
Sep 23 11:23:43 blanco avr_evtd: writeUART called with F
Sep 23 11:23:43 blanco avr_evtd: writeUART called with J
Sep 23 11:23:43 blanco avr_evtd: writeUART called with >
Sep 23 11:23:43 blanco avr_evtd: Stop DISK LED flashing
Sep 23 11:23:43 blanco avr_evtd: writeUART called with X
Sep 23 11:23:43 blanco avr_evtd: open_serial() succeeded for device /dev/ttyS0
Sep 23 11:23:43 blanco avr_evtd: call to open_serial() succeeded
Sep 23 11:23:43 blanco avr-daemon[12014]: Linkstation/Kuro AVR daemon Version 1.7.2
Sep 23 11:23:43 blanco linkstation[12015]: Started daemon avr_evtd
Sep 23 11:23:43 blanco avr-daemon[12014]: Starting avr_evtd_main
Sep 23 11:23:45 blanco avr-daemon[12014]: Time-out event
Sep 23 11:23:45 blanco avr-daemon[12014]: writeUART called with >
Sep 23 11:23:45 blanco avr-daemon[12014]: writeUART called with Z
Sep 23 11:23:47 blanco avr-daemon[12014]: Time-out event
Sep 23 11:23:47 blanco avr-daemon[12014]: Pinging AVR
Sep 23 11:23:47 blanco avr-daemon[12014]: writeUART called with Z
Sep 23 11:23:49 blanco avr-daemon[12014]: Time-out event
And when I press and release the power button:
Code:
Sep 23 11:24:54 blanco avr-daemon[12014]: Received result 33 from AVR
Sep 23 11:24:54 blanco avr-daemon[12014]: Result is 'power button push'
Sep 23 11:24:54 blanco avr-daemon[12014]: Running /etc/avr_evtd/EventScript 4 /dev/ttyS0 0 &
Sep 23 11:24:54 blanco avr-daemon[12014]: Time-out event
Sep 23 11:24:55 blanco last message repeated 106 times
Sep 23 11:24:55 blanco avr-daemon[12014]: Received result 32 from AVR
Sep 23 11:24:55 blanco avr-daemon[12014]: Result is 'power button release'
Sep 23 11:24:55 blanco avr-daemon[12014]: Running /etc/avr_evtd/EventScript 3 /dev/ttyS0 0 &
I'd also like to see the result of running this version without the DEVICE parameter overriden in "/etc/defaults/avr_evtd".

Matthew


Top
   
 Post subject:
PostPosted: Mon Sep 24, 2007 10:54 am 
Offline

Joined: Mon Mar 27, 2006 9:09 pm
Posts: 110
WOW! I'm floored that you went through the trouble re-writing the code to include more logging. Which makes me even a bit more nervous that after this is all over, we'll discover that it was something stupid / obvious that I did to break it.

Anyway, I haven't gotten any responses yet on the other forum so I will give you suggestion a try.

Before doing so, let me just make sure I'm doing what you suggested correctly. I'm still a green Linux novice so bare with me.

Lardmonster wrote:
Note that the "make install" for avr_evtd stops the service, builds, installs and then restarts


This is good info to know. Did not know this before.


Lardmonster wrote:
so you'll need to "tail -f /var/log/syslog" while "make install"ing


So the syntax should be?:

Code:
make install | tail -f /var/log/syslog


Thanks much!


Top
   
 Post subject:
PostPosted: Mon Sep 24, 2007 11:06 am 
Offline

Joined: Fri Oct 29, 2004 6:00 am
Posts: 91
Location: UK
phlegmer wrote:
Lardmonster wrote:
so you'll need to "tail -f /var/log/syslog" while "make install"ing


So the syntax should be?:

Code:
make install | tail -f /var/log/syslog


Thanks much!

Erm, not quite ;-) I should have been clearer...

I'd open two ssh sessions. In one, run "tail -f /var/log/syslog", and in the other "make install". Then, when "make install" starts avr_evtd, you'll already be watching for startup messages.

The startup script (/etc/init.d/avr_evtd), when run on a PPC Kuro, runs avr_evtd in a test mode (with the "-i" flag) to try to probe the correct port. As far as I remember, this happens if you don't specify a DEVICE in the config file. That's why the program is started twice in the debugging output in my previous post.

(Oh, and don't be so amazed! Plenty of people have helped me - usually without knowing it, just through their posts here - so it's cool to give some assistance back. And if it was something daft or obvious, then don't worry. It just means that the Wiki and other documentation is lacking detail)

Matthew


Top
   
 Post subject:
PostPosted: Mon Sep 24, 2007 1:36 pm 
Offline

Joined: Mon Mar 27, 2006 9:09 pm
Posts: 110
Ahhh, now that I see what "tail" does, it makes more sense. Well, it would appear that the daemon is stuck in some sort of loop after doing a "make install". Take a look:

Code:
Sep 24 14:14:49 KUROBOX linkstation[2832]: Stopped daemon avr_evtd
Sep 24 14:14:49 KUROBOX avr_evtd: main() about to call open_serial() for device /dev/ttyS1
Sep 24 14:14:49 KUROBOX avr_evtd: Opening device /dev/ttyS1
Sep 24 14:14:49 KUROBOX avr_evtd: Got read/write access to /dev/ttyS1
Sep 24 14:14:49 KUROBOX avr_evtd: writeUART called with A
Sep 24 14:14:49 KUROBOX avr_evtd: writeUART called with F
Sep 24 14:14:49 KUROBOX avr_evtd: writeUART called with J
Sep 24 14:14:49 KUROBOX avr_evtd: writeUART called with >
Sep 24 14:14:49 KUROBOX avr_evtd: Stop DISK LED flashing
Sep 24 14:14:49 KUROBOX avr_evtd: writeUART called with X
Sep 24 14:14:49 KUROBOX avr_evtd: open_serial() succeeded for device /dev/ttyS1
Sep 24 14:14:49 KUROBOX avr_evtd: call to open_serial() succeeded
Sep 24 14:14:49 KUROBOX avr-daemon[2869]: Linkstation/Kuro AVR daemon Version 1.7.2
Sep 24 14:14:49 KUROBOX avr-daemon[2869]: Starting avr_evtd_main
Sep 24 14:14:49 KUROBOX linkstation[2870]: Started daemon avr_evtd
Sep 24 14:14:51 KUROBOX avr-daemon[2869]: Time-out event
Sep 24 14:14:51 KUROBOX avr-daemon[2869]: writeUART called with >
Sep 24 14:14:51 KUROBOX avr-daemon[2869]: writeUART called with Z
Sep 24 14:14:53 KUROBOX avr-daemon[2869]: Time-out event
Sep 24 14:14:53 KUROBOX avr-daemon[2869]: Pinging AVR
Sep 24 14:14:53 KUROBOX avr-daemon[2869]: writeUART called with Z
Sep 24 14:14:55 KUROBOX avr-daemon[2869]: Time-out event
Sep 24 14:15:35 KUROBOX avr-daemon[2869]: Time-out event
Sep 24 14:15:39 KUROBOX last message repeated 2 times
Sep 24 14:15:39 KUROBOX avr-daemon[2869]: Pinging AVR
Sep 24 14:15:39 KUROBOX avr-daemon[2869]: writeUART called with Z
Sep 24 14:15:41 KUROBOX avr-daemon[2869]: Time-out event
Sep 24 14:16:21 KUROBOX avr-daemon[2869]: Time-out event
Sep 24 14:16:25 KUROBOX last message repeated 2 times
Sep 24 14:16:25 KUROBOX avr-daemon[2869]: Pinging AVR
Sep 24 14:16:25 KUROBOX avr-daemon[2869]: writeUART called with Z
Sep 24 14:16:27 KUROBOX avr-daemon[2869]: Time-out event


....and it just keeps repeating

Code:
Sep 24 14:15:39 KUROBOX last message repeated 2 times
Sep 24 14:15:39 KUROBOX avr-daemon[2869]: Pinging AVR
Sep 24 14:15:39 KUROBOX avr-daemon[2869]: writeUART called with Z
Sep 24 14:15:41 KUROBOX avr-daemon[2869]: Time-out event
Sep 24 14:16:21 KUROBOX avr-daemon[2869]: Time-out event


One thing that I noticed is mine never gets probed like yours shows.

Also, when I press the power button, nothing happens other than the whole time-out event logs keeps coming up.

Does this help with the investigation?

Thanks!


Top
   
 Post subject:
PostPosted: Mon Sep 24, 2007 2:48 pm 
Offline

Joined: Fri Oct 29, 2004 6:00 am
Posts: 91
Location: UK
phlegmer wrote:
Ahhh, now that I see what "tail" does, it makes more sense. Well, it would appear that the daemon is stuck in some sort of loop after doing a "make install".

...

One thing that I noticed is mine never gets probed like yours shows.

True... but do you still have "DEFAULT=/dev/ttyS1" defined in the config file? If so, could you comment it out?

Then "/etc/init.d/avr_evtd restart" to restart the program.

(Explanation: if you have DEFAULT set in the config, then the startup scripts won't probe the serial ports. The probing code looks for a serial port at 80004500... the kernel boot messages you posted earlier indicate that it should be /dev/ttyS0)

Matthew


Top
   
 Post subject:
PostPosted: Tue Sep 25, 2007 7:24 am 
Offline

Joined: Fri Oct 29, 2004 6:00 am
Posts: 91
Location: UK
(Oh, and it's probably best to only use the 'extra-debug' version of avr_evtd for debugging. Don't leave it going day after day. I have a very large logfile now... ;-))


Top
   
Display posts from previous:  Sort by  
Forum locked  This topic is locked, you cannot edit posts or make further replies.  [ 79 posts ]  Go to page Previous 1 2 3 4 5 6 Next

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited