Abhinav The Great wrote:when i pressed X the network connection window opened , so i scanned but no access points were detected
Below is the status of Start Example at that time
C:\Documents and Settings\Abhinav\Desktop\PC>java -jar UsbServerPC.jar
USBSERVERPC v1.0 by Thecobra(James A.) 04/17/2011
Connecting to USBSERVER ... DONE.
USBSERVER Online: false
USBSERVER IP: unknown IP
Webpage :
C:\Documents and Settings\Abhinav\Desktop\PC>pause
Press any key to continue . . .
Well.................. what am i doing wrong???????????????????
Mexicouger wrote:I follow the steps, and it just says:
C:\Users\Administrator\Desktop\PC>java -jar UsbServerPC.jar
USBSERVERPC v1.0 by Thecobra(James A.) 04/17/2011
Connecting to USBSERVER ..
And it doesn't do anything past that
It also didn't say my drivers installed properly when I plugged my psp in with USBserver on, so I dunno if thats a problem
I may have forgot to say something:
Firt you need to make sure that you don't have usbhostfs plugin enable in you cfw. the program auto load it so if you have it enable it will lag trying to load it. I try to fix this problem in the next version so that it check to see if it loaded and if it not then try to load it.
Second, The psp internet only works if you have wifi hotspot near you. No wifi = no internet.
I think that all.
Went i get back home from work tonight, i try to work on the proxy again, i think i figure out how to fix it(the solution came to me in a dream, i can always figure hard stuff while i am asleep lol) and when i get home i try to put that to the test.
vasi4_5 wrote:Is there any chance for brick with this HB?And sorry for calling you as*hole

You ROCK! Thanks for this HB.
There no chance for this version to brick you psp since it doesn't patch anything yet. And don't worry about it, just try not to do it again unless 100% it fake lol.
npt@ thanks, i did not see my project in the front page so i though it wasn't accepted. i still gonna be working on it so look forward for a way better version of it by the end of this project

