July 26, 2009Upgrading to kernal 1.4.1 by following kernal upgrade instructions
- downloaded zImage for 1.4.1
- cd to directory
- scp zImage-BUG-R1.4.1.bin root@10.10.10.10:/home/root
- ssh root@10.10.10.10
ln -s /home/root/ /root - mv /root/zImage-BUG-R1.4.1.bin /root/new_zImage_bug
- bug_kflash
/sbin/reboot NOT /usr/bin/reboot - cat /proc/version:
- Linux version 2.6.27.2 (buildbot@darner) (gcc version 4.1.2) #116 PREEMPT Tue Jun 2 13:02:08 EDT 2009
Upgraded Root FS by following the root fs upgrade instructions- cd MMC_BACKUPS/
- dd if=/dev/disk1s1 of=BUG_backup26Jul09.ext3.bin
- curl http://bugcommunity.com/downloads/files/bug-image-production-bug-R1.4.1-rootfs.ext3.bz2 > bug-image-production-bug-R1.4.1-rootfs.ext3.bz2
- bunzip2 bug-image-production-bug-R1.4.1-rootfs.ext3.bz2
- dd if=bug-image-production-bug-R1.4.1-rootfs.ext3 of=/dev/disk1s1
- /usr/local/sbin/e2fsck -f /dev/disk1s1
- /usr/local/sbin/resize2fs /dev/disk1s1
March 17, 2009- now that i have kernal and root fs at R1.4
- checking GPS -> IOX 63, Fix is still FALSE!
March 16, 2009
- got 1.4 rootFS to work (at least I think it works not 100% sure since I haven't SSH'ed in !)! was *my* bug, tar's -j option didn't unzip the bz2 file instead use:
- bzip2 -d filename
- see attached script file for all the gory details!
- hmmm bug always shows buglabs logo but can't ssh in and buttons don't do anything
- oops didn't realize you have to:
- upgrade kernal first and THEN
- upgrade root FS.
Will:
- downgrade root FS to 1.3 and then
- upgrade kernal to 1.4 and then
- re-upgrade root FS to 1.4
- Upgrading the kernal (shtudown AND upgrade root FS to R 1.4 before rebooting after upgrade i.e. do not follow the kernal upgrade wiki pages which says to reboot to check out the kernal version )
- cd Downloads/ (or whereever you downloaded the .bin kernal file)
- scp zImage-BUG-R1.4.bin root@10.10.10.10:/home/root
- On the BUG:
ssh root@10.10.10.10
modprobe bug_kflash ln -s /home/root/ /root mv /root/zImage-BUG-R1.4.bin /root/new_zImage_bug root@bug:~# /sbin/bug_kflash -sh: /sbin/bug_kflash: not found
root@bug:~# modprobe bug_klash FATAL: Module bug_klash not found. root@bug:/# find . -name bug_kflash ./sys/class/misc/bug_kflash ./sys/module/bug_kflash ./media/mmcblk0p1/usr/bin/bug_kflash ./usr/bin/bug_kflash ./dev/bug_kflash ./dev/.udev/names/bug_kflash root@bug:/# /usr/bin/bug_kflash
>>> CAUTION - PROGRAMMING FLASH (WAIT ...) <<<
programming block at offset 0x0 ... programming block at offset 0x10000 ... programming block at offset 0x20000 ... programming block at offset 0x30000 ... programming block at offset 0x40000 ... programming block at offset 0x50000 ... programming block at offset 0x60000 ... programming block at offset 0x70000 ... programming block at offset 0x80000 ... programming block at offset 0x90000 ... programming block at offset 0xa0000 ... programming block at offset 0xb0000 ... programming block at offset 0xc0000 ... programming block at offset 0xd0000 ... programming block at offset 0xe0000 ... programming block at offset 0xf0000 ... programming block at offset 0x100000 ... programming block at offset 0x110000 ... programming block at offset 0x120000 ... programming block at offset 0x130000 ... programming block at offset 0x140000 ... programming block at offset 0x150000 ... programming block at offset 0x160000 ... programming block at offset 0x170000 ... programming block at offset 0x180000 ... programming block at offset 0x190000 ... programming block at offset 0x1a0000 ... programming block at offset 0x1b0000 ...
>>> CAUTION - PROGRAMMING FLASH (WAIT ...) <<<
>>> PROGRAMMING COMPLETE <<< shutdown using power switch and the removed MMC and put in SD card reader in order to upgrade root FS
- ONLY AFTER SUCCESSFUL Kernal upgrade, upgrade Root FS to R1.4 :
- cd <directory where root fs R 1.4 is>
- <verify using system preferences ExtFSManager system pref panel where the MMC is, in my case it is /dev/disk1s1>
- sudo dd if=bug-image-production-bug-R1.4-rootfs.ext3 of=/dev/disk1s1
- 59228928 bytes transferred in 180.005093 secs (884580 bytes/sec)
- sudo /usr/local/sbin/e2fsck -f /dev/disk1s1
- e2fsck 1.39 (29-May-2006)
- Filesystem did not have a UUID; generating one.
- Filesystem has feature flag(s) set, but is a revision 0 filesystem. Fix<y>? yes
- Pass 1: Checking inodes, blocks, and sizes
- Pass 2: Checking directory structure
- Pass 3: Checking directory connectivity
- Pass 4: Checking reference counts
- Pass 5: Checking group summary information
- /dev/disk1s1: ***** FILE SYSTEM WAS MODIFIED *****
- /dev/disk1s1: 10140/19456 files (0.4% non-contiguous), 134837/155497 blocks
- sudo /usr/local/sbin/resize2fs /dev/disk1s1
- resize2fs 1.39 (29-May-2006)
- Resizing the filesystem on /dev/disk1s1 to 1839408 (1k) blocks.
- The filesystem on /dev/disk1s1 is now 1839408 blocks long.
- root@bug:~# cat /proc/version
- Linux version 2.6.27.2 (buildbot@darner) (gcc version 4.1.2) #104 PREEMPT Thu Mar 12 11:32:33 EDT 2009
March 15, 2009
- Left what I hope is constructive criticism (please make it clear what's stable at buglabs.net and please consolidate your technical web presence).
- Q: R 1.4 Kernal and Root FS are separate downloads which one do I do first? Or does the order even matter?
- A: http://bugcommunity.com/wiki/index.php/Latest_BUG_Releases has links to "Upgrading your Burg Kernal" and "Update uorur BUG memory card" is "memory card" the same as Root FS? My guess is yes!
- Yes memory card == Root FS, here's the HOW to upgrade ROOT FS aka "Update your BUG memory card"
- instructions worked perfectly (installed beta version from 1.4d4 dec 2006 of extFS software on my Mac) device is /dev/disk1s1
- mkdir MMC_BACKUPS
- cd MMC_BACKUPS
- roland-tanglaos-macbook-pro:MMC_BACKUPS rolandtanglao$ dd if=/dev/disk1s1 of=BUG_backup.ext3.bin
- 678822+0 records in 3678822+0 records out 1883556864 bytes transferred in 429.057315 secs (4389989 bytes/sec)
- tar xvfjv bug-image-production-bug-R1.4-rootfs.ext3.bz2
- roland-tanglaos-macbook-pro:MMC_BACKUPS rolandtanglao$ ls
- BUG_backup.ext3.bin bug-image-production-bug-R1.4-rootfs.ext3.bz2
- sudo dd if=bug-image-production-bug-R1.4-rootfs.ext3.bz2 of=/dev/disk1s1
- 95105+1 records in
- 95105+1 records out
- sudo /usr/local/sbin/fsck.ext3 /dev/disk1s1
- e2fsck 1.39 (29-May-2006)
- Couldn't find ext2 superblock, trying backup blocks...
- /usr/local/sbin/fsck.ext3: Bad magic number in super-block while trying to open /dev/disk1s1
- The superblock could not be read or does not describe a correct ext2
- filesystem. If the device is valid and it really contains an ext2
- filesystem (and not swap or ufs or something else), then the superblock
- is corrupt, and you might try running e2fsck with an alternate superblock:
- e2fsck -b 8193 <device>
- sudo /usr/local/sbin/resize2fs /dev/disk1s1
- resize2fs 1.39 (29-May-2006)
- /usr/local/sbin/resize2fs: Bad magic number in super-block while trying to open /dev/disk1s1
- Couldn't find valid filesystem superblock.
- bugs :-) :
- doesn't seem to reboot, all i see is the bug labs logo and then nothing
- Debugging Strategies and Guesses
- bug in the ext3 filesystem caused image to be corrupted?
- bug in curl?
- something else?
- or perhaps it is working, it's just hanging, will try logging in with usb
- Logging in with USB
- failed, because system is hung?
- What next?
- revert back to R1.3 file system?
- Check bug forums?
- unfortunately nothing on the forums! http://bugcommunity.com/forums/index.php
March 13, 2009
- SDK, 1.2.8.1, for R1.4 came out, time to install 1.4 RC 800000 :-) I guess!
January 18, 2009
- Trying out Simon's accelerometer app
- moved to a new laptop so had to re-install Eclipse, looks like the Ethernet "shim" program is not needed anymore
- what units are returned by getAccelerationX(), getAccelerationY() and getAccelerationZ()?
- looks like the answer is in the Puck app, http://www.buglabs.net/applications/Puck, specifically in PuckApp.java
- also bugLevel, http://buglabs.net/applications/BUGLevel, BugLevelApplication.java using unsupported :-( APIs
- looks like http://bugcommunity.com/wiki/images/b/b3/AccelerometerAPI_v1_1.pdf is the documentation but that PDF doesn't say what the units are for getAcceleration methods
- perhaps the units are on page 5 of the Hardware PDF at: http://bugcommunity.com/wiki/images/9/91/BUG2_MotionDetector_Accelerometer_Module_Hardware_Design_Spec_wiki_2008_10_03.pdf
- "The accelerometer provides all three axes of acceleration, x-, y-, and z-axis. The orientation of the part on the
module is therefore important. Using the convention stated in the data sheet, the + direction is the direction of
acceleration. The orientation of the part on the Module is
depicted in Figure 2. Note the dot in the figure indicating the
location of pin 1 on the device.
Note that the accelerometer device is ratiometric, meaning
that the output voltage from each axis is referenced to
VDD/2, mid-range of the device power supply. On the
BUGmotion Module, VDD is 2.90V, so the center-scale
voltage is half that or 1.45V. Therefore, an acceleration of 0
on any axis will result in an output voltage of 1.45V on that
axis.
A couple examples are in order here. With the module lying
flat on the table, we see that +Z is down from the chip, and
the resulting Zout voltage is (approximately, at the highest
sensitivity setting)
1.45V + 0.48V = 1.93V
because the device is accelerating downward at 1g. If I lift the
Bug, the g-number should increase (more + acceleration); if I
drop the device, the Zout value should decrease (until it hits
the table). Similarly, if I stand my Bug on edge on the table,
with the QTE connector up and accelerometer down, the Zout
voltage returns to "0" (which is mid-range or 1.450V), but the
X acceleration is in the negative direction, and the resultant
Xout voltage is
1.45V – 0.48V = 0.97V
which is again downward at 1g.
Note that the user must allow for an enable delay between the
time the SLEEP signal is released and when the device can
begin reporting accurate measurements. "
January 3, 2009
- got the following progams to work: xmastree2, gpsrawfeedexanple
- couldn't get any other GPS programs to work or bugweather to work (java exception)
- twitterbug worked but couldn't figure out how to attach a keyboard or how to enter characters for twitter id and password from LCD screen
December 6, 2008
- Was able to successfully load and run LED App, Xmastree2, directly from Eclipse
- But couldn't figure out how to load other apps from Eclipse!?!?! (admittedly i only spent 10 minutes or so trying!)
- Did I say I hate Java :-) ? I do but perhaps using with the BUG will make me love Java a bit more!
To-Dos
- Watch all the BUG Labs "gettting started" videos
- Write (or find) the simplest possible GPS app
- Try out all the GPS related apps
- possible project: Hook up a microphone so i can voiceblog with GPS coordinates while riding my bicycle with the BUG in my pocket
Questions
- How do I figure out what version of Bug Software I have? My guess is i have R1.3 and GPS bug is fixed in R1.4
- uname -a
- Linux bug 2.6.24.4 #68 PREEMPT Thu Oct 9 17:23:00 EDT 2008 armv6l unknown
- cat /proc/version
- Linux version 2.6.24.4 (build@darner) (gcc version 4.1.2) #68 PREEMPT Thu Oct 9 17:23:00 EDT 2008
- SDK: Eclipse->About Eclipse SDK-> click on Dragon Fly Icon
- 1.1.7.39.P20081202
- "R1.4 of BUG software is in the process of being QAed right now, and we hope to have it available to our users soon." http://bugcommunity.com/forums/viewtopic.php?t=396 December 23, 2008
- What is the funny cable that I couldn't figure out? picture: http://flickr.com/photos/roland/3088055777/in/set-72157610837577626/
- Answer from Peter Semmelhack, CEO is that it's a GPS antenna, d'oh!
- Why doesn't my GPS seem to work? By "not working", I mean it doesn't get a GPS satellite lock which results in a Java exception for those using the high level API and void values e.g. "$GPGLL,,,,,022837.595,V*1D "for apps reading the RAW GPS sentences. My guess is it's a low level software bug that will be fixed in the "real soon now" R1.4 software release.Note that I have attached the external antenna and put it on the window sill where my other GPSes (Nokia LD-4W, Nokia E71) have no problems obtaining a GPS lock!
- http://bugcommunity.com/forums/viewtopic.php?t=351 seems to be the definitive source of how to fix your GPS! the fix in the thread:
- "navigate the front-panel menu to the GPS module
and you will be able to see fix: True/False and IOX, which is the value
of the IOX register:"
- (front panel led sequence is: modules->GPS->IOX) I get 0x63 which means
- bit 0: 1 == no GPS fix, since fix is active low
- bit 1: 1 = no overcurrent condition
- bit 2: 0 = no wakeup from sleep
- bit 3: 0 = don't know what this is, guess is 0 means don't download firmware
- bit 4,5 unused
- bit 7,6 0,1 == external antenna
- Other people's code I have tried
- GPSRawFeedExample always outputs "V*blah" which I think means void!
- e.g. $GPGLL,,,,,051302.397,V*10
- GPSLoggerSimpleGUI - the GUI doesn't work but at least the program doesn't crash :-)
- GPSLogger2 creates a zero length file in /tmp but does nothing else e.g. /tmp/GPSSun Jan 04 20:25:49 UTC 2009.log
- GpsLogger_1.1 java.lang.NullPointerException
at com.buglabs.bug.module.gps.GPSModlet.getLatitudeLongitude(Unknown Source)
- My friend Simon's app has the same bug as GPS Logger 1.1 i.e. java.lang.NullPointerException
at com.buglabs.bug.module.gps.GPSModlet.getLatitudeLongitude(Unknown Source)
- Simon's guess: the NMEA sentence they are getting from the underlying
hardware isn't quite in the format they expect, so they end up trying
to get a double out of the string ","
- http://lists.buglabs.net/pipermail/bug-dev/2008-December/000167.html seems to be the same problem!
- Evidence that this is a Bug that's being worked on:
- this fix went into svn trunk (svn://svn.buglabs.net/bug/trunk ) on December 14, 2008, http://svn.buglabs.net/svn/!revision/7632
// default to passive (external) antenna, until
// such time as we have confidence in the internal
// antenna's ability to obtain a fix
log.log(LogService.LOG_DEBUG, "GPSModlet defaulting to passive (external) antenna");
setPassiveAntenna();
- date is reset to Jan 1, 1970 everytime why?
- workaround: Usage: date [OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT] e.g. date 011814572009.00
- How do I use f***ing Eclipse?
- Easy: always make sure the Dragonfly Perspective is open from Window->Open Perspective->Other
- How do I load code from a JAR from other people for a Bug APP that's not on BUGnet?
- "New Bug Project" (one of the funny icons on the top left , the one in the middle)
- Select All Services, and select your Bug, then click Finish
- Right Click->Import->General->Archive File->Browse->blah.jar
- Select "Yes To All" when asked about "Overwrite .project" in folder
- Right Click "Send to Bug"
How Tos
How To Create a Project from a Jar created with the simulator or by another bug user
- For each jar create a project with the same name excluding the version, e.g., for HelloRoland_1.0.0.jar the project should be HelloRoland
- Once you've done that control click the project and select Import, open the General section and double-click on Archive File browse to the jar and then select Open then select Finish in the resulting panel.
- It will ask you whether you want to overwrite.Select Yes To All
How to check out the log file from your bug app
- ssh -l root 10.10.10.10 p: root
- tail -f /var/log/concierge.log
How to get the OSGI console
- telnet 10.10.10.10 8090
- printlog CoolApp to print out all CoolApp logs
How to read the GPS
- cat /dev/ttymxc/2 - Change "2" to the slot number where the GPS is inserted
How to use Eclipse
- Shift Space to get method completion
- Window ->Dragonfly perspective is what you want!
|
Attachments (3)
-
gps.nmea - on Jan 22, 2009 8:45 AM by Roland Tanglao (version 3 / earlier versions)
3k
Download
-
gps22jan09.nmea - on Jan 22, 2009 5:35 PM by Roland Tanglao (version 1)
1000k
Download
-
upgradingRootFSToR1.4.txt - on Mar 16, 2009 1:07 PM by Roland Tanglao (version 1)
17k
Download
|