Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 2 of 3 < 1 2 3 >
Topic Options
#81353 - 17/03/2002 16:43 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
errno 2

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81354 - 17/03/2002 16:44 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Putting your config file elsewhere would be an obvious solution.

You could also figure out how to wait for /drive0 to be mounted. If you figure it out, let me know, and I'll incorporate it into preinit so that folks in the future don't have to do the same thing.
_________________________
Bitt Faulk

Top
#81355 - 17/03/2002 16:46 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Yup that's ENOENT, no such file or directory. That happens when you run it from the shell too? That means your /drive0 must not be mounted, which is strange, it should at least be mounted readable when you're in the shell unless you explicitly unmount it...

What the heck is going on here?
_________________________
- Tony C
my empeg stuff

Top
#81356 - 17/03/2002 16:47 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
From the shell I don't get any error messages. But it doesn't seem like the app does anything because it isn't bound to Hijack.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81357 - 17/03/2002 16:48 Re: EmpWake - An Alarm Clock for Your Empeg [Re: wfaulk]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Putting your config file elsewhere would be an obvious solution.

Of course, but config.ini is the standard, and I like standards. Plus you can edit it from [j]?Emplode and such. I could just tell people to put options into a file in the same directory, but changing the defaults would be a pain.

I'm hoping that Mark decides to incorporate disk-writing into an upcoming hijack release, but he mentioned he's going to be busy for a while. For now I think I'm going to leave it in config.ini.

I guess I could just tell my program to sleep for 10 or 15 seconds to wait for everything else to load up, no? It's kind of a ghetto solution but it would work.

But Bruno said this was happening even from the shell, which is *really* confusing me. /drive0 should be there.
_________________________
- Tony C
my empeg stuff

Top
#81358 - 17/03/2002 16:49 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
From the shell I don't get any error messages. But it doesn't seem like the app does anything because it isn't bound to Hijack.

No printf()'s or errors when run from shell? No idea what's going on there. I'll look at it.

Are you at least getting "EmpWake v0.97 running as pid" and then a pid? Does that pid appear in a "ps" listing?


Edited by yn0t_ (17/03/2002 16:51)
_________________________
- Tony C
my empeg stuff

Top
#81359 - 17/03/2002 16:53 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Well, since config.ini must exist for the player to function properly, I see no problem with putting a stat() and an alarm() inside a loop waiting for it to exist.

Unless someone knows of a way of waiting on a filesystem to be mounted. getmntent() might be a good place to start, but, given that df, etc. don't work, getmntent() may not work, either.
_________________________
Bitt Faulk

Top
#81360 - 18/03/2002 14:33 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Hey would anyone care if I dropped the seconds from the alarm setting? I can't see any good reason why you'd need that much precision for an alarm clock. I'll leave the seconds display for the clock portion, but I don't think it should need to be specified. Comments?

Also, anyone think a "sleep" feature would be cool? Like here's what I was planning on:

1. It's late and you want to go to bed with some music. You queue up whatever playlist you want (yourself) and set a sleep timer (30 minutes, whatever.)
2. EmpWake puts your Empeg into standby when that time has elapsed.
3. If you've got an alarm set, it wakes you up with your alarm FID, or optionally just plays whatever song it was playing when it went into standby.

I was also planning on adding the ability to set the alarm volume so that you can go to bed with a nice soft volume and have it crank up for your alarm. Sound good?

No promises on when this stuff happens but these seem like useful ideas to me.

By the way, anyone made any progress on a nice InstallShield type thing for the Empeg? With the FTP server in Hijack this would seem really easy now... It's a pity that we're all writing these cool apps and the users who don't know their way around Linux are out of luck...
_________________________
- Tony C
my empeg stuff

Top
#81361 - 18/03/2002 14:39 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
I would suggest that a nice option would be on alarm to be able to ramp the volume up slowly, so that it doesn't wake you with a start.
_________________________
Bitt Faulk

Top
#81362 - 18/03/2002 14:41 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
By the way, anyone made any progress on a nice InstallShield type thing for the Empeg? With the FTP server in Hijack this
would seem really easy now... It's a pity that we're all writing these cool apps and the users who don't know their way around
Linux are out of luck...


