FAQ  •  Search  •  Profile  •  Log in to check your private messages  •  Log in
 FIXED: Need some help building Kaid 7.0.0.7 View next topic
View previous topic
Post new topicReply to topic
Author Message
BarryCent
Kai Beginner
Kai Beginner


Joined: 22 Dec 2004
Posts: 5
Location: United Kingdom

PostPosted: Fri Oct 09, 2009 10:29 am Reply with quoteBack to top

Hi,

I've recently upgraded my server, which was previously running Debian Sarge (2.4 kernel Smile). It is now running Ubuntu Server 9.04 and it's headless.

On my old setup, Kaid would build with no problems at all, and run like a dream (it was running literally last week). On my new system, however, when I attempt to build SocketCC from the kaid-7.0.0.7 source code, I receive the following errors: http://pastebay.com/60062 Sad

libpcap and pthreadcc install fine, with no errors.

Does anyone have a clue as to how I could get this working, or am I just wasting my time with this version? It's just annoying that it ran on an old system, but not a new one, and I'd hate to have to wait for that GUI-less version of the 7.4.18 engine Wink.

Please, please help! I'd love to get back on Kai!

Thanks,

Joe


Last edited by BarryCent on Sun Oct 18, 2009 1:42 pm; edited 1 time in total
View user's profileSend private messageMSN Messenger
BarryCent
Kai Beginner
Kai Beginner


Joined: 22 Dec 2004
Posts: 5
Location: United Kingdom

PostPosted: Sun Oct 18, 2009 1:37 pm Reply with quoteBack to top

Hi,

I've sorted it now. Kaid is building fine on my headless server which is now running Ubuntu Server 9.04 (64-bit).

For anyone who this may be of use to (though I highly doubt it) this is how I fixed it:

Since the update of g++ to version 4.3 (read more here) some alterations needed to be made to the source code for it to compile properly under g++>4.3.

1. We need to download the source code for Kaid 7.0.0.7, which has kindly been provided at http://www.teamxlink.co.uk/binary/kaid-7.0.0.7-src.tar.gz
Code:
cd && wget http://www.teamxlink.co.uk/binary/kaid-7.0.0.7-src.tar.gz


2. Then we extract the source code (to ~/kaid-7.0.0.7 to keep it simple):
Code:
tar xvzf kaid-7.0.0.7-src.tar.gz


3. So, from the main source directory (kaid-7.0.0.7) we need to change to the source directory for SocketCC:
Code:
cd ./kaid-7.0.0.7/socketcc/src


4. We the need to edit ipaddress.cpp
Code:
nano ipaddress.cpp


