
i just hacked together a script that automagically mounts and unmounts my 400GB storage drive through sshfs in accordance with my networkmanager setup. in other words, when i pop open my netbook in my dorm room, it connects (using networkmanager) via AES-encrypted (WPA2) to my gentoo desktop. then, behind the scenes, my laptop initiates a connection to my 400GB storage drive through 256-bit AES (SSH2) sftp. i can then work on the files on the drive as if it were a physical drive on my netbook. when i leave my room with the netbook, it disconnects from the access point and automatically unmounts the remote drive. it all happens without any extra interaction. seamless. beautiful. linux.
just TRY to do that in windoze. i DARE you. ;)
bragging time over, ~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
 |
|
ok, how i got a wpa2 wifi access point set up on gentoo 2008.0: 1: first, i purchased the netgear wpn311 pci adapter from newegg. (link) this card has an excellent reputation under linux. it uses the atheros (madwifi) AR5212 chipset and was detected automatically after i installed net-wireless/madwifi-ng-0.9.4 and rebooted. the pci ids are "168c:0013 (rev 01)". i recommend this card.
2: since i mentioned an ebuild to emerge in the first section, why don't we make it official and list all the ebuilds i had to explicitly emerge:
net-wireless/madwifi-ng net-wireless/madwifi-ng-tools net-wireless/hostapd net-dns/dnsmasq
3: add the following line your /etc/modprobe.d/ath_pci:
options ath_pci autocreate=ap
4: here's the essence of my /etc/conf.d/net:
config_eth1=( "dhcp" ) config_ath0=( "192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255" ) mode_ath0="master" essid_ath0="myessid"
5: and the essence of my /etc/conf.d/hostapd:
INTERFACES="ath0" CONFIGS="/etc/hostapd/hostapd.conf" OPTIONS=""
6: my /etc/hostapd/hostapd.conf file:
interface=ath0 driver=madwifi logger_syslog=-1 logger_syslog_level=2 logger_stdout=-1 logger_stdout_level=1 debug=1 dump_file=/tmp/hostapd.dump ctrl_interface=/var/run/hostapd ctrl_interface_group=0 ssid=myessid hw_mode=g macaddr_acl=0 accept_mac_file=/etc/hostapd/hostapd.accept auth_algs=1 ieee8021x=0 wpa=2 wpa_passphrase=***YOU_WISH*** wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP wpa_group_rekey=600 wpa_gmk_rekey=86400
7: and my /etc/dnsmasq.conf file:
interface=ath0 dhcp-range=192.168.0.100,192.168.0.125,24h
8: typical rules for NAT forwarding and IP masquerading are here. follow the gentoo linux home router guide for those.
9: add the hostapd, dnsmasq, iptables, and net.ath0 initscripts to the default runlevel.
10: IMPORTANT! my system crashed without this hack: when normally booting with net.ath0 set up as a symlink to net.lo inside /etc/init.d, the system would hang. writing net.ath0 as a custom initscript according to gentoo bug 224467 posts number 37 and number 40 should fix that.
that's it. good luck.
~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
it seems that setting up my gentoo desktop system for wpa2 as an access point was easier than i had thought it would be... i've actually been able to associate with my netbook as if my desktop were a wifi router, but it was not a "natural" process. (due to a bug in the initscripts, i had to start everything manually...) so, currently i'm hacking the initscripts to try and find a way to "naturally" boot my desktop into access point mode.
to anyone who wants to do the same thing: it's doable, and much easier than i thought. i should have more details soon on how i configured hostapd, dnsmasq, and my initscripts to work.
~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
slow, but steady.
i'm currently rewriting the gnome gmail notifier functionality according to a "design document" i created for the purpose of tidying up the GGN codebase. some of the work is essentially changing four-space tabs to two-space tabs and where the splats go for pointers, but a large part is real. huge modifications are happening to the way accounts are handled in GGN. honestly, the gmail accounts are the central idea of the notifier, so why not centralize the code around them? that's the plan: by building a GgnAccountList via a GgnPrefs at startup, all changes to the GgnAccount objects in the GgnAccountList will be echoed in gconf2 and gnome-keyring in a manner that is completely transparent to the other application elements. the improvements will finally lead to a notifier that will let me sleep at night during the semesters.
~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
 |
