My WiFi situation reciently got a little sketchy and my Chumby stopped connecting to the network.
Since I had a USB-to-Ethernet adapter, I decided that I would just try that out instead. In my first attempt I just plugged it in and found it did not work.
I turned to the Chumby wiki and quickly found a solution. It worked great, except for one thing... It requires that a USB thumb drive is plugged into the Chumby during boot.
Since Chumby is easily hackable, I quickly came up with a solution by modifying the rsS script that is executed during bootup.
Here is how I did it:
**UPDATE** With the new software update to Chumby (1.7.0 - Released on May 5th, 2009), this is no longer required, and Chumby will detect wired connections automatically!
***NOTE: If any firmware updates are released for Chumby, DELETE /psp/rfs1/rcS BEFORE running the update!***
***ANOTHER NOTE: This has the chance to cause your Chumby NOT to boot if you incorrectly modify the /psp/rfs1/rcS file! DO NOT DO THIS UNLESS YOU KNOW WHAT YOU ARE DOING***
- Boot up your Chumby with internet access and enable SSH on your Chumby.
- Login to your Chumby via SSH (User: root)
- Run the command: mkdir /psp/rfs1
- Run the command: cp /etc/init.d/rcS /psp/rfs1/rcS
- Open up vi on the file /psp/rfs1/rcS and delete about the first 40 lines (In other words delete everything through:
if [ -x /psp/rfs1/rcS ]; then
/psp/rfs1/rcS
exit
fi
The first line should now be: echo "Starting udevd as daemon")
- Find in the file "# run any scripts for debug configuration of chumby from a USB thumb drive"
- Before that line add:
insmod /drivers/usbnet.ko
insmod /drivers/asix.ko
udhcpc -t 5 -n -p /var/run/udhcpc.eth0.pid -i eth0
ifconfig rausb0 inet 127.0.0.1
/usr/chumby/scripts/sync_time.sh
- Reboot your Chumby and it should work!
Hopefully this helps you out!
It has been a year since I had to call up IBM Support. I ended up having the same problem with my computer again; where the GPU was having issues and I would also get a weird message on boot up saying "Fan Malfunction," which kept my computer for booting from time to time.
Apparently on the Thinkpad T61p's, there is a known issue with the Nvidia Quadro FX 570M, though no known issues with the T60p with their ATI Mobility FireGL V5200.
I finally decided to send in my computer in the middle of May and called up IBM Support and gave them my address. They claimed they sent me a box, and so I waited. Finally after a week I decided to call them up where they responded with "It's coming, but we don't have tracking right now, call back tomorrow and we'll have the tracking."
So, I did as I was told and called back the next day. Again, they did not have any tracking. In fact they said my case was closed. I reopened my ticket with them to get a box.
This time I was smarter and was not going to wait a week before calling them to see the status on my box. I called them the next day to get the status on my box. They said they my ticket was again closed, and no box was sent.
So, for the third time I ordered another box. I called them up the next day and gave them my Ticket Number, and they said I would finally have a box. (By now, I am starting to get to know the IBM Depot people really well, Larry was the one that actually made sure my box was ordered)
So now I have my box, two weeks after I opened my first ticket. I was fine with this, I knew getting into this that getting computer fixed would be a long process.
A few days after sending in my computer to the Depot I checked the status of my laptop on the web. It said the status was "Awaiting customer information." I checked my cell phone; nope no missed calls. They did not contact me. So I decided to contact them when I got home from work.
I called them up and again talked with Larry, who informed me that the Depot was closed so I could not talk to the actual technician. Instead I explained to him my situation and he put it in my case.
The next day I checked the status again, only to find it was still awaiting customer information, and I was again without a call. So I called up support and again I was greeted by Larry, who somehow remembered me and said he would escalate my case to the supervisor.
Again I checked my status the next day and it finally said "Fixed!" and I was getting my computer back!
So I received my computer a few days later and check the report on what was fixed. My display was replaced. I figured "whatever" and I powered up my computer, only to find I could only get a resolution of 1280x1024 despite how I should get a resolution of 1600x1200. I, stupidly, thought that it might be MY fault, that somehow Vista did not like getting a new display. I was wrong, so very wrong. I ended up reinstalling my computer to Windows XP and it STILL only said I could get a resolution of 1280x1024. Now, I started to realize that they installed the cheaper display.
I thought to myself, "Not again" and called up IBM support. After explaining my situation to the helpful lady (Who had to talk to her supervisor about my case; I think she was new) I was told a box would be sent out.
Oh boy, a box! I began to wonder how many times it would take to actually get a box this time.
Luckily for me, I got my box and sent in my computer again. The next day I got another box from DHL from IBM.
Apparently, one of the boxes I had asked for earlier FINALLY got back to me.
Whatever; another box for the landfill.
After my computer got to the Depot again, the status quickly changed to "Waiting for part. No ETA." I guess they finally decided to fix my problem, for real this time!
It ended up taking about a week for the part to arrive and they mailed my computer back to me. When I finally received the box, I again stupidly thought they fixed my problem... But, no! They fixed my original problem; they fixed my fan! Yet my screen was still the wrong screen!
I called them up again, and told them they did not fix my problem. They sent me yet anohter box and I sent in my computer. Soon after they quickly changed my status back to "Waiting Customer Information," and again I received no phone call from support. Later that night I called up the Depot to once again get told that I could not talk to the technician because they were 'closed'." I told the guy on the phone my story and he made a note in the case. I kept on getting this same guy (Larry again, great guy) for about 3 nights in a row (Because I worked during the day, I could notcall them up while they were "open"). Finally Larry said "You know what, let me just call down their anyways, I bet they haven't left." I was put on hold for about 10 minute and when he returned he said "Your case will be looked at by a supervisor."
The next day I checked the status on the web and the status changed to "Waiting for part. No ETA." I guess they finally agreed that it needed a new part... Hopefully it would be display they would change.
After a week of waiting they finally sent my computer back to me. I opened it up and powered it on... The right display!
Finally! My computer is fixed... Too bad it took them 2 months... Maybe if they just fixed it right to begin with I wouldn't be shopping for another computer right now.
I have been working a lot with Java the past few months working on my Minesweeper solver. (This is currently the older version; the new version includes new solvers) It is written in Java, so there have been a lot of cool things I have learned because of this project.
Here they are (in no particular order):
Setting the UI to look less Swingy
As much as some might like the default look of the Swing, I do not. It just does not fit with the rest of the windows on my screen. So, there is a really simple way to have the java UI match your operating system!
try
{
javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
}
catch(Exception E)
{
System.out.println("Error setting look and feel");
}
Overlaying labels in Swing
I wanted to make two JLabel's stack on each other, while still being able to see both labels. It turns out there is a really easy way to do this using a JLayeredPane!
When you add the JLabel to a panel, just pass the argument JLayeredPane.DEFAULT_LAYER or JLayeredPane.PALETTE_LAYER.
JLayeredPane panel = new JLayeredPane();
JLabel below = new JLabel("I am below");
below.setLocation(0, 0);
panel.add(below, JLayeredPane.DEFAULT_LAYER);
JLabel above = new JLabel("I am above");
cellLabel.setLocation(0, 0);
keyPanel.add(cellLabel, JLayeredPane.PALETTE_LAYER);
The only downside is you have to use absolute positioning, but it works!
Making threads and stopping threads
I also had to work on managing some threads which was completely new to me.
Here is how you can make a thread.
- Make sure the class you want to make into a thread
implements Runnable
- Create a
public void run() method of what you want the thread to do when you run it
- Now start the thread;
Thread myThread = new Thread(myClass);
myThread.run();
And if you want to stop your thread you can call
myThread.interrupt();
Although this will not really do to much, since you have to write the code to interrupt the thread yourself!
The way I decided to do this was in my
run method.
public void run()
{
try
{
// Code
if(Thread.interrupted())
{
throw new InterruptedException();
}
// Code
}
catch(InterruptedException ex)
{
// We have been interrupted!
}
}
After the you call
Thread.interrupted() it will remove the interrupted flag, so you have to handle it right away. You should add these statements throughout your thread and throughout the methods that your thread calls, so it can be interrupted quicker.
I recently acquired a Zune 30GB (in Brown) and a Belkin Folio Kickstand Case for Zune (F8M031).
I really like the case, my only problem is that you cannot click the Play/Pause and Back buttons while it is in the case. This is a design flaw of the case, I tried out 3 cases and they all had the same problem. In fact, reading the Amazon.com Reviews of the case seam to show that everyone is having this button problem.
In the design of the case, there are pieces of rubber imbedded inside the leather case which click the buttons on the Zune. The problem with the case is, these pieces of rubber are not aligned correctly inside the leather.
The fix to this is quite easy, move the pieces of rubber.
***NOTE: Moving the pieces of rubber will VOID the case's warrantee!***
- Put your Zune in the case
- Figure out what way the Back button rubber piece needs to move in the case for both buttons to function correctly.
- Take your Zune out of the case
- With a razor blade, cut along the seam of the Back button to expose the piece of rubber
- With some tweezers, carefully move the rubber piece in the direction you determined from step 2. The rubber piece is glued down, though if you gently nudge the rubber piece you can get it loose
- Put your Zune back in the case. If the buttons still do not work correctly, go back to step 2
The Belkin Zune Case now fits my Zune perfectly!