Archive

Archive for the ‘General’ Category

Balancing Robot

December 25, 2007 Pari Leave a comment

Botka, The Barely Standing Robot. This is one impressive balancing robot. Not even a bit of jitter. Midway through the video the thing takes on some solid whacks and still standing. For comparison: NXTway-G (the Lego Mindstorms NXT uses the Atmel AT91SAM7S ARM processor).

Botka probably uses some sophisticated PID control? fuzzy logic enhanced or a Kalman Filter? given it’s amazing response even in motion.

I remember doing Kalman Filters way back in my graduate courses, pretty hairy level of mathematics, but real cool nevertheless once you got a simulation working. Never thought I’d see the daylight of that again. It seems to be integral to many embedded industrial control systems.

Anything which requires very accurate real-time prediction and correction like image stabilization, noise reduction, maglevs, satellite navigation, cruise control,…

Categories: General

Cloud Computing

August 15, 2007 Pari Leave a comment

For those of you who aren’t in on it, check out Google’s Cloud Computing and Amazon’s EC2 (Elastic Computing Cloud). Amazon and Google have tons of computing power and storage sitting in huge server farms. Now they’re making it available for you.

Of the two, Amazon EC2 service is ahead of the game. If you ever need a clean Linux server for testing, you can create one with just one command, use it, and delete it. The basic instance gives you a 32-bit server with 1.7 GB memory and 160 GB storage.

There is also the Amazon’s S3 service which lets you purchase storage in the cloud. I use S3 service for backing up data that I need to access while on the go, and for sharing large files (you can even setup ACL’s). Data is stored encrypted. They charge $0.15 per Gigabyte per month.

There is also a FUSE utility that lets you mount/unmount it. Anything you drop into the S3 folder gets automatically transfered to the S3. You can even rsync to it.

See also: 9 Hidden Features of Amazon S3.

Categories: General

Where to get parts ?!

August 12, 2007 Pari Leave a comment

Where do you go for basic electronic parts in the USA!? like resistors or capacitors (in single quantities, i.e. without having to bulk order them)?

Back in India (and I think in most South Asian countries) most major cities have streets/bazaars full of electronic component shops (no not consumer electronics, but components, semiconductors,…). It’s a electronics engineers heaven to find stores like that. It is so frustrating not to find something like that here in the USA, and RadioShack just doesn’t do it for me. But I did find some online shops:

Categories: General

Old friend

August 12, 2007 Pari Leave a comment

I bumped into an old friend at Borders this afternoon. We used to work together for many years, then a he took a turn into politics in India, now a full time politician. I remember the turn of events in the company we worked in, where he had put himself in a strange predicament with his managers and colleagues, putting his day job on the line at a critical time, for his political pursuits. That’s fine, but you can’t have it both ways. He tried to have his cake and eat it to. That caused a lot of friction and bridges burnt. He did visit me about year later and rendered an apology (which I felt was incomplete; lot of things unanswered, but fair enough; let time handle the rest). Just for the record :).

When I bumped into him this afternoon at Borders, we talked for a long time. Nothing about the past – but the future. He listened to my exploits into the embedded systems world, and how I’m hoping to tie up with at least one or two big industrialists in India. Well being a politician his eyes lit up on the prospects of this for the masses (as well as for his party!). Talk about Al Gore inventing the internet… I can see where this is heading :-)

Categories: General

Yummy Circuits

July 26, 2007 Pari Leave a comment

Take a look at these Yummy Circuits… the scary part is that I recognized the circuit in the first picture from when I last touched it 25 years ago. Just about every electronics hobbyist’s first exposure to integrate circuits (the LM555, aka “the triple-five-timer”). He’s even got the color codes on the resistors pretty reasonable (two 100K resistors and one 330ohm resistor and the capacitor values 0.1uF). drool :-}

Categories: General

Asterisk

July 26, 2007 Pari Leave a comment

Asterisk is now working with the SPA3102!! :-)

I thought I’ll share my struggle here (most of the struggle was with figuring out the much poorly documented SPA3102 configuration).

Here’s my Asterisk configuration files, along with the SPA3102 settings:

1. Asterisk Configuration
sip.conf

[line1]context=outgoinghost=192.168.1.100port=5060username=line1secret=welcometype=frienddtmfmode=rfc2833

[pstn]context=incominghost=192.168.1.100port=5061type=frienddtmfmode=rfc2833insecure=very

[gizmo]context=incominghost=proxy01.sipphone.comusername=YourGizmoUserName or YourGizmoSIPPhoneNumbersecret=YourGizmoPasswordfromuser=YourGizmoUserName or YourGizmoSIPPhoneNumberfromdomain=proxy01.sipphone.comtype=frienddtmfmode=rfc2833insecure=verynat=yes


extensions.conf