|
ordering hardware for a linux pc, especially something like a pci wifi card, can be a bit scary sometimes! you simply want to make darn sure that the card you bought is the right one, and will work under the configuration you need. i know, because i just purchased a netgear wpn311 (atheros ar5212 chipset, most likely) wifi pci card from newegg today. why the nerves? i've never installed a pci wifi card, especially not into a gentoo box.
the idea? i'm turning my desktop into a WPA2-protected wifi access point. since the texas tech it department is so adamant about connecting only a single computer (and *no* routers) to their ethernet, i'm going to do just that. it will just so happen that the one computer i connect will be a gentoo-installed access point. (of course, not broadcasting its SSID either!) that way i can pop open my netbook in my room and connect to my 400GB drive wirelessly, as if it were the laptop's main drive.
so let's review... desktop: gentoo i686, madwifi, hostapd/wpa2, MAC-specific access controls, sshd/sftp-server laptop: gentoo i686, sshfs, NetworkManager/wpa2
it'll be a fun demonstration of the power of GNU/Linux. :) more to come once i get the card in the mail! ~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
yes, i've outdone myself again. gentoo on my desktop and gentoo on my netbook. what's more? i've set up sshfs on my netbook and sftp-server on my desktop so that i can mount my 400GB external drive via an SSH2-over-WPA2 connection and use it as if i were using it locally! awesome!
yup. it's awesome. ~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
ok, well i've started installing gentoo onto my new mini 1000, and as always, the process is a slow and tiring one, but i've uncovered a few secrets that may help any who wish to do the same:
first, since there is obviously no optical drive, you have to get creative. thankfully, a handy-dandy gentoo doc exists just for this purpose: the liveusb installation manual.
second, there is a trick to getting the integrated marvell ethernet working when you boot up on battery power: before running the syslinux /dev/sdc1 command in the LiveUSB howto, you need to edit the syslinux.cfg file a bit more. simply add vga=786 acpi_os_name=Linux to the kernel args line.
third and finally for now, i've searched around for some optimal CFLAGS for the make.conf, and i've come to accept CFLAGS="-O3 -march=core2 -mtune=pentium -pipe -fomit-frame-pointer" as an ok value.
until next time, ~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
 |
