Unoffical empeg BBS

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

Page 1 of 3 1 2 3 >
Topic Options
#65767 - 02/02/2002 08:52 Hybrid8's Hosts File Idea (rubbing the lamp)
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31569
Loc: Seattle, WA
Over in another forum, Hybrid8 had a great idea. I don't have the time to invest in creating this piece of software, but I'd like to see if anyone else wants to tackle it. For me, it would need to be a Windows implementation, I'm not sure whether Hybrid8 would need it under Windows or under Linux.

The idea:

Some of us plug our empegs into DHCP networks. In many cases, dynamic DNS is not supported. In fact, both of the networks I plug into are DHCP but without dynamic DNS. So my empeg does not resolve to a name.

Since the player's IP address changes on every boot, and we can't resolve it to a host name, we can't easily run certain third-party ethernet utilities. For example, if we want to connect to Mark Lord's HTTP interface with our web browser, we first need to run Emplode and transcribe the IP address shown in the discovery dialog box.

Bruno's simple idea was as follows:

For me, a simple solution would be a small app that would find out what the empeg's assigned IP is, and toss it into my HOSTS file along with an alias.

This can be done!

There's already some open-source code for discovering players on the network with a broadcast. It's part of the Emptool and Jemplode sources. You could run this broadcast without displaying a user interface, and simply grab the IP of the first player you found that matches your criteria (more below). Throw that into the hosts file with a predetermined name.

One thing, though: You would have to spec what the player's configured name was. Reason: There might be more than one player on the network. For instance, on my home network, Jemplode finds both the Jupiter and the Empeg, and you can never be sure which one shows up in the discovery dialog first. So I would have to be able to spec that this program only grabs the IP for a player named "Tony's Mark 2".

The other thing you'd have to spec to this program is what you want the player's ethernet hostname to be. For instance "empeg.mynetwork.com".

But those are the only two inputs the program would need, and then it could append/replace that data in the hosts file. By the way, it should handle a large hosts file... mine is huge because I'm doing the trick where you fill your hosts file with known ad-server names and resolve them to 127.0.0.1 (works great by the way).

Then I could put this program in my startup group or on my desktop, and after it runs, I should be able to connect to my empeg by name.

So, anyone want to tackle this?
_________________________
Tony Fabris

Top
#65768 - 02/02/2002 10:03 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tfabris]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
First, let me start at the end...

Tony, mind passing me the bulk of the AD server host names from your HOSTS file? This is an awesome idea and I don't know why I didn't think of it. My hosts file had only one item in it: a remaping of an NNTP server.

Other than checking on player name to distinguish players, it would (I suspect) also be possible to identify individual players based on their hardware address. During setup of this small app, it would be nice for it to display this, allowing you to configure the mapping. Right now it's available (along with the fixed or assigned IP address) on the Player's About menu screen - it scrolls by too fast for me

I'd also need this little program for Windows. Ideally, once configured, I'd like to be able to just launch it with a double-click or from a toolbar. It should do its business and end itself transparently. Not popping up any dialogs. For configuration, it might be able to support a command line switch to cause a dialog to come up identifying the players and letting you fill out the needed information. Or we could just put that information manually into a config text file next to the executable.

I'd probably prefer it to use a small text file for its config, not the registry, and hopefully it won't have any dependencies on any dlls or other files.

