FAQ  •  Search  •  Profile  •  Log in to check your private messages  •  Log in
 PCSX2 + Kai on same Linux PC connected to router via wireles View next topic
View previous topic
Post new topicReply to topic
Author Message
boom_baby
Kai Beginner
Kai Beginner


Joined: 25 Feb 2014
Posts: 5

PostPosted: Wed Feb 26, 2014 1:26 am Reply with quoteBack to top

*This appears in General Help also, but I think it belongs here -- I don't know how to delete the other one*

I've made changes to the dev9ghzdrk networking plugin for the PCSX2 emulator (in fact, I am modifying it to run in Linux and to be compatible with Kai).

The plugin uses libpcap to send/receive packets via my wireless adapter. When the emulator sends a packet, the plugin spoofs the default MAC address from the PS2 EEPROM with a user-defined MAC (not necessarily the one corresponding to my PC's wireless adapter). The reverse happens when a packet destined for the spoofed MAC is received. The trick here is -- what should I spoof the MAC address to? I assume the last 2 bytes determine the IP address I should use with Kai, and Kai uses the first 3 bytes to determine whether a console has been detected or not.

I've set up port forwarding and Kai shows "network reachable: Yes" but it cannot find my console after refreshing the list of LAN games. Wireshark shows that the packet is being spoofed and broadcasted correctly, but Kai still does not detect it.

What rules should I use when spoofing the PS2 MAC so that Kai will detect it? Are these rules the same between the Linux and Win32 versions? So far, I've tried starting with 00:19:C5 and 00:24:8D without success.
View user's profileSend private message
boom_baby
Kai Beginner
Kai Beginner


Joined: 25 Feb 2014
Posts: 5

PostPosted: Wed Feb 26, 2014 3:10 pm Reply with quoteBack to top

When I run the Win32 versions of Kai and PCSX2+dev9ghz on the same Windows 7 machine, Kai is able to detect the spoofed MAC starting with 00:24:8D, and I'm able to see/join games.

The wireless adapter and the libpcap code used in dev9ghz are identical -- does libpcap operate differently on Linux? I'm going to try connecting a PC to my router with Cat5 and see if I can sniff the packets being broadcast (though if XLink Kai and PCSX2 are both on the same machine, does it matter if the packets are ever physically transmitted into the air?)
View user's profileSend private message
socom-gamer
Kai Beginner
Kai Beginner


Joined: 03 Jun 2013
Posts: 19

PostPosted: Thu Feb 27, 2014 12:00 am Reply with quoteBack to top

On the Linux PC were you using this XLink Kai version http://teamxlink.co.uk/forum/viewtopic.php?t=44006 ? It is the only one that is currently working with ps2/ps3.
View user's profileSend private message
boom_baby
Kai Beginner
Kai Beginner


Joined: 25 Feb 2014
Posts: 5

PostPosted: Thu Feb 27, 2014 6:32 am Reply with quoteBack to top

I am now using that version and it detects the MAC address! Sometimes, I am able to see a game in Socom II but if I try to join it I get a connection error.

When I run wireshark, I see my game search requests being broadcast and I also see the incoming game request broadcasts from other users. Some users have told me they do not see my game request packets on their end -- so is Xlink not properly forwarding my packets to them?
View user's profileSend private message
SSGLIBERTYA
Kai Beginner
Kai Beginner


Joined: 07 Sep 2014
Posts: 1

PostPosted: Sun Sep 07, 2014 4:43 pm Reply with quoteBack to top

do you have a copy of that plugin you wouldn't mind sharing? lol i cant find a dev9 plugin for linux anywhere
View user's profileSend private message
socalm
Kai Beginner
Kai Beginner


Joined: 03 Nov 2014
Posts: 1

PostPosted: Mon Nov 03, 2014 3:18 am Reply with quoteBack to top

The networking plugin for Linux can be downloaded from here. The MAC address is hard-coded, and I have misplaced the source code to be able to change it. The IP address in the memory card uniquely maps to that hard-coded MAC in Xlink, so ONLY ONE PERSON CAN USE THIS with KAI at a time!
https://drive.google.com/file/d/0B1V8ElxpDts7NDVPYW81dFBwZE0/view?usp=sharing

Open a terminal with Ctrl+Alt+T. Then navigate to the directory you downloaded the archive to, e.g.:
cd ~/Downloads

Unzip the archive and navigate to the resulting directory:
tar -xzvf dev9ghzdrk_linux.tar.gz
cd dev9ghzdrk_linux

Copy the configuration and UI files to your PCSX2 config directory, and make sure you own them:
cp dev9ghzdrk.* ~/.config/pcsx2/inis/
sudo chown $(whoami):$(whoami) ~/.config/pcsx2/inis/dev9ghzdrk.*

Same thing with the memory card file:
cp card1.ps2 ~/.config/pcsx2/memcards/
sudo chown $(whoami):$(whoami) ~/.config/pcsx2/memcards/card1.ps2

Now copy the shared object:
sudo cp libdev9ghzdrk.so /usr/lib/games/pcsx2/
sudo ldconfig

YOU NEED TO MAKE SURE YOU SATISFY DEPENDENCIES (GTK+3 and libpcap). You may be able to run these commands on a 64 bit system. The version numbers (e.g. 1.5.3) might need to be updated... check the output of dpkg -L libpcap0.8 to get the right version number before you run the second command:
sudo apt-get install libpcap0.8:i386 libgtk-3-0:i386
sudo ln -s /usr/lib/i386-linux-gnu/libpcap.so.1.5.3 /usr/lib/i386-linux-gnu/libpcap.so.1
sudo ldconfig

If after this command you see any lines that say "not found," you'll have to satisfy the dependencies:
ldd /usr/lib/games/pcsx2/libdev9ghzdrk.so

Finally, you need to set these capabilities for your pcsx2 executable:
sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' $(which pcsx2)

Then, launch PCSX2 and set this plugin for Dev9 (instead of the Null one). Click Configure and a small window should appear. Then, you'll just need to go to Ethernet, make sure it's enabled, and select an option named "pcap bridge:<interface>" where <interface> is the network interface you've actually got connected to the internet. You can find out by typing ifconfig and looking for the interface that has an IP address starting with 192.168. It will usually be called eth0 or wlan0

Before you launch the game, make sure you've got the memory card file from this archive loaded into Slot 1-- it has the network configuration you'll need
View user's profileSend private message
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



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


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