5. Then we need to add this header to the file (preferably with the other headers which are normally situated near the top of the file):
(Copy the whole phrase in the box, including the #.)
Code:
#include <cstring>


6. Repeat step 5 for the following file:
Code:
nano tcpsockets.cpp



That all takes care of the older code in the SocketCC source. All that remains is to alter the code for kaid:

1. Change back to the kaid source directory:
Code:
cd ~/kaid-7.0.0.7


2. Repeat step 5 from above in these files:
Code:
nano Api.cc
nano KaiEngine.cc
nano KaiItem.cc
nano OrbDgramThread.cc



You should now be able to follow TwoCents' tutorial from step 3 to compile and install Kaid 7.0.0.7:

TwoCent's post can be viewed at http://www.teamxlink.co.uk/forum/viewtopic.php?t=24324

TwoCents wrote:
You can find the sourcecode here: http://www.teamxlink.co.uk/binary/kaid-7.0.0.7-src.tar.gz
(Thanks to MeanMF, retrieved from his post here)
And thanks [TU]JiffyWhip for pointing out the need for flex and bison (see post here). Those are indeed mentioned in the .configure of libpcap.

Now here's a *very* brief installation guide i just followed to build kaid in Ubuntu (also debian based):
# 1. Download and extract the tar.gz file mentioned above
# 2. Goto main extraction directory (/path/to/extracted/file/ends/with/kaid-7.0.0.7)

3. sudo apt-get install g++
4. cd pthreadcc
5. make
6. sudo make install
7. cd ../libpcap
8. Use Synaptic Package Manager to install the flex package
9. Use Synaptic Package Manager to install bison package
10. ./configure
11. make
12. sudo make install
13. cd ../socketcc
14. make
15. sudo make install
16. cd ..
17. make (kaid executable is now created)
18. sudo cp kaid.conf /etc/.
19. sudo ./kaid
20. http://jkaiui.sourceforge.net/downloads/
21. javaws http://jkaiui.sourceforge.net/downloads/jKaiUI.jnlp
22. (Always trust content from this publisher)
23. (Specify XTag and password)
24. Save
25. Connect to Engine (button)
26. Switch to Arena mode and back to see users in Messenger Mode

Please let me know if a forgot anything or made a mistake in one of the steps described.


My tutorial is built on that of TwoCents' original work and obviously all credit goes to him for taking the time to post his tutorial. All I have done is researched why the source code wasn't building under newer systems (with g++>4.3) and implemented what information I had gathered from such research. As you may be able to tell, I am fairly new to Linux, and I have very little experience in modifying source code, so this was a large achievement to me. If I have made any mistakes or quoted someone's work incorrectly/or not at all, then please inform me pleasantly and I will amend this post accordingly.

I hope this proves to be of some use to someone at some point, and if it is, then please post to let me know!

Cheers,

Joe
View user's profileSend private messageMSN Messenger
Ubiquish
Kai Beginner
Kai Beginner


Joined: 06 Oct 2010
Posts: 1

PostPosted: Wed Oct 06, 2010 3:50 pm Reply with quoteBack to top

Thanks so much for posting this -- I've been trying to get Kaid working on my server for a number of hours now, and ran into issues with all the various versions... Started with the (unfortunately) closed-source version, since it was the newest; but it demands a graphical interface. The other binary version I found for Linux (Ubuntu x86 Maverick at the moment) gave an error that (naturally) couldn't be fixed without access to whatever .c file it was complaining about...ugh.

So I wanted to make sure you knew that YES, posting your findings here *did* save (at least) one other user from more headaches et al, so it wasn't in vain. :)

Even though it's obviously not ideal to run an older (7.0.0.7) version, this is another perfect example of the kind of user-to-user ability to "fix" problems when the source is available ... really perplexing why Xlink is moving away from this (open) approach. Maybe there's a reason for it -- but I haven't seen any mention (other than to simply say "we're not releasing it") of the hows or whys of that decision anywhere. But I digress...I'm just glad that I can now move on to configuring/getting the server to *work* instead of struggling just to get them to *compile.* Cheers and thanks again. :)
View user's profileSend private message
prestige
Team XLink Administrator
Team XLink Administrator


Joined: 03 May 2004
Posts: 2075

PostPosted: Wed Oct 06, 2010 5:20 pm Reply with quoteBack to top

Ubiquish wrote:
really perplexing why Xlink is moving away from this (open) approach. Maybe there's a reason for it -- but I haven't seen any mention (other than to simply say "we're not releasing it") of the hows or whys of that decision anywhere.


It's quite simple, really. The developers of kaid wanted it to be an open project. The new code (Kai 7.4) is cross-platform and the developer, MeanMF, is not comfortable with sharing his code but has expressed intentions to do so in the future.

_________________
my signature goes here.
View user's profileSend private message
anunakin
Kai Beginner
Kai Beginner


Joined: 19 Feb 2005
Posts: 12
Location: Brazil

PostPosted: Sun Jun 02, 2013 7:37 pm Reply with quoteBack to top

Cant found kaid-7.0.0.7-src.tar.gz, any have a mirror?
View user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN MessengerICQ Number
SirPrestonBlake
Kai Beginner
Kai Beginner


Joined: 14 Aug 2013
Posts: 9

PostPosted: Fri Aug 16, 2013 4:06 am Reply with quoteBack to top

CunchBite was kind enough to post a link to kaid on a thread I start specifically asking for it. He even linked to a binary -
http://www.teamxlink.co.uk/forum/viewtopic.php?t=43995

Both startup but can not pass authentication. Neither in the .conf file or passing the credintials through an application work. I think the API or encrytion has changed Sad

I had to delete some headers from the Kaid.cc file for it to compile on gcc-4.7 or above. After beforming the steps in the first and second posts you have to make your headers like this -
#include <cstring>

#include <unistd.h>
#include <getopt.h>


Basically remove the elsif statement and freeBSD header.

This is from my log -
UI: Parsing UI command: KAI_CLIENT_LOGIN;SirPrestonBlake;PASSWORD;
UI: Sending UI response: KAI_CLIENT_STATUS;Querying orbital mesh...;
ORBSTREAM: Orbital stream established...
ORBSTREAM: Sending Orb response: ?;FAILED;
UI: Sending UI response: KAI_CLIENT_STATUS;Authentication Failed..;
UI: Sending UI response: KAI_CLIENT_AUTHENTICATION_FAILED;
UI: Parsing UI command: KAI_CLIENT_VECTOR;Arena;;
ORBSTREAM: Sending Orb command: KAI_VECTOR;Arena;;
UI: Parsing UI command: KAI_CLIENT_GET_METRICS;
UI: Sending UI response: KAI_CLIENT_METRICS;;Not yet;IPADDRESSOCETS;34430;7.0.0.$
UI: Parsing UI command: KAI_CLIENT_VECTOR;Arena;;
ORBSTREAM: Sending Orb command: KAI_VECTOR;Arena;;


Obviously, I blocked my password and ip address.
I tried auto logging in with the config file, java app, and XBMC. No dice.

Oh well, I guess I am going to Plan B, which is create a script that monitors someone trying to connect on Xlink port. The script will then execute the Kai-Engine GUI on my desktop and kill it after 5 minutes.

The problem I was having now, aside from not being able to execute KaiGUI as a service or daemonize. Is that it will only allow XBMC to connect to one game. If I exit my game and relaunch Kai within the app it does not work. I have to restart the Kai-Engine on my PC ( very annoying ). Ill probably write it this weekend.

I am familiar programming with sockets and monitoring network connections. Im going to write it in perl, it should be a cakewalk. Ill post it if anyone is insterested.
View user's profileSend private message
MeanMF
Team XLink Administrator
Team XLink Administrator


Joined: 11 Nov 2004
Posts: 5024

PostPosted: Fri Aug 16, 2013 4:37 am Reply with quoteBack to top

kaid is not compatible with current verisons.
View user's profileSend private message
CrunchBite
Team XLink Developer
Team XLink Developer


Joined: 28 Nov 2007
Posts: 2338

PostPosted: Fri Aug 16, 2013 2:16 pm Reply with quoteBack to top

FYI We hope to soon release a updated kai engine for linux that doesn't have any gui dependencies Smile (We are currently testing the engine before release)
View user's profileSend private message
SirPrestonBlake
Kai Beginner
Kai Beginner


Joined: 14 Aug 2013
Posts: 9

PostPosted: Fri Aug 16, 2013 9:54 pm Reply with quoteBack to top

MeanMF wrote:
kaid is not compatible with current verisons.


Lol yall werent kidding.

I am going to start up Kai-Engine on my VNC session. Thus, it will not bother me always being open and not dependent on someone being logged into the system.

Ill use this inconjunction with my perl script.

If for some reason this does not work ( or Im bored ). Ill try my hand at making kaid compatible again.

Is there anywhere I can submit a bug ticket? My issue is that the xbox will only connect once and then I have to restart Kai for it to work again.

I think this has something to do with the number of sessions the Xbox has with Kai. Maybe the Xbox never properly closes the session ( or socket ) so Kai refuses to let it reconnect.
View user's profileSend private message
MeanMF
Team XLink Administrator
Team XLink Administrator


Joined: 11 Nov 2004
Posts: 5024

PostPosted: Sat Aug 17, 2013 3:35 am Reply with quoteBack to top

Kai works off of the MAC address and is UDP-based so there isn't really a connection. It "locks" to the first Xbox it sees and will keep listening for traffic from that device until you shut the engine down. So unless your Xbox's MAC address is changing it sounds like something else is going on.
View user's profileSend private message
SirPrestonBlake
Kai Beginner
Kai Beginner


Joined: 14 Aug 2013
Posts: 9

PostPosted: Sun Aug 18, 2013 10:35 pm Reply with quoteBack to top

MeanMF wrote:
Kai works off of the MAC address and is UDP-based so there isn't really a connection. It "locks" to the first Xbox it sees and will keep listening for traffic from that device until you shut the engine down. So unless your Xbox's MAC address is changing it sounds like something else is going on.


Ah, I figured it was something like that. Basically it "binds" to that Mac address. That explains why the UI still lists the Xbox as "configured" when it is turned off.

I am using Kai Client in Xbmc ( for orginal Xbox ). Which I think works a bit different from how Normal users use it.
From my understanding is that this client "injects" the current configuration the Xboxs network configuration. Which makes the Xbox apart of the "LAN" that you selected.

My theory is that - The connection is not tunneled through Kai at this point and you can kill the engine.

After the Xbox is restarted that configuration is lost and Kai-Engine will not configure it again.

Anyways, I am a happy camper now. I created my script and launch Kai-Engine on my VNC display session! This script listens for an attempted Kai connection and starts the client. It then lets it stay open for 5 minutes before killing it.

I have not had a chance to test it ( no one is online ). But if my theory is correct then it will work.

EDIT:

Im 90% sure its not going to work Sad At least I learned out to launch this as a service on a remote display. Below is my systemctl script. This is as good as its going to get for a daemon until No-GUI is finally released.

I am going to create a XBMC compatible python script, so I can restart the kaiEngine service from within the application.

I am going to create a topic in the Xbmc Board. I feel that my replys off topic for this thread.

Code:
[Unit]
Description=Kai Engine Xbox
Requires=vncserver@:1.service
After=vncserver@:1.service
User=root

[Service]
Environment=DISPLAY=:1
ExecStart=/usr/bin/kaiEngine
KillMode=process
Type=Forking

[Install]
WantedBy=multi-user.target
[/code]
View user's profileSend private message
SirPrestonBlake
Kai Beginner
Kai Beginner


Joined: 14 Aug 2013
Posts: 9

PostPosted: Tue Aug 20, 2013 12:09 am Reply with quoteBack to top

Problem Solved:
For XBMC client to reconnect ( after its been configured ) you need change you XBMC Network Config to match your KAI host ex. "Default Gateway" & "DNS Server" is your kai engine ip.

Im simply going to keep this as my Xbmc Network configuration ( I use a different dash for FTP ).

I was way over thinking this problem...
View user's profileSend private message
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic
You can 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 vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group :: Theme by Daz :: All times are GMT