[incoming]exten => s,1,NoOP(${CALLERID}) ; show the caller ID info in the consoleexten => s,n,ResponseTimeout(10)exten => s,n,DigitTimeout(5)exten => s,n,SetMusicOnHold(native)exten => s,n,Ringingexten => s,n,Answerexten => s,n,Dial(SIP/line1,15)exten => s,n,Playback(nbdy-avail-to-take-call)exten => s,n,Directory(default,extensions,f)include => extensions [outgoing]; international/long-distance speed dials - through gizmoexten => 01,1,Dial(SIP/0111111111@gizmo,60)exten => 02,1,Dial(SIP/0112222222@gizmo,60) ; local speed dials - through pstnexten => 11,1,Dial(SIP/1111111111@pstn,30)exten => 12,1,Dial(SIP/2222222222@pstn,30) ; pass throughexten => _XXXXXXXXXX,1,Dial(SIP/${EXTEN}@pstn,30)exten => _1800XXXXXXX,1,Dial(SIP/${EXTEN}@pstn,30)exten => _1888XXXXXXX,1,Dial(SIP/${EXTEN}@pstn,30) include => extensions [extensions]exten => 101,1,VoiceMail(u101@default) ; Mailbox 1exten => 102,1,VoiceMail(u102@default) ; Mailbox 2 exten => 500,1,VoiceMailMainexten => 600,1,Directory(default,extensions,f)exten => 800,1,Background(if-u-know-ext-dial)exten => 800,n,WaitExten(5)exten => 900,1,Playback(demo-moreinfo)exten => 900,n,Hangup ; Invalidexten => i,1,Playback(pbx-invalid)exten => i,n,WaitExten(5) ; Timeoutexten => t,1,Playback(vm-goodbye)exten => t,n,Hangup


2. SPA3102 Settings:

A. Line1 Tab:

Proxy and Registration:
  • Display Name: spa3102-line1
  • User ID: line1
  • Password: welcome

Subscriber Information:


  • Display Name: spa3102-line1
  • User ID: line1
  • Password: welcome

Gateway Accounts:

  • Gateway 1:
  • GW1 Auth ID: line1
  • GW2 Password: welcome

Dialplan:

  • Dial Plan: (911S0|1800xxxxxxxS0|011xx.||x.)


B. PSTN Tab:


Proxy and Registration:
  • Proxy: IP of Asterisk Server
  • Register: no
  • Make Call without Reg: yes
  • Ans Call without Reg: yes

VoIP-To-PSTN Gateway Setup:

  • VoIP-To-PSTN Gateway Enable: yes
  • VoIP Caller Auth Method: none
  • VoIP Caller Default DP: none

PSTN-To-VoIP Gateway Setup:

  • PSTN Ring Thru Line 1: no
  • PSTN CID For VoIP CID: yes

FXO Timer Values (sec):

  • PSTN Answer Delay: 2

Dialplan:

  • Dial Plan: S0
Categories: General

Linksys SPA3102

July 25, 2007 Pari Leave a comment

I just got the LinkSys SPA3102-NA FXS/FXO ATA/Gateway (fyi, the NA represents the unlocked version).

I chose it as there just seems to be a lot of support for it on the web. Voxilla has dedicated forum for it. Costs about $80 (about the average low-end price).

It is very configurable, but I have to say though the interface is loaded with options, the design could be much better (but then most UI’s I’ve seen for embedded systems are horrible).

So far it’s working great. I’ve tried out VoIP to FXO and FXS (and FXO/FXS to VOIP), as well as POTS/PSTN bridging. All working great – though it took a good deal of experimenting to figure things out, not to mention that the document sucks — it’s pretty much non-existent. I’ll post my configuration for each these soon!

My next challenge is to hook it up with Asterisk – which is the whole purpose of why bought this for :-)

Categories: General

BSNL/EDGE

July 5, 2007 Pari 1 comment

If like me you’ve been desperately searching everywhere on how to get BSNL EDGE working, here it is:

First sign up for the service. This can be done over SMS. If you have a prepaid service, send an SMS to 53733 with the message “GPRSPRE”. I have no idea what it is for postpaid (maybe GPRSPOST?). I think it deducts an activation charge of around Rs. 200. After a few hours, you will get a message saying your service is activated. Then configure your phone with the settings below.

Settings:

The following settings are for the Samsung SGH-J210. This setting works with Opera and the J210’s default browser OpenWave.

Proxy IP: (no proxy)
Proxy Port: (no proxy)
APN: gprssouth.cellone.in
Login ID: 91xxxxxxxxxx
Password: 91xxxxxxxxxx

Alternative:

I found this alternative configuration setting also works, but it works only with OpenWave, not with Opera:

Proxy IP: 10.31.54.2
Proxy Port: 9401
APN: wapsouth.cellone.in
Login ID: ppp
Password: ppp123

Depending on signal quality (distance from tower) you might not get EDGE speeds, and the connection will downgrade itself to GPRS. On my Samsung J210 a GPRS connection appears as a “G” icon, and EDGE as “E” icon.

Categories: General

Linux Notes

January 1, 2007 Pari Leave a comment

VirtualBox

Problems

VirtualBox has a problem launching guest VM, if KVM (Kernel Virtual Machine) is installed. You’ll need to unload the modules. Or you can just stop it: /etc/init.d/kvm stop

Screen Resolution

To get XVGA screen resolution (and higher) in your guest OS, download VirtualBox Additions ISO:

Launch the guest OS. Press F12 to stop it before it boots. You’ll see a menu item for you to download VirtualBox Additions ISO. After it is downloaded, in your VirtualBox OSE settings for the guest OS, under select the ISO to be mounted as CD/DVD.

Then launch your guest OS, login, cd the CD folder, and run as root: VBoxLinuxAdditions-amd64.run. This will compile and install drivers for vboxvideo (so you’ll need gcc installed).

Next run system-config-display and  select vboxvideo driver. Set the resolution to 1024×768. That’s it. Just logout and login.

Categories: General