Welcome! Log In Create A New Profile

Advanced

Syslog Client -- Working download?

Posted by PathogenDavid 
Syslog Client -- Working download?
June 25, 2010 11:04AM
Hey, I recently decided to get back into Wii Homebrew stuff and I am working on porting Gish since it got released as open source recently. However, I'm running into issues and I need to debug. I found this topic: [forum.wiibrew.org] but the download links are dead (The blog is there but the links give me a 403) I was hoping someone here might be able to reupload it since I can't seem to find a mirror or anything anywhere. Any help would be much appreciated. Thanks!

Either that or a working download of [wiibrew.org] or a nice WiFi debugging system. Preferably as simple as the Syslog one sounds.

~Pathogen David (AKA DtD)



Edited 1 time(s). Last edit at 06/25/2010 11:05AM by PathogenDavid.
Re: Syslog Client -- Working download?
June 25, 2010 03:29PM
There really is no wifi debugging system.

Your best bet at using a real debugging system for wii homebrew development is to purchase a USB Gecko.
Re: Syslog Client -- Working download?
June 25, 2010 05:34PM
No!

There is Wifi debugging:

[forum.wiibrew.org]

Perhaps you will need to adpat it to the latest release of libogc, but it's work (i've tested it with a previous version of libogc and it was ok).
This isn't as good as gecko debugging, but it can help a lot.
Re: Syslog Client -- Working download?
June 26, 2010 02:22AM
Good news is, here I mirrored the app : [www.tepetaklak.com]

Bad news is : it's not compatible with new homebrew channel, it uses old wiiload protocol.

Semi good news is you can still make use of the tool with a little bit of cheating... here is how...

1. Have a simple tcp server listening to port 4299 (wiiload port) on your pc, run this
such as this one : [www.tepetaklak.com] (it's a lame .net console app)

2. Send your dol or any file with the wiiload to your pc (syslogd server one). It will open the syslog port and keep listening... Preferably with such a batch file (ip address here is your pc's ip address)

SET WIILOAD=tcp:192.168.2.4
C:\OLDWIILOAD crazyintro.dol


3. Use the newest wiiload to send the dol to homebrew channel... Preferably with such a batch file (ip address here is your wii's ip address)

SET WIILOAD=tcp:192.168.2.3
C:\WIILOAD crazyintro.dol


This way you can make use of the syslogd version of wiiload without recompiling it under windows, which I failed so had to make this workaround... You don't need to repeat the first two steps since that wiiload will keep listening to syslog port...

Still, it's pretty easy to make your own implementation listening to syslogd port.. I've recently done one for my FE100 keygrabber... You just need to write a simple udp server..

If I misunderstood you and you were simply looking for the wii client code, here you are : [code.google.com] . I don't have original release handy at the moment.

For the standalone udp server that can be used for this task, here is mine not the best of it's kind but working...

using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Threading;

namespace TCPListener
{
    public class Listener : IDisposable
    {
        public delegate void HandleResponse(string resp, int length, byte[] data);
        Socket newsock;

        int recv;
        byte[] data = new byte[1024];

        public void Initialize(HandleResponse handler)
        {
            handler.Invoke("Initializing...", 0, null); 
            Thread.Sleep(200);
            IPEndPoint ipep = new IPEndPoint(IPAddress.Any, 514);
            newsock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
            handler.Invoke("Binding port...", 0, null);
            newsock.Bind(ipep);
            Thread.Sleep(200);
        }

        public void Listen(HandleResponse handler)
        {
            bool finished = false;
            handler.Invoke("Waiting for a client...", 0, null);
            IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);
            EndPoint Remote = (EndPoint)(sender);

            recv = newsock.ReceiveFrom(data, ref Remote);

            Console.WriteLine("Message received from {0}:", Remote.ToString());
            Console.WriteLine(Encoding.ASCII.GetString(data, 0, recv));

            handler.Invoke(Encoding.ASCII.GetString(data, 0, recv), recv, data);

            string welcome = "FE100 KeyGrabber Server";
            data = Encoding.ASCII.GetBytes(welcome);
            newsock.SendTo(data, data.Length, SocketFlags.None, Remote);            

            while (!finished)
            {                
                data = new byte[1024];
                recv = newsock.ReceiveFrom(data, ref Remote);

                //Console.WriteLine(Encoding.ASCII.GetString(data, 0, recv));
                string response = Encoding.ASCII.GetString(data, 0, recv);
                handler.Invoke(response, recv, data);
                newsock.SendTo(data, recv, SocketFlags.None, Remote);

                if (response.Contains("Exiting"))
                {
                    finished = true;
                }
            }

            handler.Invoke("Disconnected", 0, null);
        }

        public void Dispose()
        {
            if (newsock != null)
            {
                if (newsock.Connected)
                {
                    newsock.Disconnect(false);
                }
            }
        }

    }
}

Sorry, only registered users may post in this forum.

Click here to login