|
my new netbook came today, complete with a copy of the HP mobile internet experience (MIE) software suite, built on top of a stripped-down version of the ubuntu distribution. so obviously i have a few thoughts about MIE and about netbook computing in general.
first off, i have to hand it to HP for stepping out into the open-source realm of software in the first place. not only that, but they chose the right software packages in my book: a GTK+2 based GUI -- you can even discern that a modified version of the gnome-panel sits at the bottom of the screen -- has simply been themed in such a way that it matches the HP notebook theme. the login manager seems to be a highly modified (and perhaps stripped down) version of GDM, but i can't say for sure. the user interface is highly organized and simplified from the boilerplate windows-style desktop that normally ships with PCs, and the overall navigation and use of MIE was easy.
but if you know me, you know that i'm already installing gentoo on it.
sure, MIE is easy, but netbooks have the same amount of processing power as notebooks from one or two years ago, so why limit their capabilities with an operating system that boxes the user into the same kind of vendor lock-in that is present with microsoft? in MIE, the terminal and other extremely powerful features of GNU/linux are hidden (or even kept) from the user. second of all, using MIE means using a system that is unfortunately carrying the same ABI as every other MIE netbook out there, which puts the user of a MIE system in essentially the same ABI boat as the user of an XP or vista system when it comes to viruses and {mal,spy,ad}ware.
i could go on and on why i want the power, customization and flexibility of gentoo on my netbook instead of MIE, but it would sound like any other gentoo user babbling on about the benefits of gentoo, and we know how much that gets listened to.
thanks, ~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
so i've started work towards another overhaul of the notifier codeset, this time with a focus on stability, memory management efficiency, and simplicity. the current notifier is just too many hacks superglued together and stuck to the gnome-panel tray with duct tape.
so a rewrite should be out into the world by the end of the summer, at the latest. you can track the changes by browsing the subversion repository or add insight into the rewrite by posting at the related issue tracking page.
~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
to get to where i am on my nixie clock has taken over a year of design and mere days to put it together, but i've learned so many things which would help in - if it ever happens - a finalized design. changes i think would benefit the final production run of the nixie clock:
- use a boost converter instead of rectified mains
- integrate the boost converter into the atmega16
- expand the cathode outputs to six per digit
- cut the case out of a solid block of hardwood
- use a router to cut the top and bottom panels
mostly these changes are intended to simplify final construction of the clock. for instance, the boost converter had to be placed in the clock essentially as a hack on my current design, so an integrated converter/controller would mean only one circuit board to produce, solder and mount. i've also been forced to make another circuit board to expand the cathode outputs in order to send one wire to each nixie socket, so expanding the outputs on the board eliminates this third pcb. milling the case from solid hardwood can be done with a router and a template, and would produce a much sturdier and easier to handle clock and would eliminate tolerance issues from using several tools to cut each piece of the case. anyways, that's my two cents worth on nixerv4, if there ever is one. :)~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
hurah!!! i just finished my first switching power supply! :) my circuit design was simple enough that i etched the circuit board myself and, after fixing the usual amount of bugs for any program that hasn't been tested yet, i got 165Vdc out of the board! (designing the board and writing the firmware took me about a week, and assembly took about two days!) the entire supply runs at 37.5khz and the mosfet is cool to the touch, so i'd say this is a huge success.
of course, crappy cellphone pictures:


do you think the filter capacitor is big enough? :P
~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
i suppose i haven't announced it here yet: my website has undergone a great many upgrades! i've reorganized material and added new pages for the projects i've undertaken recently. now, anything in the site is finally accessable from the main page. i've added the gainclone project page, the golem project page, and the nixie clock project page. i've added a bill of materials to the led clock project page. i've added smart thumbnail generation to the code in the thermy project gallery, which means load-time for any future gallery pages will be back to almost nothing.
while it may seem back to a state of rest for a while, it really won't be. i'll update the led clock page once i install the board into a case of some sort, i'll update the golem page once it actually goes somewhere, and i'll update the nixie clock page once i get the whole thing finished nicely.
~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
 |
|
so, say i want to build a simple IR remote control for some microcontroller project. all i need to do is grab an infrared detector that will demodulate a given signal (such as a TSOP1736) at the receiver, and design my remote around that. basically, the detector senses infrared radiation at only a fixed modulation frequency, say, 36kHz. if i modulate an IR led at that frequency towards the detector, it will output a logic-level signal.
the next step is implementing some kind of data transmission system. short and sweet is the idea here. lets describe a bit of data as having four equal segments in time. for a high bit, the first three segments will be a modulated signal and the last will be no signal. for a low bit, only the first segment will be a modulated signal. like so (low bit on top):
 the detector output is then wired to an external interrupt pin of the receiver avr. because every bit has some off-time, the interrupt will signal the start of each new received bit. all the receiver avr has to do is sample the detector output at the middle of the bit: if it's a signal, it's a logic 1, if it's no signal, it's a logic 0.
