Monday, February 17, 2020

Cisco 3702e in Autonomous Mode

The AIR-CAP3702E-A-K9 I purchased on eBay came configured in lightweight mode and with an unknown password. I reset it to factory setting by pressing and holding Mode button for 10 seconds or more. It rebooted into the boot loader. First thing to do was to set up a TFTP server on my Mac, which had IP address 10.10.1.46, and put the new image into /private/tftpboot/.
sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist
sudo launchctl start com.apple.tftpd
After all was done, stop it:
sudo launchctl stop com.apple.tftpd
My USB to serial adapter was Prolific. To install the drivers:
brew tap homebrew/cask-drivers
brew cask install prolific-pl2303
Now, connect to the AP.
screen /dev/cu.usbserial

ap: set DEFAULT_ROUTER 10.10.1.1
ap: set IP_ADDR 10.10.1.200
ap: set NETMASK 255.255.255.0
ap: tftp_init
ap: ether_init
ap: flash_init
ap: tar -xtract tftp://10.10.1.46/ap3g2-k9w7-tar.153-3.JC3.tar flash:
ap: set BOOT flash:/ap3g2-k9w7-mx.153-3.JC3/ap3g2-k9w7-xx.153-3.JC3
ap: boot
The AP rebooted into new image, I was able to ssh to it, but for some reason web interface did not work. Didn't want to spend time troubleshooting this. Just reloaded another image. I also decided to save current software, just in case. For that to work I had to touch /private/tftpboot/ap3g2-rcvk9w8-mx.tar.
ap>en
ap#archive tar /create tftp://10.10.1.46/ap3g2-rcvk9w8-mx.tar flash:/ap3g2-rcvk9w8-mx
ap#archive download-sw /overwrite /reload tftp://10.10.1.46/ap3g2-k9w7-tar.153-3.JBB5.tar
To configure the access point, follow the instructions in Cisco IOS Configuration Guide for Autonomous Cisco Aironet Access Points.

Thursday, January 29, 2015

How to Convert Quicken QFX files to QuickBooks QBO files for Import via Web Connect

The files actually have identical structure. There are only three things preventing the import:
  1. Download the file as "Quicken 2004 or Newer (QFX)"
  2. Replace file extension from .qfx to .qbo
  3. In the file, replace <INTU.BID> number with 10308 for BofA. See the link below for other banks.
  4. (This may not be necessary) In the file header replace <FID> number with the same number
  5. Import the file into QuickBooks
QuickBooks tries to validate the financial intitution ID for web connect import and if it is QIF file it fails saying "QuickBooks is unable to verify the Financial Institution information for this download." If you use a valid ID, most likely from a different financial institution, the import will succeed and the only annoyance is that QuickBooks will think the data came from The Bank of America, if you use 10308, or <FID>10898 <INTU.BID>2430 for Chase. You might not have to change FID. Find INTU.BID for you bank here: https://ofx-prod-filist.intuit.com/qb2800/data/fidir.txt

Sunday, January 4, 2015

Cisco 3602i in Autonomous Mode

Recently, I decided to upgrade my wireless access point. I considered CISCO AIR-CAP3602I-A-K9 and AIR-CAP3602E-A-K9. The 3602e looked a little fragile and I decided to go with 3602i with internal antennas.

Bought the access point on ebay and it came configured in lightweight mode. The problem was that it kept searching for the controller (WLC) and since there was none it would get new IP address from DHCP every 10 seconds, which wouldn't let me upload new image. The error was something like "could not discover wlc using dhcp ip. renewing dhcp ip". I set the access point to static IP, but after it was not able to find WLC it switched back to DHCP. Then I set address of the WLC so it would not search for it. It was still trying to connect to the non-existing WLC, but it did not interfere with uploading new image.

I used local connection to the access point through the console port while the access point was also connected to LAN. After setting the IP addresses I saved installed image to my tftp server, just in case, and uploaded new image. The commands below are not the exact session I went through, rather a list of all the commands I used:

en
lwapp ap ip address 10.10.10.1 255.255.255.0
debug capwap console cli
config terminal
interface BVI1
ip address 10.10.10.99 255.255.255.0
exit
archive tar /create tftp://10.10.10.119/ap3g2-k9w8-mx.124-25e.JA1.tar flash:/ap3g2-k9w8-mx.124-25e.JA1
archive tar /xtract tftp://10.10.10.119/ap3g2-k9w7-tar.153-3.JAB.tar flash:
config terminal
boot system flash:/ap3g2-k9w7-mx.153-3.JAB/ap3g2-k9w7-mx.153-3.JAB
exit
reload

The access point rebooted in autonomous mode and I followed the instructions in "Cisco Aironet Access Points Configuration Guide for Cisco IOS Software" to configure the desired settings.

Tested WiFi speed and it was good, but this access point seems to loose signal strength quickly: my iPhone cannot see the network just a couple of walls away, where I was still getting signal with my old access point. Perhaps I should have used the version with external antennas...

Tuesday, March 22, 2011

How to spool data from Oracle database using SQL*Plus

If you need to dump data into a file, the basic commands to redirect output are:

spool <filename>
...
spool off

However, this will have the headers, pagination, and probably lots of other stuff. To disable all of that and leave just the data use the following:

set heading off
set echo off
set termout off
set feedback off
set pagesize 0
set timing off
spool on
spool <filename>
...
spool off

Now, you try that and you still see extra stuff in the output file, how come? Well, some of these only work from a script. Just create a file, let's say get-data.sql, and run it as

SQL> @get-data

Another tip, for Excel you may want to produce a CSV file. You can join columns with a comma. Below is a complete example:

> cat get-data.sql

set heading off
set echo off
set termout off
set feedback off
set pagesize 0
set timing off
spool on
spool all-sales.csv
 select date || ',' || sum(amount)
   from sales
  group by date
  order by date
spool off