This sounds like a perfect job for JEmplode. JEmplode takes a tar ball checks it for validity (simple stupidity check to ensure that it is an empeg app tar ball, perhaps looking for a zero-length file .empegapp), and puts it on the empeg.

This would allow Windoze and *nix users to use it.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#81363 - 18/03/2002 14:59 Re: EmpWake - An Alarm Clock for Your Empeg [Re: genixia]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
This sounds like a perfect job for JEmplode. JEmplode takes a tar ball checks it for validity (simple stupidity check to ensure that it is an empeg app tar ball, perhaps looking for a zero-length file .empegapp), and puts it on the empeg.

You skipped a few steps...

1. Prompt the user for an install location.
2. Optionally, depending on how the developer has configured the install to run, or based on user's choice, add a shell script to wfaulk's preinit thing so that it gets run on startup.
3 Provide a UI for setting configuration defaults and writing them to either the app's own config file (we'd need a standard, the INI standard is fine by me) or editing the config.ini itself. For my alarm clock, the "InstallShield" would ask the user "would you like EmpWake to automatically enable the alarm on startup?" and this would correspond to "active=true" being added to the config.ini.

But yeah JEmplode would be a nice place for this. Mike's pretty busy these days though. I'm a Java programmer but mostly with servlets and such, I've never done any Java application programming to speak of.
_________________________
- Tony C
my empeg stuff

Top
#81364 - 18/03/2002 15:01 Re: EmpWake - An Alarm Clock for Your Empeg [Re: wfaulk]
tms13
old hand

Registered: 30/07/2001
Posts: 1115
Loc: Lochcarron and Edinburgh
In reply to:

config.ini must exist for the player to function properly




That's not true - unless it's changed since 1.03?
_________________________
Toby Speight
030103016 (80GB Mk2a, blue)
030102806 (0GB Mk2a, blue)

Top
#81365 - 18/03/2002 15:01 Re: EmpWake - An Alarm Clock for Your Empeg [Re: wfaulk]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I would suggest that a nice option would be on alarm to be able to ramp the volume up slowly, so that it doesn't wake you with a start.

Duly noted. I thought about that but not at the time I was writing that post. I figure one volume step for every 15 seconds should suffice. I'll probably add a "start volume" and "max volume" and have it step in between those two for wakeup.
_________________________
- Tony C
my empeg stuff

Top
#81366 - 18/03/2002 20:09 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Since no one else has mentioned it, I agree with all the suggestions you've made. Go for it. I was going to ask you to consider removing the seconds as well. I can see their use, but it's extreme-niche at best. Makes it so you can store the alarm time in less space too. 2 vs 3 bytes (11bits vs.17bits minimal anyway).

Any more progress on the config.ini thing affecting me yesterday? Just wondering why Hijacks gets access to the config file without a problem and your app doesn't...

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81367 - 18/03/2002 20:16 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Any more progress on the config.ini thing affecting me yesterday? Just wondering why Hijacks gets access to the config file without a problem and your app doesn't...

Well, no. You didn't respond to my last message asking if you get *any* printf outputs when you run it from a shell. You should *at least* get "EmpWake running as pid" and, if it's not binding to hijack, some kind of error printout. Nobody else seems to have any problem running it from a regular shell.

As for running from the preinit thing, I don't know how I'll solve that. The easy solution is to have my own ini file that can be placed in the program's current directory, but I kinda liked the ability to edit config.ini via Emplode or similar.

Since it's a two minute hack, I can provide a command-line override to look for the empwake options in another file. So that should get us around the drive0/drive1 not mounted at boot problem. As for why you can't run it from the shell, I'm stumped, you really need to tell me more about what's going on there.
_________________________
- Tony C
my empeg stuff

Top
#81368 - 18/03/2002 20:21 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14481
Loc: Canada
Why not just have it (1) try to open /empeg/var/config.ini, and (2) if that fails, sleep(2) and loop back to (1), repeating until it doesn't fail.

-ml