Lastly, thanks for bringing this up in here.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65769 - 02/02/2002 10:31 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tfabris]
Yang
addict

Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
I made an attempt to compile the emptool under cygwin (latest as of yesterday) and ran into lots of imcompatibilities. Perhaps I have BUILD or ARCH defined wrong, but I'm getting lots of compile errors, and my C++ skills aren't as sharp as they used to be. I was thinking of trying to decypher what the discovery code was doing and somehow port this to annother language that would be cross-platform compatible (as this C++ aparently isn't under my environment)..

Top
#65770 - 02/02/2002 11:29 empeg protocol [Re: Yang]
Jazzwire
addict

Registered: 09/06/1999
Posts: 483
Loc: Guernsey
Has anyone produced a description of the empeg protocol?
I've spent countless hours looking at the source to emptool and Jemplode, but I don't read Java or C++ very well, so haven't got very far.

I tried to compile emptool so I could work through the connection stuff, but it won't compile for me in windows either... (Well, that's not quite true, it compiles, but doesn't do anything when run)

So, what I'm requesting is a high level description of the empeg ethernet protocol (I send X on port A, and expect Y on port B kind of stuff...)

Anyone got anything I can use?
_________________________
Jazz (List 112, Mk2 42 gig #40. Mk1 4 gig #30. Mk3 1.6 16v)

Top
#65771 - 02/02/2002 12:19 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31569
Loc: Seattle, WA
Tony, mind passing me the bulk of the AD server host names from your HOSTS file? This is an awesome idea and I don't know why I didn't think of it.

Did you by any chance try clicking on the highlighted word "TRICK" in the message I just posted?
_________________________
Tony Fabris

Top
#65772 - 02/02/2002 12:21 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tfabris]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Damn you.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65773 - 02/02/2002 12:25 Re: empeg protocol [Re: Jazzwire]
mcomb
pooh-bah

Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
So, what I'm requesting is a high level description of the empeg ethernet protocol

As far as I know nobody has done that, but I may be able to point you in the right direction in the JEmplode sources. Take a look at org/jempeg/empeg/protocol/NetworkEmpegDiscoverer.java it sends a broadcast UDP packet containing "?" to the network on port 8300. Any empegs on the network send a packet back that includes a name and id (I assume you can select an empeg based on one of those values).

Actually I may have some perl code floating around that does this as well (trying to find out why an older version of jemplode would not find my player) if anybody wants it.

-Mike
_________________________
EmpMenuX - ext3 filesystem - Empeg iTunes integration

Top
#65774 - 02/02/2002 12:40 Re: empeg protocol [Re: mcomb]
Jazzwire
addict

Registered: 09/06/1999
Posts: 483
Loc: Guernsey
If you've got something in perl, that would be great... =)

I got as far as broadcasting "?" over udp to port 8300, but so far I'm not getting any reply (at least none I can see). I was confused in the java code that it started using the PROTOCOL_TCP_PORT constant (also 8300) to open a new socket connection. Am I supposed to open a TCP server on 8300 for the empeg to reply to, or is that constant used for something else?
_________________________
Jazz (List 112, Mk2 42 gig #40. Mk1 4 gig #30. Mk3 1.6 16v)

Top
#65775 - 02/02/2002 14:59 Re: empeg protocol [Re: mcomb]
Yang
addict

Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
Sadly, I'm a better perl programmer than I am C or C++.. So some perl source would be awesome.. I also never have to worry about cross-compilation.. Heck, I couldn't even get the cross-compiler to work in Mandrake 8.1..

Top
#65776 - 02/02/2002 15:44 Re: empeg protocol [Re: Jazzwire]
mcomb
pooh-bah

Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
If you've got something in perl, that would be great... =)

OK, attached is a bit of perl to get you started. I am not a very good perl programmer so it is ugly. This sends a UDP packet to a given IP and dumps the response out. Set the variables $local_host and $remote_host near the top to your computers IP and your empegs IP address and you will get back the empegs name and ID. You are on your own getting broadcast to work since I am not sure how to do that in perl.

-Mike


Attachments
64296-test.pl.txt (136 downloads)

_________________________
EmpMenuX - ext3 filesystem - Empeg iTunes integration

Top
#65777 - 02/02/2002 15:54 Re: empeg protocol [Re: mcomb]
Jazzwire
addict

Registered: 09/06/1999
Posts: 483
Loc: Guernsey
Thanks, I'll give that a go.
_________________________
Jazz (List 112, Mk2 42 gig #40. Mk1 4 gig #30. Mk3 1.6 16v)

Top
#65778 - 02/02/2002 16:02 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tfabris]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Anybody got the Cygwin libraries? I've written a small program that should do what you want but I need somebody to test it.

There's a bug in it that sometimes it doesn't find the player. I'm not sure if it's just my weird network configuration or what.

- Trevor

Top
#65779 - 02/02/2002 16:13 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
I've got cygwin installed. Along with gcc (working at least for basic stuff). Fire away and I'll try out your program.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65780 - 02/02/2002 16:26 Re: Hybrid8's Hosts File Idea (rubbing the lamp) *DELETED* [Re: hybrid8]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Post deleted by tman

Top
#65781 - 02/02/2002 16:38 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Seems to be working for me. I had my empeg on a static address, so I'm reconfiguring it for dynamic. For some reason the disk integrity is being checked while syncing (even though I have Hijack set to disable that). This is going to be a while.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65782 - 02/02/2002 16:43 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
I think it's just XP as per usual. My network configuration is really flakey in XP and I've also got troubles with dialup not disabling the interface when I've disconnected so it screws up my ethernet.

I've tested it again and it works properly now. I'll add the hosts bit now.

- Trevor

Top
#65783 - 02/02/2002 17:04 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
Works here!
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#65784 - 02/02/2002 17:31 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Holy crap. After a 45 minute (at least! I was also encoding mp3s in the background...) config check with emplode I was finally able to power cycle my player. Seems to be working fine with dynamic IP. First shot's the charm each time.

I'm looking forward to seeing the next version when you have the HOSTS writing done. Are you going to go with an intermediate step and just support a single player? If you keep the program completely command-line driven it can still work well. A simple command like to spec multiple players and any additional players that are found could (should) be be nound with a default name.

Then it's just a matter of making a shortcut to your program with the needed command line options and putting it somewhere convenenient (for me, that's next to my dialing button in one of my tool bars )

BTW, how do you find out what your broadcast IP would be on a corporate LAN?

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65785 - 02/02/2002 17:32 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
number6
old hand

Registered: 30/04/2001
Posts: 745
Loc: In The Village or sometimes: A...
Works fine on my XP system, but only reports the first empeg that answers - is this the way it works?
[If I run it multiple times then the other empeg on my lan answers sometimes].

Top
#65786 - 02/02/2002 17:51 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: number6]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Yeah. That's the way it works. If you want it to listen until it times out then give it the -s argument with an invalid serial number. I haven't tested this bit since I've only got 1 empeg but it should work.

There should be help in the program

- Trevor

Top
#65787 - 02/02/2002 17:54 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
I think I'll keep it that it only does 1 empeg at a time. Specifying the arguments could get quite complicated otherwise. I may change this later on though if you really want it.

You should be able to work out what the broadcast address is by typing ipconfig.

Anyway, I'm nearly done. Just tidying up a little and testing at the moment.

- Trevor

Top
#65788 - 02/02/2002 18:02 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
One unit is fine for me. My brother also has one, but it's never been on the network at the same time as mine yet. I was mostly thinking of others who have a whole collection of empegs connected at once.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65789 - 02/02/2002 18:31 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Okay. I've finished now and it seems to work for me.
Before using it PLEASE backup your hosts file first!

This is what you should run:

findempeg -s40103318 -hc:\windows\system32\drivers\etc\hosts -nempeg

findempeg -? should give you the options it takes

Please tell me if it works!

- Trevor


Attachments
64348-findempeg.exe (72 downloads)


Top
#65790 - 02/02/2002 19:24 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Error Starting Program
"A required .DLL file, CYGWIN1.DLL, was not found."
_________________________
--The Amigo

Top
#65791 - 02/02/2002 19:28 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: TheAmigo]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
That might explain why Trevor wrote:
    Anybody got the Cygwin libraries? I've written a small program that should do what you want but I need somebody to test it.


You'll need the cygwin dll (perhaps more than one) or the source code to recompile for windows.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65792 - 02/02/2002 19:28 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: TheAmigo]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
You need the Cygwin dll to run it. It's here

- Trevor

Top
#65793 - 02/02/2002 19:43 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Seems to be working quite well for me with the one player.

Will running it with only the broadcast address now id all players on the network? Even though it only supports command line options for one player, it would be nice to be able to just get back the id info for all.

The only problems I've had are with a HUGE (200k+) hosts file. When activating a change, the whole file seems to get reparsed by windows and this causes a major slow-down of my entire machine. While the file is being processed by windows your program obviously can't get a lock on it to make its modifications.

I'll see how it all works out after a reboot as this will more closely mimic my normal operation.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65794 - 02/02/2002 19:51 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Well. It IDs them until it can't find anymore or it finds the one it's looking for. It's easy enough to make it continue to display them though. I'll make a v1.1 later on with it.

I'll have a look at any way of getting around that problem about large files. At the moment it just creates a new file and then moves it over.

How long does this slow down last BTW?

- Trevor

Top
#65795 - 02/02/2002 19:57 Re: empeg protocol [Re: mcomb]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Here's mod mods to the perl version.

This version doesn't need to know the IP of your empeg or the local host. To make up for not knowing the empeg's IP before you start, it prints the IP that it gets the response from.

Disclaimer: I've never programed for sockets before so while I know the theory, I don't know the implimentation details and found the snippets that I added on the web.... they may be wrong, but seem to work for me.

Bugs: I get the following error:
Use of uninitialized value at /usr/lib/perl5/5.00503/i386-linux/Socket.pm line 298.

Not sure why, maybe someone else can point out the problem.

Still needed: a timer. Have it quit waiting after a few seconds.

Untested: I only have one empeg... does it work as expected with multiple?


Attachments
64371-empegfinder.pl (171 downloads)

_________________________
--The Amigo

Top
#65796 - 02/02/2002 20:09 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
I think with the partial add-blocking list I got from the URL Tony posted, it takes a few minutes to process.

I've trimmed down my hosts file to pretty much nothing to do some testing. I've made a shortcut and it pops up a window for only a split second. Excellent.

After I reboot I'll put back the large hosts file and check out the impact. The moving/recreation of the hosts file is what may be causing it to re-initialize the entire list. That may be a limitation of the way the whole thing works though. I'll test it by adding one line with a text editor and see if the whole thing slows down again.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65797 - 02/02/2002 20:28 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Okay. I've changed it so that it just edits the file now without moving and creating stuff.

Before using this version you MUST remove any lines previously added with the old version. Otherwise "Bad Things Will Happen" (tm)

Added the -i argument to attempt to ID all the players as well.

Tell me how this one goes

- Trevor


Attachments
64376-findempeg.exe (32 downloads)


Top
#65798 - 02/02/2002 20:50 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
jimhogan
carpal tunnel

Registered: 06/10/1999
Posts: 2591
Loc: Seattle, WA, U.S.A.
hybrid8: Other than checking on player name to distinguish players, it would (I suspect) also be possible to identify individual players based on their hardware address

In the ugly-but-doable department (sorry if this has already been thrown out and I missed it), one cheap way to do some of this (say if you're talking about a single local subnet) would be to set a script to progressively ping across the entire network address range and pipe an arp -a to grep for your MAC address. Script exits the ping loop when it finds the desired match and cats the IP address back to /etc/hosts.

Any help? (Someday I'll learn sed/awk for this kind of stuff!)
_________________________
Jim


'Tis the exceptional fellow who lies awake at night thinking of his successes.

Top
#65799 - 02/02/2002 20:52 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Very nice. Still working quite well. This method may very well be producing faster results. I've put back the large hosts file.

How about compiling a version under windows that won't need the cygwin dll? I don't plan on removing cygwin, but not requiring it will open the door to a lot more people. In case you're thinking of asking me to compile it for you, I don't have a compiler installed right now except gcc with cygwin.

It might be a good idea to put this up at riocar.org. Right now it's doing everything I wanted this app to do. THANKS!

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65800 - 02/02/2002 21:31 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
I don't have another compiler as well I'll have to see if I can port it to MinGW. I've packaged it with the DLL anyway.

I'm trying to make a Linux version but it doesn't like me trying to broadcast a UDP packet for some reason. I'll have to see what I'm doing wrong.

Anybody want any other features added?

I've put it up on my webpage if anybody else wants it. It's here. Who do I ask to put it on riocar.org?

- Trevor

Top
#65801 - 02/02/2002 21:46 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Ask Drakino.

I just messaged him, but he might be off playing a game or something. Probably off crashing new graphics drivers...

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65802 - 02/02/2002 22:02 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Did you set SO_BROADCAST?

Suggestion: send the broadcast out to 255.255.255.255 rather than the official broadcast for the current subnet. This requires less interaction from the user. Routers aren't going to pass the broadcast off the subnet anyway... just makes coding (and using) a bit simpler.
_________________________
--The Amigo

Top
#65803 - 02/02/2002 22:23 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: TheAmigo]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Yup. I do set SO_BROADCAST. It does kind of work in Linux if you do what I've been doing so far and just broadcast on the network broadcast address. I don't know why it doesn't work for 255.255.255.255 though which is what's been puzzling me. I need to run Ethereal to see if it's actually sending it out properly.

I'll change the default broadcast address to 255.255.255.255 in the next version.

Thanks for the help though

- Trevor

Top
#65804 - 02/02/2002 22:37 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Are you coding in C? Would you like a second set of eyes to read the code?
_________________________
--The Amigo

Top
#65805 - 02/02/2002 22:52 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Well, the new drivers didn't crash yet.

But anyhow, any user can go to riocar.org and submit a web site or download to be added to the database. This is the method I prefer actually, unless it needs to be hosted as well.

Top
#65806 - 03/02/2002 00:53 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31569
Loc: Seattle, WA
Even though it only supports command line options for one player, it would be nice to be able to just get back the id info for all.

Back off, man, that's outside my specification.

I call feature creep.
_________________________
Tony Fabris

Top
#65807 - 03/02/2002 01:18 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31569
Loc: Seattle, WA
Tman, your handle is appropriate, as you are THE MAN. I just tried this (after locating a loose copy of cygwin1.dll) and it works like a freaking charm. It does exactly what we needed it to do. I can now connect to my empeg by name on my network, it is freaking brilliant. WOW.

And there were parameters you put in there that I didn't know I needed, like the address of the broadcast subnet. I had to change it from the default as my subnet was one digit off. Worked perfectly. WOW.

(Wiping tear from eye) I love you guys. You're the best. (Sniff.)
_________________________
Tony Fabris

Top
#65808 - 03/02/2002 03:45 Re: empeg protocol [Re: TheAmigo]
mcomb
pooh-bah

Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
Here's mod mods to the perl version.

Does this work on unix? I tried sending to the broadcast address and it failed for me (on FreeBSD and OS X) with some sort of permission denied error.

Just curious,
-Mike
_________________________
EmpMenuX - ext3 filesystem - Empeg iTunes integration

Top
#65809 - 03/02/2002 08:27 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tfabris]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Glad to see you're happy

I've compiled it for Linux now. It's at the webpage here

I've changed it to now use 255.255.255.255 as the default broadcast address so you shouldn't need to even specify it now. But you can if you still want/need to.

It can also give a default name to all of the empegs it finds on the network. It consists of the serial number appended to empeg- so for mine it's empeg-40103318. Call findempeg with -i as an argument and tell it where the hosts file is.

This is in addition to the old stuff where it will name a specific empeg with a given name.

I'll add multiple name support later for all the people lucky enough to have more than 1 empeg device on their network

- Trevor


Attachments
64476-findempeg.exe (26 downloads)


Top
#65810 - 03/02/2002 08:29 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: TheAmigo]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Yeah. I'm writing it in C. I think I've squashed the bug anyway.

Thanks for the offer

- Trevor

Top
#65811 - 03/02/2002 09:18 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tfabris]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Tman has been nice enough to finalize each version. Beta? We don't need no stinkin' beta. Each version has worked properly for me with its own little feature set. Yay! Make a suggestion, get that suggestion turned into a thread by someone else, and have a finished program in my grubby little hands - all within 24 hours. Cool. That's the way I'd like things to move at work when I put my foot down. Haha.

Oh, Tony, you're using a broadband connection, aren't you? Do you have any idea how long it takes me to connect with my 56Kbit modem now that I have that enormous HOSTS file? Uuuuugh. I think I'm going to have to make my own very cut down version of the ad-list.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65812 - 03/02/2002 10:11 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31569
Loc: Seattle, WA
Oh, Tony, you're using a broadband connection, aren't you? Do you have any idea how long it takes me to connect with my 56Kbit modem now that I have that enormous HOSTS file?

The size of the hosts file should not have any bearing whatsoever on your connection speed. All processing of the file should be happening locally before there's a communication with the modem. In fact, by preventing ad downloads, it should be speeding things up for you.

But, if you are using Windows 2000, there is a known bug in the operating system where you get slowdowns if you have more than a couple entries in your hosts file. Therefore this technique should not be used in Windows 2000. This is described on that page I linked, the page where you got the hosts file. Are you using Windows 2000?

The files at that page are out-of-date, and I wonder if anyone else has taken up the slack of maintaining a similar file?
_________________________
Tony Fabris

Top
#65813 - 03/02/2002 10:17 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tfabris]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
I didn't see the note about 2K. Argh.

Once the file has been fully parsed I don't seem to get any slow downs. It's not affecting my connection speed beyond the time it takes to actually "register on the network" - it might be because I didn't wait 15 minutes after turning on my machine before running the dialer.

And of course running the findempeg program causes a nice HOSTS related delay as well, but it doesn't last that long.

So, is this 2K problem addressed in XP? I wouldn't consider switching off to any other OS. And in fact would like to hold off on XP until I move and hopefully some additional updates or a service pack are released.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65814 - 03/02/2002 10:22 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31569
Loc: Seattle, WA
So, is this 2K problem addressed in XP?

I have no idea. All I know is what it says on that page which (we already know) is hopelessly out of date.

If you're running Windows 2000 and you want to do ad-blocking, I'm sure there are other alternatives besides editing the hosts file.
_________________________
Tony Fabris

Top
#65815 - 03/02/2002 10:30 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
"register on the network"

Under 98, there was an easy way to stop this, and 2000 it might be the same (My dialup experience under 2000 is limited). Taking a quick look at XP's dial up properties, there is a Networking tab. Ensure only TCP/IP is checked there. Also dig around and disable any windows centric features, like domain logon.

Top
#65816 - 03/02/2002 10:38 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: drakino]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
That should all be taken care of. I just took a look and I don't see anything checked that would cause a problem. No WINS, no MS this or that. The only thing that was checked was a feature for importing an lmhosts file for NetBIOS lookups. And currently I don't have an lmhosts file.

Without the really long hosts, my connection takes what I consider an average time to complete. It may be that I launched the dialer while the HOSTS file was still being parsed after bootup. I'll go read the original page to see what 2K information they mention.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65817 - 03/02/2002 10:57 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tfabris]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Have you checked out DNSKong? I briefly looked at it - it was linked via a HOSTS-information page on the main site you provided. http://www.accs-net.com/hosts/

I've also gone and disabled my DNS and DHCP client services. I had been playing with this the night before last already, even before the whole HOSTS issue. Now to do a reboot to make sure it doesn't affect the other machine on the net (shouldn't since I gave it a static IP and think I have static gateway and dns information as well).

Oh, after these changes, findempeg takes a FRACTION of a second (instead of multiple seconds) to make its one-line change to my long hosts file. Excellent.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65818 - 03/02/2002 12:33 Re: empeg protocol [Re: mcomb]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
I'm running on Linux and it doesn't require root. Maybe your OSes only allow root to send to the broadcast addr? If you change the IP does the error go away?
_________________________
--The Amigo

Top
#65819 - 03/02/2002 12:38 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
v 1.3 works great for me on Linux. I run my own DNS server so I didn't let it modify the hosts file, but it detected the empeg just fine. Running with no options produces the expected results. Thanks!
_________________________
--The Amigo

Top
#65820 - 03/02/2002 12:45 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Ok, how about two feature requests for the next version? I use static DHCP, but maybe these features would be helpful to others here.

1: specifying a -h without a file name defaults to using /etc/hosts (Linux only)
2: specifying a -n without a name puts the name of the unit in the hosts file (without serial number; best used with -i).

The 2nd feature would make an easy way for people with multiple units and dynamic addresses to have them all added with their host names without having to run findempeg again for each unit and search by serial number.
_________________________
--The Amigo

Top
#65821 - 03/02/2002 13:02 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: TheAmigo]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Is your second option going to work for units with a space in their names? My unit is called "Twisted Melon" for instance.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65822 - 03/02/2002 13:22 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Well, you'd have to do something like map all invalid chars to underscore.
_________________________
--The Amigo

Top
#65823 - 03/02/2002 13:34 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: TheAmigo]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
But my player name doesn't have an undersore. It has a space.

Bruno

Ya, just pulling your leg.
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65824 - 07/02/2002 10:31 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
smu
old hand

Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
hi.

If you are interested, I can compile the windows version completely static (not requiring any DLLs).

cu,
sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord

Top
#65825 - 14/01/2003 11:54 findEmpeg for OS X (Darwin) [Re: smu]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
I compiled a version of findEmpeg for OS X. Feel free to dl if you like. I haven't effectively tested it - but it finds my peg on my network just fine. cheers! .::trs


Attachments
133756-wherepeg.tgz (68 downloads)

_________________________
- trs

Top
#65826 - 14/01/2003 17:03 Re: findEmpeg for OS X (Darwin) [Re: trs24]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
I do find it quite rude that you've removed my name from it...

- Trevor

Top
#65827 - 14/01/2003 18:39 Re: findEmpeg for OS X (Darwin) [Re: tman]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Ouch... talk about bad manners.
_________________________
- Tony C
my empeg stuff

Top
#65828 - 14/01/2003 19:43 Re: findEmpeg for OS X (Darwin) [Re: tman]
Yang
addict

Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
Did you release the source code or something?

Top
#65829 - 15/01/2003 02:43 Re: findEmpeg for OS X (Darwin) [Re: Yang]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Somebody recently asked for the source code to have a look because he was interested in programming.

- Trevor

Top
#65830 - 15/01/2003 07:22 Re: findEmpeg for OS X (Darwin) [Re: tman]
Yang
addict

Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
Ahh.. makes sense now.. Yea, that's not cool..

Top
#65831 - 15/01/2003 08:01 Re: findEmpeg for OS X (Darwin) [Re: Yang]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
I'm not that fussed about it really as it was only a little utility and the person had good intentions. Just would have been nicer if they'd kept my name in

If anybody ever wants the source code for the stuff I write for the empeg, all they need to do is ask. It's not on the webpage but I'm more than happy to email it.

- Trevor

Top
#65832 - 15/01/2003 11:49 Re: findEmpeg for OS X (Darwin) [Re: tman]
suomi35
enthusiast

Registered: 16/02/2002
Posts: 290
Loc: Denver, CO
That was my fault. I was copying the source into an IM window for trs and he must not have gotten the full cut-n-pastes. We'll fix 'er right up if you like.

No cruel intentions!

Sorry about that, again!
_________________________
-Jason

Top
#65833 - 15/01/2003 11:54 Re: findEmpeg for OS X (Darwin) [Re: suomi35]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Nah. Don't worry about it. As I said before, no harm done

- Trevor

Top
#65834 - 15/01/2003 12:43 Re: findEmpeg for OS X (Darwin) [Re: tman]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
WOW - I DO apologize. I definitely did not intend to remove the credit from you hard work. Let me state that I only intended to offer a os x compiled version of tman's findEmpeg. Definitely don't want people to think I was trying to take credit. I will fix it right up and re-release. Please accept my apologies. I think it is a great app!!

.::trs
_________________________
- trs

Top
#65835 - 15/01/2003 15:25 findEmpeg for OS X (Darwin) [Re: trs24]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
Here is the actual findEmpeg app compiled for os x. Sorry for the confusion. Thanks for the app tman!

.::trs


Attachments
134170-findEmpeg.tgz (106 downloads)

_________________________
- trs

Top
#65836 - 17/01/2003 15:09 Re: findEmpeg for OS X (Darwin) [Re: trs24]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Hey, how about the title of this thread? Who's going to add my name in there?

I had been using tman's little util faithfully since he whipped it up. Just stopped using it recently since installing a broadband router (which is serving a static IP to my empeg).

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
Page 1 of 3 1 2 3 >