ohrores wrote:I have wrote a little mod.
To pipe it to firefox.
UsbServerPC.java:
- Code: Select all
import java.net.* ;
import java.io.* ;
public class UsbServerPC {
private static String title = "USBSERVERPC v1.0 by Thecobra(James A.) 04/17/2011";
public static Socket s = null;
public static DataInputStream dIn;
public static DataOutputStream dOut;
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
try{
s = new Socket("127.0.0.1",10005);
dIn = new DataInputStream(s.getInputStream());
dOut = new DataOutputStream(s.getOutputStream());
} catch(IOException e){
System.out.println("Fehler: "+e);
}
//System.out.print(RecvUsbWait());
WaitForUsbServer();
String data = "GET /index.html HTTP/1.1\r\n" + "User-Agent: HTTPGrab\r\n"
+ "Accept: text/*\r\n" + "Connection: close\r\n" + "Host: "+args[0]+" \r\n" + "\r\n";
String webpage = GetWebPage(args[0],80,data);
String[] page = webpage.split("<head>");
System.out.print("" + page[1]);
}
public static void SendUsb(String data) throws IOException{
dOut.write(data.getBytes());
dOut.flush();
}
public static String RecvUsb() throws IOException{
int timeout = 1000;
while(timeout >= 0){
if(dIn.available() > 0){
return dIn.readLine();
}
timeout--;
}
return "";
}
public static String RecvUsbWait() throws IOException{
return dIn.readLine();
}
public static int MakeClientSocket(int time, String address, int port) throws IOException{
int sock = -1;
if(time >= 10){
return -1;
}
SendUsb("SC*" + port + "*" + address);
String data = RecvUsbWait().trim();
if(data.startsWith("SCD*")){
sock = Integer.parseInt(data.substring(4));
} else {
return MakeClientSocket(time++,address,port);
}
return sock;
}
public static int MakeHostSocket(int time,int port) throws IOException{
int sock = -1;
if(time >= 10){
return -1;
}
SendUsb("CC*" + port);
String data = RecvUsbWait().trim();
if(data.startsWith("CCD*")){
sock = Integer.parseInt(data.substring(4));
} else {
return MakeHostSocket(time++,port);
}
return sock;
}
public static int CloseSocket(int time,int port) throws IOException{
int sock = -1;
if(time >= 10){
return -1;
}
SendUsb("CS*" + port);
String data = RecvUsbWait().trim();
if(data.startsWith("CSD*")){
sock = Integer.parseInt(data.substring(4));
} else {
return CloseSocket(time++,port);
}
return sock;
}
public static String RecvData(int sock, int maxlen) throws IOException{
int slen = 0;
String buf = "";
SendUsb("RD*" + sock + "*" + maxlen);
String tempbuf = RecvUsbWait().trim();
if(tempbuf.startsWith("RDD*")){
slen = Integer.parseInt(tempbuf.substring(4));
while(slen > 5){
tempbuf = RecvUsbWait();
buf = buf + tempbuf;
slen -= tempbuf.length() + 2;
}
}
return buf;
}
public static int SendData(int sock,String buf, int maxlen) throws IOException{
int sendt = 0;
SendUsb("SD*" + sock + "*" +maxlen + "*" + buf);
String tempbuf = RecvUsbWait();
if(tempbuf.startsWith("SDD*")){
sendt = Integer.parseInt(tempbuf.substring(4));
}
return sendt;
}
public static String GetIP() throws IOException {
String reip = "0.0.0.0";
SendUsb("PI");
String data = RecvUsbWait().trim();
if(data.startsWith("PID*")){
reip = data.substring(4);
}
return reip;
}
public static Boolean GetOnline(int time) throws IOException {
SendUsb("WP");
String data = RecvUsbWait().trim();
if(time >= 10){
return false;
}
if(data.startsWith("WPD*")){
if(data.substring(4).matches("1")){
return true;
} else {
return false;
}
} else {
return GetOnline(time++);
}
}
private static void WaitForUsbServer() throws IOException {
SendUsb("EC*ECHO");
RecvUsbWait();
}
private static String GetWebPage(String address, int port, String data) throws IOException{
int sock = MakeClientSocket(0,address,port);
SendData(sock,data,data.length());
String webpage = "";
String buffer = "";
Boolean more = true;
while(more){
buffer = RecvData(sock,1024);
if(buffer.length() > 0){
webpage += buffer;
} else {
more = false;
}
}
CloseSocket(0,sock);
return webpage;
}
private static int AcceptClient(int sock) throws IOException{
int ac = -1;
SendUsb("CA*"+sock);
String c = RecvUsb();
if(c.startsWith("CAD*")){
ac = Integer.parseInt(c.substring(4));
}
return ac;
}
private static void MakeServerHost(int port) throws IOException{
int socket = MakeHostSocket(0,port);
int client = AcceptClient(socket);
String data = "";
while(true){
data = RecvData(socket,512);
System.out.print(data);
SendData(socket,data,data.length());
}
}
}
And a pipetool :
- Code: Select all
#!/usr/bin/perl -00
use File::Temp;$f=File::Temp->new;print{$f}<>;system qw{firefox -remote},"openURL(file://$f, new-tab)"
And then start UsbServer on the psp, start usbhostfs on the pc, open firefox and write this in the terminal:
- Code: Select all
java UsbServerPC http://www.wololo.net | ./pipe.pl
before you must build the "mod":
javac UsbServerPC.java
for me it works
http://www.wololo.net works, but not many others

Thank for posting that, i gonna give it a look and maybe implement it in the next version. ofcourse i give you credit for that.
jvhellraiser wrote:DELETE PLEASE!!!
Please don't, else i would be sad
p.s this version may not be none -tech friendly version but don't worry, it would get their soon. just follow ohrores instruction and you may be able to get you web browser working.
all@ Thank you for liking this project. i would be working on this project until i can say i 100% happy how it is. Right now i am only 40% happy with it so you can expect alot more update for it.
and all good luck