I got player version 2.1.1 and stage 3.0.0 working, player was not too difficult, I just needed to install libglu1-mesa-dev to get rid of some of the dependency issues I was having.
Stage was more difficult, For some reason the program needed me to manually export
export LD_LIBRARY_PATH=/usr/local/lib
for stage to work.
I was getting this error before for google reference:
stage: error while loading shared libraries: libstage.so.3.0.0: cannot open shared object file: No such file or directory
So I added:
export LD_LIBRARY_PATH=/usr/local/lib
to .bashrc and called it a day.
Friday, July 18, 2008
Wednesday, July 16, 2008
two usb webcams same hub, ubuntu 7.04
Well, I know how I got two cameras working on the same hub in Ubuntu 7.04, but apparently it doesn't work in 7.10. If I can get it working again, I'll provide better instructions. The key step is to download the source code for gspca for linux. Then open up gspca_core.c and search for he section where the author says he doesn't know how to set the bandwidth budget so he allows the maximum. Here is the section:
Well as you can see the outer for loop was i = nbalt. I changed that to 4 since it seemed like a nice number. It was really arbitrary. Then do make and make install, and you should be good, then download some program like spcaview and have at it.
/**
* Endpoint management we assume one isoc endpoint per device
* that is not true some Zoran 0x0572:0x0001 have two
* assume ep adresse is static know
* FIXME as I don't know how to set the bandwith budget
* we allow the maximum
**/
static struct usb_host_endpoint *
gspca_set_isoc_ep(struct usb_spca50x *spca50x, int nbalt)
{
int i, j;
struct usb_interface *intf;
struct usb_host_endpoint *ep;
struct usb_device *dev = spca50x->dev;
struct usb_host_interface *altsetting = NULL;
int error = 0;
PDEBUG(3, "enter get iso ep ");
intf = usb_ifnum_to_if(dev, spca50x->iface);
/* bandwith budget can be set here */
for (i = 4; i; i--) {//changed nbalt to 4
altsetting = &intf->altsetting[i];
for (j = 0; j < altsetting->desc.bNumEndpoints; ++j) {
ep = &altsetting->endpoint[j];
PDEBUG(3, "test ISO EndPoint %d",ep->desc.bEndpointAddress);
if ((ep->desc.bEndpointAddress ==
(spca50x->epadr | USB_DIR_IN))
&&
((ep->desc.
bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
USB_ENDPOINT_XFER_ISOC)) {
PDEBUG(0, "ISO EndPoint found 0x%02X AlternateSet %d",
ep->desc.bEndpointAddress,i);
if ((error =
usb_set_interface(dev, spca50x->iface,
i)) < 0) {
PDEBUG(0, "Set interface err %d",
error);
return NULL;
}
spca50x->alt = i;
return ep;
}
}
}
PDEBUG(0, "FATAL ISO EndPoint not found ");
return NULL;
}
Well as you can see the outer for loop was i = nbalt. I changed that to 4 since it seemed like a nice number. It was really arbitrary. Then do make and make install, and you should be good, then download some program like spcaview and have at it.
Friday, July 11, 2008
Player/Stage Ubuntu 7.10
After several hours struggling with trying to compile from source and having problems, I got Player/Stage to work. I should have known better, Ubuntu always makes things easy.
To install stage:
To run a demo
And if you want other tests look through /usr/share/stage/worlds for other worlds to try.
To install stage:
$sudo apt-get install stage
To run a demo
$stest /usr/share/stage/worlds/simple.world robot1
And if you want other tests look through /usr/share/stage/worlds for other worlds to try.
Wednesday, June 4, 2008
Using two routers on a home network
I recently got two routers to talk to each other and actually had my home network of two computers separated into two subnets. The key to it was to set up one router as a gateway, and have the second router setup with a static ip address as if it were to receive one from the ISP, but instead, set up the static IP to be one within the network of the first router. For example, the first router was setup with DHCP, so its external address would change, but its LAN address was set to 192.168.1.1 and was the gateway. The second router's WAN address was static and set to 192.168.1.2. The second router's LAN address was 192.168.2.0. Then the important part setting up static routing. The first router, 192.168.1.1, had the following static routing entry.
ID Destination IP Address Subnet Mask Default Gateway
1 192.168.2.0 255.255.255.0 192.168.1.2
and on the second router, 192.168.2.0
ID Destination IP Address Subnet Mask Default Gateway
1 192.168.1.0 255.255.255.0 192.168.1.1
The rest was taken care of automatically. Remember, pinging is your friend
ID Destination IP Address Subnet Mask Default Gateway
1 192.168.2.0 255.255.255.0 192.168.1.2
and on the second router, 192.168.2.0
ID Destination IP Address Subnet Mask Default Gateway
1 192.168.1.0 255.255.255.0 192.168.1.1
The rest was taken care of automatically. Remember, pinging is your friend
Thursday, April 10, 2008
90s
Just as a personal note, when attempting to do 90s, stand should width apart and keep legs locked, swing the upper body, swing right hand down toward left foot, in the same motion lift left leg up behind you and up, keep legs locked and keep them at should width apart even in the air, go towards a hand stand and reach to place left hand where right foot was. Keep legs apart in air. Now shift weight from right hand to left and pick up right hand at this time, twist hips slightly and pull legs in, rotation should have been maintained til this point and conservation of momentum will increase spin. This is probably the worst explanation on how to do this skill, but its a reminder to myself.
Thursday, April 3, 2008
WRTSL54GS i-force joystick
I was able to get my WRTSL54GS to read my Saitek ST290 joystick as well as a mouse. I had problems at first getting it to read, and I think it was a conflict with USB 2.0
First download the newest bleeding edge version of OpenWRT. How to do this has been posted many times but for completion,
make a folder with
Well, I can't upload the code for the moment so I'll just save it away and post it later.
4/18/09
Well, its been a damn long time, and this has taught me the valuable lesson of writing down the steps I take to make something happen, or else I might forget as I have this time and it has forced me to re-figure out how I got this to work in the first place. The main problem I had, and have, is that I don't think I'm entirely sure how the OpenWRT makefile system works.
Well, assuming you have directory named trunk where all of your openwrt stuff is type
make sure the following settings are set
Then press escape key twice
Now type
Then make sure the following are selected
If I didn't mention something then it may have been set by default, or if I did and it was already set, no harm done.
Then press esc esc. It will then start to do some basic writing of configurations through the makefile process. (I think) Then it will say
I-Force devices (JOYSTICK_IFORCE) [M/n/?] m
I-Force USB joysticks and wheels (JOYSTICK_IFORCE_USB) [N/y/?] (NEW)
type yes. I'm not sure why this comes up. As I do more research with this project, I'll try and figure more of how it actually works.
It will then finish.
then type
The V=99 is very important as it will prompt you for different things during the make process.
such as the joystick thing mentioned above, type yes again. It will do this twice during the make process.
once its done, we're going to upload the new firmware to the WRTSL54GS. If you don't already have it make sure you have atftp. If you're running a system with apt-get use the following.
Then pull up two terminals. Connect the WRTSL54GS to the same router or switch or hub that your computer is connected to. You can do it directly but its more a pain in the butt as you have to set your computer to a static IP address. Also, change your router's ipaddress to something other than 192.168.1.1 as that is what the WRTSL54GS defaults to during loading and during a hard reset if its is necessary to do so.
so in one window
And in the other window
Now wait and don't press enter. Disconnect the WRT and you should see no response in the window that is pinging the device. Click on the terminal that is running atftp, so you are ready to press enter. Plug the device in and as soon as you get a response from 192.168.1.1 in 1 window, press enter and write the new firmware to the device. If for some reason you are having troubles, try pushing in a small pin in the hole next to the power supply hole on the WRT as you are pushing in the power, this will put the WRT into a type of safe mode that may help with the loading. Now assuming all went well you should get this
I'm assuming it should end in about the same block size.
type quit in the atftp window to exit that program and go to the terminal that was pinging, press
ctrl-c to stop it and then try telnet 192.168.1.1
you should be greeted by the OpenWrt prompt.
type passwd to set your password as we have to move some files over using scp.
so
If you get the above, just do
After typing in your password you should be back to OpenWRT prompt.
Now go back to your directory where you just uploaded OpenWRT
should be
~/Kamikaze/trunk/bin$
now
By the time you try this OpenWRT may have moved on to a different kernel version, so don't worry if the numbers don't match, just type in scp followed by the first part of the module and use tab completion to finish it. In other words use the same modules for your version of the kernel.
Now in the terminal that has OpenWRT open,
They have to be installed in that order as some depend on others.
Now in openWRT
Then back on your own machine, on the
Now back in the terminal with openWRT
Now plug in the joystick and type in dmesg
Now lets give it a quick test. Still in OpenWRT
The ^c at the end if me pressing ctrl-c to stop the output. Obviously this isn't the way you want it to use the device. but it shows that it is being recognized and is working. In order to get more than that you need to have a test program such as jscal installed. I'll put details for that later, as I already know how to do it and it won't take long to put that one up.
First download the newest bleeding edge version of OpenWRT. How to do this has been posted many times but for completion,
make a folder with
$mkdir Kamikaze
$cd Kamikaze
$svn co svn://svn.openwrt.org/openwrt/trunk/
$make menuconfig
Well, I can't upload the code for the moment so I'll just save it away and post it later.
4/18/09
Well, its been a damn long time, and this has taught me the valuable lesson of writing down the steps I take to make something happen, or else I might forget as I have this time and it has forced me to re-figure out how I got this to work in the first place. The main problem I had, and have, is that I don't think I'm entirely sure how the OpenWRT makefile system works.
Well, assuming you have directory named trunk where all of your openwrt stuff is type
make menuconfig
make sure the following settings are set
Target System (Broadcom BCM947xx/953xx [2.6])
Target Profile (Linksys WRTSL54GS)
Kernel modules --->
Other modules --->
kmod-hid
kmod-input-core
kmod-input-evdev
USB Support --->
kmod-usb-core
kmod-usb-ohci
kmod-usb-storage
kmod-usb2
Then press escape key twice
Now type
make kernel_menuconfig
Then make sure the following are selected
[*] Enable lodable module support --->
[*] Enable the block layer --->
[*] Networking support --->
Device Drivers--->
Input device support--->
Generic input layer (needed for keyboard, mouse, ...)
Polled input device skeleton
Mouse interface
Joystick interface
Event interface
<*>Joysticks/Gamepads--->
I-force devices
[*]HID devices
[*]USB support
If I didn't mention something then it may have been set by default, or if I did and it was already set, no harm done.
Then press esc esc. It will then start to do some basic writing of configurations through the makefile process. (I think) Then it will say
I-Force devices (JOYSTICK_IFORCE) [M/n/?] m
I-Force USB joysticks and wheels (JOYSTICK_IFORCE_USB) [N/y/?] (NEW)
type yes. I'm not sure why this comes up. As I do more research with this project, I'll try and figure more of how it actually works.
It will then finish.
then type
make V=99
The V=99 is very important as it will prompt you for different things during the make process.
such as the joystick thing mentioned above, type yes again. It will do this twice during the make process.
once its done, we're going to upload the new firmware to the WRTSL54GS. If you don't already have it make sure you have atftp. If you're running a system with apt-get use the following.
sudo apt-get install atftp
Then pull up two terminals. Connect the WRTSL54GS to the same router or switch or hub that your computer is connected to. You can do it directly but its more a pain in the butt as you have to set your computer to a static IP address. Also, change your router's ipaddress to something other than 192.168.1.1 as that is what the WRTSL54GS defaults to during loading and during a hard reset if its is necessary to do so.
so in one window
ping 192.168.1.1
And in the other window
$cd bin
$atftp
tftp> connect 192.168.1.1
tftp> mode octet
tftp> trace
Trace mode on.
tftp> put openwrt-wrtsl54gs-squashfs.bin
Now wait and don't press enter. Disconnect the WRT and you should see no response in the window that is pinging the device. Click on the terminal that is running atftp, so you are ready to press enter. Plug the device in and as soon as you get a response from 192.168.1.1 in 1 window, press enter and write the new firmware to the device. If for some reason you are having troubles, try pushing in a small pin in the hole next to the power supply hole on the WRT as you are pushing in the power, this will put the WRT into a type of safe mode that may help with the loading. Now assuming all went well you should get this
.
.
.
sent DATA
received ACK
.
.
.
sent DATA
received ACK
tftp>
I'm assuming it should end in about the same block size.
type quit in the atftp window to exit that program and go to the terminal that was pinging, press
ctrl-c to stop it and then try telnet 192.168.1.1
you should be greeted by the OpenWrt prompt.
type passwd to set your password as we have to move some files over using scp.
so
root@OpenWrt:/# passwd
Changing password for root
New password:
Bad password: too weak
Retype password:
Password for root changed by root
root@OpenWrt:/# exit
ssh root@192.168.1.1
$ ssh root@192.168.1.1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
59:b6:61:9b:88:60:d0:af:c1:16:9a:02:f2:bb:76:82.
Please contact your system administrator.
Add correct host key in /home/santiago/.ssh/known_hosts to get rid of this message.
Offending key in /home/santiago/.ssh/known_hosts:1
RSA host key for 192.168.1.1 has changed and you have requested strict checking.
Host key verification failed.
If you get the above, just do
$rm /home/santiago/.ssh/known_hosts
$ssh root@192.168.1.1
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
RSA key fingerprint is 59:b6:61:9b:88:60:d0:af:c1:16:9a:02:f2:bb:76:82.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts.
root@192.168.1.1's password:
After typing in your password you should be back to OpenWRT prompt.
Now go back to your directory where you just uploaded OpenWRT
should be
~/Kamikaze/trunk/bin$
now
$cd packages/target-mipsel_uClibc-0.9.29/
scp kmod-usb-core_2.6.28.9-brcm47xx-1_mipsel.ipk kmod-usb-hid_2.6.28.9-brcm47xx-1_mipsel.ipk kmod-input-core_2.6.28.9-brcm47xx-1_mipsel.ipk kmod-input-evdev_2.6.28.9-brcm47xx-1_mipsel.ipk kmod-usb-ohci_2.6.28.9-brcm47xx-1_mipsel.ipk kmod-hid_2.6.28.9-brcm47xx-1_mipsel.ipk root@192.168.1.1:/home
By the time you try this OpenWRT may have moved on to a different kernel version, so don't worry if the numbers don't match, just type in scp followed by the first part of the module and use tab completion to finish it. In other words use the same modules for your version of the kernel.
Now in the terminal that has OpenWRT open,
root@OpenWrt:/home# opkg install kmod-usb-core_2.6.28.9-brcm47xx-1_mipsel.ipk km
od-input-core_2.6.28.9-brcm47xx-1_mipsel.ipk kmod-input-evdev_2.6.28.9-brcm47xx-
1_mipsel.ipk kmod-hid_2.6.28.9-brcm47xx-1_mipsel.ipk kmod-usb-ohci_2.6.28.9-brcm
47xx-1_mipsel.ipk kmod-usb-hid_2.6.28.9-brcm47xx-1_mipsel.ipk
They have to be installed in that order as some depend on others.
Now in openWRT
root@OpenWrt:/home#cd /lib/modules/2.6.28.9
Then back on your own machine, on the
$cd ~/Kamikaze/trunk/build_dir/linux-brcm47xx/linux-2.6.28.9/drivers/input
$scp joydev.ko root@192.168.1.1:/lib/modules/2.6.28.9/
$cd joystick/iforce
$scp iforce.ko root@192.168.1.1:/lib/modules/2.6.28.9/
Now back in the terminal with openWRT
$cd /lib/modules/2.6.28.9/
$insmod joydev.ko
$insmod iforce.ko
Now plug in the joystick and type in dmesg
$dmesg
.
.
.
usbcore: registered new interface driver iforce
usb 1-1: new full speed USB device using ohci_hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
drivers/input/joystick/iforce/iforce-packets.c: info cmd = ff01, data = 43
drivers/input/joystick/iforce/iforce-packets.c: info cmd = ff03, data = 45 00 01
drivers/input/joystick/iforce/iforce-packets.c: info cmd = ff01, data = 4f
drivers/input/joystick/iforce/iforce-packets.c: info cmd = ff04, data = 56 02 05 00
input: AVB Top Shot Pegasus as /devices/pci0000:00/0000:00:02.0/usb1/1-1/input/input0
Now lets give it a quick test. Still in OpenWRT
$cd /dev
root@OpenWrt:/dev# ls
1-1 mtd3ro shm
console mtd4 tty
cpu_dma_latency mtd4ro ttyS0
event0 mtdblock0 ttyS1
full mtdblock1 urandom
input mtdblock2 usb1
js0 mtdblock3 usb2
kmsg mtdblock4 usbdev1.1_ep00
log network_latency usbdev1.1_ep81
mem network_throughput usbdev1.2_ep00
mtd0 null usbdev1.2_ep01
mtd0ro port usbdev1.2_ep82
mtd1 ppp usbdev2.1_ep00
mtd1ro ptmx usbdev2.1_ep81
mtd2 pts zero
mtd2ro random
mtd3 root
root@OpenWrt:/dev#cat js0
|��|��|��|��|��|��|��|��|�|��|����|��|��|��|��|��|�������������������
���$�,���D�L���T�\���|�����������������������������������
����L��T���d��l���t�|������������������������������
����$���L�T���d�l������������������������
���$��,���^C
The ^c at the end if me pressing ctrl-c to stop the output. Obviously this isn't the way you want it to use the device. but it shows that it is being recognized and is working. In order to get more than that you need to have a test program such as jscal installed. I'll put details for that later, as I already know how to do it and it won't take long to put that one up.
command line search
to interactively search your history of commands press ctrl-r in linux from the shell
Subscribe to:
Posts (Atom)