from here, all you need to do is determine the length of the codes you will need for the number of codes you want to have. if i want 12 codes, i need each code to be 4 bits long (16 codes max).
so the final product: 0000 = power on/off 0001 = volume up 0010 = volume down 0011 = mute on/off 0100 = use input 1 0101 = use input 2 0110 = use input 3 0111 = use input 4 1000 = use input 5 1001 = use input 6 1010 = use input 7 1011 = use input 8
make sense?
~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
so today has been a huge day for my electronics hobby! :) here are the packages i get to look forward to when i come home for summer:
- an edcor gxse10-8-5k guitar output transformer for my golem guitar amp
- my free samples from texas instruments, including a PGA!
- my *cheap* samples from national instruments, actually four lm3886 audio amplifier chips
- parts for my nixie boost converters
so really, i'm making out like a bandit with all this stuff, most of which came free! i'm psyched. ~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
well, i haven't had much sleep as of late, but classes are winding down, so it's forgivable i suppose. ;) i'll sleep this weekend.
anyways, i've just requested my first free electronics samples in the history of my hobbyist career, and i have to say it's pretty sweet! i requested a PGA2310 programmable-gain amplifier, an OPA1632 differential audio amplifier, an OP445 FET-input high-voltage opamp, a PGA2311 programmable-gain amp, a TPA6120 hi-fi headphone amplifier, and an MSP430F435 ultra-low power microcontroller. the fantastic part: FREE! i feel like i'm stealing...
just for info, the PGA2310 is planned to be included in a hi-fi source selector circuit that i plan to build some time down the road. for the basic idea and schematic of my idea, go to my post on diyAudio.com. we'll see how far i get on the design over the summer, methinks...
~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
thanks to some quick back-of-a-napkin calculations, it looks that the theoretical maximum efficiency of the boost converter i've designed, with the components i've chosen, is 90%. i'm sure it'll be lower in reality, but anything above 80% is going to be considered a success in my book. :) we'll see over summer!
~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
i'm talking about code weight, of course. :) sorry to disappoint those who thought i was writing about something non-technical for once, haha...
i've written what should function (if murphy doesn't have his say) as a simple boost regulator firmware for the attiny13a. what made this programming expedition nontrivial? well, the tiny13 only has 1k of flash memory. to cut down on code size, my code uses no delays or interrupts, and instead monitors the ADIF (analog to digital conversion interrupt flag) bit in one of the tiny13's ADC registers to check when a new conversion result is available. the entire program uses only 492 bytes of the allotted 1024, so i think all should be ok. (probably not enough space for a full PID controller though, lol!)
wow, i really had a field-day with the hyperlinks this time... :P ~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
 |
|
i know, it seems like i've been trying to build a working nixie clock for forever now, but here's one more peice of the puzzle...
thanks to my driver circuit tests on a breadboard, it seems that rectifying the 120VAC from the wall is a workable solution. however, i'm building this clock without an isolation transformer, which is dangerous to say the least. it also means that a bulky step-down transformer, some beefy rectifiers, and some beefy caps are required to smooth out the supply voltages. the straw that broke the camel's back was me finding the ATtiny13A, which contains ADC and PWM functions in an 8-pin DIP. so i designed (yet another) nixie boost converter:
the schematic. the board layout.
if you'll remember, i tried to make an smps for my first nixie clock project. it ended in smoke and the destruction of my STK500. i made a bunch of mistakes then, like using rectified, unfiltered mains (yeah, i know... stupid.) as the input to the inductor. my current design will take 12VDC as an input and produce 5VDC and 170VDC outputs using the ATtiny13A as a closed-loop voltage controller.
it's a summer project, but it should be simple. :) ~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
well i've been messing around with the nixie clock circuit, trying to do a final test of my driver circuitry before finishing out the case completely. i breadboarded a driver for a single digit of a single nixie, and the results were great: a logic 1 (+5vdc) at the bases of the MPSA42 transistors turned the nixie on, and a logic 0 at either location turned it off! :) those results are so good, i had to post some pictures:
this test shows that my current design for driver circuitry is not flawed, and the nixie clock should work as predicted, once i get a chance to program it. :) ~ brad.
Post A Comment | Add to Memories | Tell a Friend | Link
|
 |
|
 |
 |