Top
#81369 - 18/03/2002 20:25 Re: EmpWake - An Alarm Clock for Your Empeg [Re: mlord]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Why not just have it (1) try to open /empeg/var/config.ini, and (2) if that fails, sleep(2) and loop back to (1), repeating until it doesn't fail.

That's what I mentioned doing earlier in the thread... But I thought there might be a way for the preinit thing to wait until the drives are mounted before doing its work. Then all apps started from preinit would have access to /drive0 and /drive1. That could be even more important if we want to install some userland apps on those drives, which people might want to do since (a) the root partition isn't that large and (b) it gets wiped when upgrades happen. There's really no standard for where to keep user apps (I've suggested the empty hda2, a nice 32MB partition that's not really used for anything else) but by default that partition isn't doing anything, so most users don't use it for anything.

I'll try implement the sleep thing in the next release. I haven't even tried Bitt's preinit thing yet but maybe now is a good time to try it out.
_________________________
- Tony C
my empeg stuff

Top
#81370 - 18/03/2002 20:32 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
I didn't see the message about the printfs until just now.

But, the answer is exactly the same as what I posted yesterday. I get the first line showing PID, but no error messages from the command line.

How do you have your own installation launching at startup? Let me know how you've got yours configured and I'll duplicate it and get back to you.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81371 - 18/03/2002 20:50 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
[How do you have your own installation launching at startup? Let me know how you've got yours configured and I'll duplicate it and get back to you.

I have been calling the "picker" app by rexkp (his server seems to be down right now) from Frank van Gestel's userinit. That allowed me to use front panel buttons to run various programs depending on what I needed. Empwake is one of those.

I just dropped in Bitt's preinit.d thing Try adding this line to the shell script that's calling EmpWake:


/bin/mount -n -o nocheck,ro /drive0
/usr/local/bin/empwake


.

The second line should point to wherever your EmpWake is. If you explicitly mount drive0 before EmpWake, you should be fine (I just tried it.)

I still have *no idea* why it's not running from your shell. I have error messages checking the return calls from virtually every Hijack ioctl. I'll try to add some more, but if you get this preinit thing working, you should be fine.
_________________________
- Tony C
my empeg stuff

Top
#81372 - 18/03/2002 21:10 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
After modifying the shell script to include the line you posted, my unit now takes about 20-25 seconds to boot. It sits there building the database... When it's done, empwake is not in the Hijack menu.

Looking through serial, it reports I have a database size mismatch error...

Do you have only a SINGLE drive system? Mounting /drive0 in the preinit with the above line, prevents the player from finding and mounting my second disk, causing the database error.

Ok, next suggestion?

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81373 - 18/03/2002 21:14 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
After modifying the shell script to include the line you posted, my unit now takes about 20-25 seconds to boot. It sits there building the database... When it's done, empwake is not in the Hijack menu.

WTF??? No I have two drives but I don't have any problem with the 2nd drive mounting when I put that line in my shell script. I guess it's because my "init" calls a "userinit" shell script which takes care of mounting my drives before the player starts.

Mount both /drive0 and /drive1 and see if that helps. I never had any database rebuilding problems.

Even with that in mind, EmpWake should have bound to your Hijack menu. If it hasn't then something is really screwed up.
_________________________
- Tony C
my empeg stuff

Top
#81374 - 18/03/2002 21:25 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Just let me know how to mount /drive1. You can't just mount it with the line you posted for /drive0. There's no /drive1 entry in /etc/fstab or /etc/mtab (error returned from mount).

Damn, hyperterminal is the poorest piece of crap excuse for a terminal to have ever been made. What a complete piece of junk. I wish for any of the terminals I used to use on the Amiga damn. Have to get back a simple nice VT100 term I was using a few years ago. Argh.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81375 - 18/03/2002 21:38 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
CRT/SecureCRT are the best Win32 terminal emulators I've used, but they're not free. TeraTerm is free, and, while it's not the best thing available, it doesn't have most of the annoying quirks that HyperTerminal does. (Ever noticed that MS licensed HT from someone else? It isn't even just a PoS MS application.)
_________________________
Bitt Faulk

Top
#81376 - 18/03/2002 21:55 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Just let me know how to mount /drive1. You can't just mount it with the line you posted for /drive0. There's no /drive1 entry in /etc/fstab or /etc/mtab (error returned from mount).

Well put an entry there.

#
# /etc/fstab
#
# <device> <mountpoint> <filesystemtype> <options> <dump> <fsckorder>
/dev/hda5 / ext2 defaults,ro 1 1
/dev/hda4 /drive0 ext2 defaults,ro 1 1
/dev/hda2 /usr ext2 defaults,ro 1 1
/dev/hdc4 /drive1 ext2 defaults,ro 1 1
none /proc proc defaults


.
Then you should be able to mount it with that command. If that STILL fails, try this:


/bin/mount -n -o remount,nocheck,ro /dev/hdc4 /drive1

.
Note that drive1 might be hdb4 on yours, it's hdc4 on mine. If so, adjust accordingly.
_________________________
- Tony C
my empeg stuff

Top
#81377 - 18/03/2002 21:57 Re: EmpWake - An Alarm Clock for Your Empeg [Re: wfaulk]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
About 5 seconds after posting the message I was looking through my old backup drive copy and I found an archive with TeraTerm (first 2.0 version from 96). Runs fine and does what I need it to do. Phew. I'll try the latest version but I didn't feel like a 900KB download tonight. (Which reminds me, I have to install jemplode, my last 900KB download... )

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81378 - 19/03/2002 19:43 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
So Bruno did this end up working out for you???
_________________________
- Tony C
my empeg stuff

Top
#81379 - 22/03/2002 18:26 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Been away Tony, haven't had the time to check it out. Also didn't see your reply until just now. Which is weird because when I clicked on the thread it skipped to the bottom and I had to scroll back up manually...

If I don't still have a headache later tonight, I'll give it a shot. Otherwise I'll check it out this weekend. BTW, I don't grok manual drive mounting in linux, so that's for posting that entry. I haven't manually mounted a drive since using an Amiga (and that was a long time ago).

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81380 - 22/03/2002 18:44 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
If I mount the drives in the preinit before, then booting happens properly, BUT, empwake does not bind to the hijack menu.

On the serial port, there is no error from empwake either. Just the single line saying was process ID it received when starting.

And, again, WITHOUT mounting the drives, I get errno2 (Can't readconfig.ini)

I'll ask again in case you missed it (and b/c I'm curious) - how does Hijack find and read the config file?

Next of course is why on earth we'd be getting different behaviour with basically the same hardware setup. Discounting drive startup times of course - maybe you can build a version with that delay to test for this...

On second thought, I just remembered that I aldo dont' get the program to bind when running it from the shell prompt myself. Argh. Very odd. Any more debug output you care to test with? Or some other sample program for testing puposes only?

Bruno


Edited by hybrid8 (22/03/2002 18:46)
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#81381 - 24/03/2002 21:59 Re: EmpWake - An Alarm Clock for Your Empeg [Re: hybrid8]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I'll ask again in case you missed it (and b/c I'm curious) - how does Hijack find and read the config file?

Not sure what you're asking here. The drives are mounted at that point so Hijack has no problem. I have no idea why it's not binding to your Hijack menu and I'm out of ideas. I can try to stick some more trace debug lines in but I won't get to it for a few days as I just got back into town and have a lot of catching up to do in other areas. I'll let you know though.
_________________________
- Tony C
my empeg stuff

Top
#81382 - 03/04/2002 13:54 Re: EmpWake - An Alarm Clock for Your Empeg [Re: tonyc]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
I finally got around to install empwake (after deciding on Tchaikovsky's 1812 Overture as the ideal wake-up tune), and I can't get it to work. I tried starting it manually and as 'M' script from preinit.d (that is, one of those starting only after config.ini is available). It starts, reports its PID and silently dies. There are no traces of it in Hijack menu. Any ideas? BTW, is FID in config.ini hex od decimal (I tried both)?
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
Page 2 of 3 < 1 2 3 >