Using LogCat to debug program
http://www.droidnova.com/debugging-in-android-using-eclipse,541.html
Space Studies David
2011년 11월 18일 금요일
2011년 8월 27일 토요일
2011년 6월 23일 목요일
Using Kinetisense in Windows 7 (+Vista?)
(Applies when using provided Linksys Bluetooth adapter)
The manual is based on Windows XP.
Following the instruction of the manual, it requires to install Linksys Bluetooth driver.
However, after installing the driver in Windows 7,
Kinetisense program couldn't receive the data from Kinetisense via Bluetooth,
even with correct COM port setting.
The solution is very simple, just use the driver provided by Windows itself.
To do, don't install the driver manually and uninstall if already has installed.
(After the uninstallation if needed)
Just plug the adapter, then it will automatically install driver from Windows itself.
Then pair Kinetisense at 'Devices and Printers' in Control Panel,
then try 'Real-time data' Kineticsense program with correct COM port settings.
(In my case, COM port 5 and 6 are added as 'Bluetooth COM port', and I received the data through COM5)
The manual is based on Windows XP.
Following the instruction of the manual, it requires to install Linksys Bluetooth driver.
However, after installing the driver in Windows 7,
Kinetisense program couldn't receive the data from Kinetisense via Bluetooth,
even with correct COM port setting.
The solution is very simple, just use the driver provided by Windows itself.
To do, don't install the driver manually and uninstall if already has installed.
(After the uninstallation if needed)
Just plug the adapter, then it will automatically install driver from Windows itself.
Then pair Kinetisense at 'Devices and Printers' in Control Panel,
then try 'Real-time data' Kineticsense program with correct COM port settings.
(In my case, COM port 5 and 6 are added as 'Bluetooth COM port', and I received the data through COM5)
2011년 5월 11일 수요일
install script for usrp1 + gnuradio 3.1.1 + ubuntu 8.04 + bbn or span
# By Sangwook Bak (POSTECH ITCE, Ph.D candidate, bswprl@postech.ac.kr)
# Tested with USRP1, Ubuntu 8.04, Gnuradio 3.1.1, Virtualbox 4.0.6
# on iMac 27 with Mac OSX 10.6.7
# References
# http://gnuradio.org/redmine/wiki/gnuradio/LegacyUbuntuInstall
# http://www.ubuntu.or.kr/viewtopic.php?p=12079
# https://www.cgran.org/wiki/BBN80211
# https://www.cgran.org/wiki/SPAN80211b
# http://www.mail-archive.com/freebsd-questions@freebsd.org/msg197769.html
# Instead of KAIST repository, replace it to DAUM repository
# as KAIST repository is unstable
sudo wget http://prl85.com/attachment/cfile22.uf@141FAB3F4DCA75FE0ABDB9.list -O /etc/apt/sources.list
sudo apt-get update
# Install necessary libraries
sudo apt-get -y install swig g++ automake1.9 autoconf libtool python-dev fftw3-dev libcppunit-dev libboost-dev sdcc libusb-dev libsdl1.2-dev python-wxgtk2.6 git-core guile-1.8-dev libqt4-dev python-numpy ccache python-opengl libgsl0-dev python-cheetah python-lxml doxygen qt4-dev-tools libqwt5-qt4-dev libqwtplot3d-qt4-dev pyqt4-dev-tools subversion
# Install gnuradio 3.1.1
wget http://ftp.gnu.org/gnu/gnuradio/gnuradio-3.1.1.tar.gz
tar xvfz gnuradio-3.1.1.tar.gz
cd gnuradio-3.1.1
./configure
make
sudo make install
# Settings for using USRP in linux
# Change <username> to actual user id
sudo addgroup usrp
sudo usermod -G usrp -a <username>
echo 'ACTION=="add", BUS=="usb", SYSFS{idVendor}=="fffe", SYSFS{idProduct}=="0002", GROUP:="usrp",
MODE:="0660"' > tmpfile
sudo chown root.root tmpfile
sudo mv tmpfile /etc/udev/rules.d/10-usrp.rules
sudo /etc/init.d/udev stop
sudo /etc/init.d/udev start
# Connect USRP
ls -lR /dev/bus/usb | grep usrp
# There should be some output like following:
# crw-rw---- 1 root usrp 189, 129 2011-05-11 21:01 002
sudo ldconfig
# In case of x11 boot failure,
# add following statement before ‘exit 0’ in /etc/rc.local
# chmod 666 /dev/null
# In case of SSL error when using svn to download bbn or span, do following
sudo chmod 0666 /dev/random
# Download BBN (Both for SPAN and BBN)
cd ../
svn co https://www.cgran.org/cgran/projects/bbn_80211/trunk bbn_80211
# Download and Install SPAN802.11 (Skip if installing BBN802.11)
svn co https://www.cgran.org/cgran/projects/span_80211b/trunk span_80211b
sudo cp span_80211b/images/usrp_std_d2.rbf /usr/local/share/usrp/rev4
sudo cp span_80211b/images/usrp_std_d2.rbf /usr/local/share/usrp/rev2
cp span_80211b/src/host/* bbn_80211/src/examples/
# Install BBN (Both for SPAN and BBN)
cd bbn_80211/
./bootstrap; ./configure; make; sudo make install
# Tested with USRP1, Ubuntu 8.04, Gnuradio 3.1.1, Virtualbox 4.0.6
# on iMac 27 with Mac OSX 10.6.7
# References
# http://gnuradio.org/redmine/wiki/gnuradio/LegacyUbuntuInstall
# http://www.ubuntu.or.kr/viewtopic.php?p=12079
# https://www.cgran.org/wiki/BBN80211
# https://www.cgran.org/wiki/SPAN80211b
# http://www.mail-archive.com/freebsd-questions@freebsd.org/msg197769.html
# Instead of KAIST repository, replace it to DAUM repository
# as KAIST repository is unstable
sudo wget http://prl85.com/attachment/cfile22.uf@141FAB3F4DCA75FE0ABDB9.list -O /etc/apt/sources.list
sudo apt-get update
# Install necessary libraries
sudo apt-get -y install swig g++ automake1.9 autoconf libtool python-dev fftw3-dev libcppunit-dev libboost-dev sdcc libusb-dev libsdl1.2-dev python-wxgtk2.6 git-core guile-1.8-dev libqt4-dev python-numpy ccache python-opengl libgsl0-dev python-cheetah python-lxml doxygen qt4-dev-tools libqwt5-qt4-dev libqwtplot3d-qt4-dev pyqt4-dev-tools subversion
# Install gnuradio 3.1.1
wget http://ftp.gnu.org/gnu/gnuradio/gnuradio-3.1.1.tar.gz
tar xvfz gnuradio-3.1.1.tar.gz
cd gnuradio-3.1.1
./configure
make
sudo make install
# Settings for using USRP in linux
# Change <username> to actual user id
sudo addgroup usrp
sudo usermod -G usrp -a <username>
echo 'ACTION=="add", BUS=="usb", SYSFS{idVendor}=="fffe", SYSFS{idProduct}=="0002", GROUP:="usrp",
MODE:="0660"' > tmpfile
sudo chown root.root tmpfile
sudo mv tmpfile /etc/udev/rules.d/10-usrp.rules
sudo /etc/init.d/udev stop
sudo /etc/init.d/udev start
# Connect USRP
ls -lR /dev/bus/usb | grep usrp
# There should be some output like following:
# crw-rw---- 1 root usrp 189, 129 2011-05-11 21:01 002
sudo ldconfig
# In case of x11 boot failure,
# add following statement before ‘exit 0’ in /etc/rc.local
# chmod 666 /dev/null
# In case of SSL error when using svn to download bbn or span, do following
sudo chmod 0666 /dev/random
# Download BBN (Both for SPAN and BBN)
cd ../
svn co https://www.cgran.org/cgran/projects/bbn_80211/trunk bbn_80211
# Download and Install SPAN802.11 (Skip if installing BBN802.11)
svn co https://www.cgran.org/cgran/projects/span_80211b/trunk span_80211b
sudo cp span_80211b/images/usrp_std_d2.rbf /usr/local/share/usrp/rev4
sudo cp span_80211b/images/usrp_std_d2.rbf /usr/local/share/usrp/rev2
cp span_80211b/src/host/* bbn_80211/src/examples/
# Install BBN (Both for SPAN and BBN)
cd bbn_80211/
./bootstrap; ./configure; make; sudo make install
RSSI Measurement Questions
Reference: from Document "The USRP under 1.5X Magnifiying Lens!"
Q) Is RSSI measuring possible with the USRP motherboard and the RFX transceiver board? I know we have the RSSI circuit onboard, but I don't know on which frequencies it scans?
Q) Is RSSI measuring possible with the USRP motherboard and the RFX transceiver board? I know we have the RSSI circuit onboard, but I don't know on which frequencies it scans?
A) The RSSI on the motherboard will tell you the power within approx. +/- 15 MHz from your carrier. You can also get a digital RSSI which will tell you the power within your signal of interest. The way we have envisioned RSSI is as a 3-part measurement:
1) Analog RSSI (we can read it using AUX ADC)
2) Digital RSSI in FPGA (from output of ADCs)
3) Digital RSSI in host (computed however you like, from the channel zed signal sent over the bus by the USRP)
If you want to use the measured analog RSSI, it will measure whatever passes through the analog channel filter. You can only change that bandwidth by changing inductors and capacitors. Note also that analog RSSI is only on the RFX900, RFX1200, RFX1800, and RFX2400. The RFX400, TVRX, and DBSRX do not have that capability.
Q) Is there an RSSI circuit on these boards? I'm using the Flex 2400.
A) The RFX900, 1200, 1800, and 2400 have an RSSI circuit on board. The RFX400 does not. To read the RSSI value, use read_aux_adc(side,0). The RSSI measures the analog signal level after the lowpass filters on the board. These filters are about 15-20 MHz wide. Thus, anything falling in that band will cause a rise in the RSSI value. It is connected to the low-speed adc AUX_ADC_A1, so you need to read that with read_aux_adc(which_dboard,0) See usrp1.i (and in usrp_basic.{cc, h}):
int read_aux_adc (int which_dboard, int which_adc);
The RSSI reads the power in the analog baseband signals (power (I) + power (Q)). The analog baseband will contain signals from approximately +/- 15 MHz from the LO frequency.
Q) I can read the analog RSSI indicator with the auxiliary ADCs, but it is not connected to the gain control. Instead, an auxiliary DAC controls the gain control, right?
A) Yes, that is correct. You can reconfigure the board by moving some resistors around to make it automatic if you wanted.
Q) How do I set the mux register to look at the AUX_ADC inputs?
A) You don't use the mux register to read the AUX_ADCs. See usrp/host/lib/usrp_{basic,standard}.h for docs on all of this stuff. See especially usrp_basic_rx::read_aux_adc and usrp_basic_tx::read_aux_adc
/*!
* \brief Read auxiliary analog to digital converter.
*
* \param which_dboard [0,1] which daughterboard
* \param which_adc [0,1]
* \param value return 12-bit value [0,4095]
* \returns true iff successful
*/
bool read_aux_adc (int which_dboard, int which_adc, int *value);
/*!
* \brief Read auxiliary analog to digital converter.
*
* \param which_dboard [0,1] which daughterboard
* \param which_adc [0,1]
* \returns value in the range [0,4095] if successful, else READ_FAILED.
*/
int read_aux_adc (int which_dboard, int which_adc);
The second version has a python binding:
v = u.read_aux_adc(0, 0)
where u is an instance of a usrp.source_c or usrp.sink_c
The bad news is that these are read asynchronously using a slow path over the USB. You probably can't read them fast enough to sample to your input signal, and the sampling is asynchronous.
* \brief Read auxiliary analog to digital converter.
*
* \param which_dboard [0,1] which daughterboard
* \param which_adc [0,1]
* \param value return 12-bit value [0,4095]
* \returns true iff successful
*/
bool read_aux_adc (int which_dboard, int which_adc, int *value);
/*!
* \brief Read auxiliary analog to digital converter.
*
* \param which_dboard [0,1] which daughterboard
* \param which_adc [0,1]
* \returns value in the range [0,4095] if successful, else READ_FAILED.
*/
int read_aux_adc (int which_dboard, int which_adc);
The second version has a python binding:
v = u.read_aux_adc(0, 0)
where u is an instance of a usrp.source_c or usrp.sink_c
The bad news is that these are read asynchronously using a slow path over the USB. You probably can't read them fast enough to sample to your input signal, and the sampling is asynchronous.
Document "The USRP under 1.5X Magnifiying Lens!"
Original from http://gnuradio.org/redmine/attachments/129/USRP_Documentation.pdf
Good document for USRP beginner..
In case of future unavailability (sometimes, it really happens), I also uploaded the document in my blog...
Download it
Good document for USRP beginner..
In case of future unavailability (sometimes, it really happens), I also uploaded the document in my blog...
Download it
Installing RRDTool on Mac
Install macport 1.9.2
(http://www.macports.org/install.php)
sudo port -d selfupdate
sudo port install autoconf glib2 cairo pango
On RRDTool source folder,
./autogen.sh
./configure
make
sudo make install
On rrdtool/examples folder,
./minmax.pl
./4charts.pl
(http://www.macports.org/install.php)
sudo port -d selfupdate
sudo port install autoconf glib2 cairo pango
On RRDTool source folder,
./autogen.sh
./configure
make
sudo make install
On rrdtool/examples folder,
./minmax.pl
./4charts.pl
피드 구독하기:
게시물 (Atom)