A Bluetooth NAP is similar to a Wi-Fi access point. In this case, we will be using NAP to share an Internet connection to another computer with Bluetooth. It is supposed to be able to support 7 or 8 devices connected at once in this manner. Eventually my personal goal is to use this in conjunction with a Wi-Fi connection to get slightly more speed at once or for some redundancy to help achieve a more ubiquitous/pervasive connection.
It turns out what should be a simple process is a bit tricky in Ubuntu. You would expect to be able to create an IP access point fairly easily so that you can share your Internet connection to other devices using Bluetooth. (It turns out it may be possible with Blueman – http://blog.larsstrand.org/2009/04/sharing-internet-connection-over.html, but I’ve never had any luck with setting it up this way.) Here’s some of the steps and resources I used to get it to work. I am using one laptop with a generic usb dongle and another toshiba netbook with built-in Bluetooth for this.
Before anything is started, you need to make sure the devices are paired and trusted with one another. I found the easiest way to get this to work is with blueman (it is in the Ubuntu repos). Also it seems to work better if you initiate the pairing from the client (the computer not sharing the connection).
First, you need a bridge interface. This is easy enough in Ubuntu, by editing the /etc/network/interfaces file. If the interface you wish to share is eth0 (if you want to share a Wi-Fi connection instead, you could switch this with something like wlan0 or whatever your Wi-Fi interface is), you could add something like this:
auto br1 iface br1 inet dhcp bridge_ports eth0 bridge_fd 9 bridge_hello 2 bridge_maxage 12 bridge_stp off
Next you need to make sure both computers can see each other via Bluetooth. This requires enabling scanning and turning the NAP into a master and the client(s) into slaves. This can be done as follows:
sudo hciconfig hci0 piscan
and
sudo hciconfig hci0 lm MASTER,ACCEPT
or
sudo hciconfig hci0 lm SLAVE,ACCEPT
You can now check to see if each of the computers can see each other on bluetooth by running:
hcitool scan
where you should be able to see the opposite computer on each.
Next you want to start the NAP server on the computer you wish to share the connection from. (This is the computer with the bridge device). This script, which is available on the git repository will allow you to start up the NAP server. (it may also be possible to use pand, but I haven’t had any luck yet with it)
This script is called test-nap. It takes a single argument, which is the name of the bridge device. So in our case we would first need to chmod +x the file (to make it executable), then run it like this:
./test-nap br1
#!/usr/bin/python
import sys
import time
import dbus
from optparse import OptionParser, make_option
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object("org.bluez", "/"),
"org.bluez.Manager")
option_list = [
make_option("-i", "--device", action="store",
type="string", dest="dev_id"),
]
parser = OptionParser(option_list=option_list)
(options, args) = parser.parse_args()
if options.dev_id:
adapter_path = manager.FindAdapter(options.dev_id)
else:
adapter_path = manager.DefaultAdapter()
server = dbus.Interface(bus.get_object("org.bluez", adapter_path),
"org.bluez.NetworkServer")
service = "nap"
if (len(args) < 1):
bridge = "tether"
else:
bridge = args[0]
server.Register(service, bridge)
print "Server for %s registered for %s" % (service, bridge)
print "Press CTRL-C to disconnect"
try:
time.sleep(1000)
print "Terminating connection"
except:
pass
server.Unregister(service)
After this, you can search from the client to see if the NAP service can be discovered with the command:
sdptool search NAP
You should be able to see the NAP service from your server machine at this point.
The last thing to do is edit the /etc/network/interfaces file on the client side (the device which will connect to the Internet via Bluetooth. When pand connects, it uses a bnep0 interface. You need to add the following to your file:
iface bnep0 inet dhcp
Now we are ready to connect. This is how you connect:
pand -c <mac address of your server BT device> sudo ifup bnep0
This article was orginally posted on Jason’s Computer Science Blog.
Recently I have been playing around with the aircrack suite and in particular the aireplay-ng tool. This tool may be used for ARP replay attacks, however it requires that the monitor mode interface is able to switch channels to the channel of the target device / access point. For some reason my monitor interface was stuck in channel -1. So to fix this I found a forum post on Ubuntu Forums which solves this problem: http://ubuntuforums.org/showpost.php?p=10550806&postcount=6
You can apply this to the wlan interface to put it directly into monitor mode and avoid using the airmon-ng tool altogether if you wish. You may also be able to apply this to the mon0 interface created by the airmon-ng tool as well, however I have not tried it yet.
The bulk of the problem is just the order in which monitor mode and channel are enabled, it must follow the order as follows:
ifconfig $IFACE down
iwconfig $IFACE mode managed
ifconfig $IFACE up
iwconfig $IFACE channel $@
ifconfig $IFACE down
iwconfig $IFACE mode monitor
ifconfig $IFACE up
Hope this solves some problems…
This article was orginally posted on Jason’s Computer Science Blog.
Today the KW Record ran an article entitled “Blanket Wi-Fi plans unplugged in Waterloo Region and Guelph, but growing in Stratford”. I thought I’d throw in my two cents since this issue is very related to some of my research. Overall to me, the biggest factor that contributed to the failure of blanket wireless access in the Region of Waterloo was the cost of the service for users. From what I remember, it was on part with many high speed Internet plans. Why would someone pay the same price to have potentially slower, less secure service than competing wired services?
The Atria plan used large WiFi cells, with very expensive antennas (see the apartment building near University Plaza, which I believe was one of them).
Many other cities (much larger ones) have been very successful in providing blanket WiFi, using a completing different coverage model and cost model. The best example is San Francisco where a company named Meraki provides free wifi for over 100,000 people using their Mesh Router devices. These devices cost between $399 and $1500 each, which is still expensive, but likely much cheaper than anything used by Atria. These devices likely have much lower range and handle dense areas compared with the atria cells which seem to be designed for large areas, and require many people to subscribe to pay for their costs. The argument in the article that WiFi coverage in metropolitan areas is difficult seems like a terrible attitude to have for an area that has a reputation as a high tech leader. San Francisco likely has much greater challenges in this regard compared to our tiny city.
Instead of using these expensive devices, much cheaper devices such as linksys wrt routers could be used. These routers support linux, and because of this much customization is possible such as mesh networking. While these devices are less reliable than the previous more expensive solutions, it may be a good way to at least get the network started cheaply. Additionally, areas which are not used by as many people could be covered with cheaper routers, while areas with more dense traffic may be covered by expensive ones.
The argument in the article that WiFi networks are unnecessary because of cellular networks is ludicrous! If that is the case, why are every smartphone and other device including WiFi radios in them? It’s because data on cellular networks is way to expensive. Any place where a device can get free or low cost WiFi should be used instead of the cellular network. One large problem with this at the moment, however is that it is not seamless to go from a cellular network to a wifi network. For example, it is often not possible to carry on a phone call while switching networks, or continue downloading or steaming without interruption. This will change with much of the research in heterogeneous networks.
One potential model that hasn’t been explored much is community wireless networks. In this case, devices could be provided to anyone willing to provide access to their own home network for the community. The incentive could be either donations from users, or a very small fee (2 – 5 dollars per month) which is distributed to providers. Additionally, anyone who provides a part of the network is able to get on free to other parts of the network.
This article was orginally posted on Jason’s Computer Science Blog.
Recently, I setup a personal wiki for myself since I’m always encountering more information than I have time to read, but always want to go back later. Its also a way for me to organize topics I don’t know as much about as I’d like so that I can remember to come back to those areas later on. (Inspired by fellow UoG Student Eddia Ma: http://eddiema.ca/wiki/index.php/Special:AllPages) The default install from Ubuntu is pretty simple. I just installed it with the expected:
sudo apt-get install mediawikiThere are some simple steps to follow as you install with the package manager such as setting up the database and first configuration which should be easy enough to get through. However, the wiki required much customization before it would be good for what I was planning on using it for.
First of all, it had to support citations so that I could source the original papers, websites and others. This required the Cite Extension which can be downloaded here: http://www.mediawiki.org/wiki/Special:ExtensionDistributor/Cite (make sure you select the version that corresponds to the mediawiki version you have installed. Next extract to your extensions folder (likely /var/lib/mediawiki/extensions/ on Ubuntu 11.04). Finally add the following line to your mediawiki configuration file LocalSettings.php (likely in /etc/mediawiki).
require_once("$IP/extensions/Cite/Cite.php");I wanted to be able to attach papers directly into my wiki (pdfs and other documents from academic papers). For this I had to add the following line to my LocalSettings.php file (likely in /etc/mediawiki):
$wgFileExtensions = array('png','gif','jpg','jpeg','doc','xls','mpp','pdf','ppt','tiff','bmp','docx', 'xlsx', 'pptx','ps','odt','ods','odp','odg');Additionally, I encountered problems uploading many larger pdfs since they are larger than the default php upload size. In ubuntu, this can be changed by modifying the php.ini file (likely located in /etc/php5/apache). Look for ‘upload_max_filesize’ and ‘post_max_size’ in order to change this to whatever size you like.
Of course being a CS student, I need to be able to add math equations into my wiki. The math formulas are entered using Latex which most CS grad students (and many undergrads) should know how to use. This one is in the Ubuntu repositories so it is easy to do:
sudo apt-get install mediawiki-mathThen you have to edit the LocalSettings.php file again (/etc/mediawiki) so that the wgUseTex flag is true:
$wgUseTeX = true;Again since I am a CS student, my wiki needs to be able to display source code easily in a readable way. For this I use the Ubuntu package manager again:
sudo apt-get install mediawiki-extensions-geshiAnd edit the LocalSettings.php file (/etc/mediawiki) – For some reason, other instructions I have online have different paths and names for the plugin, so this will only work using the plugin from the repository. If you download it yourself directly, the name and location may be different:
require_once("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php");Lastly, as I previously mentioned the wiki is private (at least for now). To do this it is quite simple. Just paste this into the bottom of your LocalSettings.php file. (There are other variations on how private you can make the wiki, but if you want to do that, check out the official mediawiki page)
# Disable reading by anonymous users
# See: http://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_viewing_of_all_pages
$wgGroupPermissions['*']['read'] = false;
# But allow them to access the login page or else there will be no way to log in!
# NOTE: You also need to provide access here to the .css and .js files that the
# allowed pages attempt to load; otherwise, users will get errors on the page
# when they attempt to load it (IE will complain about the errors;
# FF will show them in its error console)
# [You also might want to add access to "Main Page", "Wikipedia:Help", etc.)
$wgWhitelistRead = array ("Special:Userlogin", "MediaWiki:Common.css",
"MediaWiki:Common.js", "MediaWiki:Monobook.css", "MediaWiki:Monobook.js", "-");
# Disable anonymous editing
$wgGroupPermissions['*']['edit'] = false;
# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;
This article was orginally posted on Jason’s Computer Science Blog.
If you have found this page, you likely know it is a bit of a pain to get updates and plugin installs to work within WordPress and a vanilla Ubuntu install. So this post a quickie to tell about what setup I am using to get it work.
First, the ftp server I am using. I tried vsftpd, but got lots of permissions problems when I tried to apply the updates or install patches. I played around with permissions and owners for a bit, but gave up.
Instead I tried proftpd, but it was also a pain to get working at first. It turns out, it worked fine once I changed the server type from “inet” to “standalone” in the /etc/proftpd/proftpd.conf file!
For permissions, I added my own user to the www-data group and then just give my login information to the wordpress interface to install the updates.
This article was orginally posted on Jason’s Computer Science Blog.
A homegroup in Windows 7 is a means by which users of a home based, generally wireless network, can share resources (hard drives, libraries, printers, etc.) easily and without too much trouble.
Because one computer can only belong to one homegroup at a time, most small home based networks have just one homegroup that everyone on the home network uses. And because everyone has to supply a password before gaining access, security is pretty tight.
Homegroups are not set up by default, so it must be set up before anyone on the network can join. To create a homegroup, choose one of the Windows 7 based computers and bring up Control Panel.
Click on Choose homegroup and sharing options.
If you don’t yet belong to a homegroup, and one hasn’t yet been created on your home network, you should see the window that says, “There is currently no homegroup on the network.” Click on the button farther down that says, Create a homgroup.
You should get this next screen where you are shown which libraries exist on your computer for you to share with others on the network:
Once you have chosen which libraries you wish to share, by checking the appropriate boxes, click the Next button. You’ll get a progress bar for a moment, then you should get this next screen giving you the password you’ll need to add other computers on your network to your homegroup. You should write it down or print it if you plan to keep using it.
When you click the Finish button, the homegroup setup is completed, and all of the windows and menus will go away leaving you back at the Control Panel window. Then since you probably don’t want to keep the computer generated password, click where it says Change the Password.
You should get this popup:
Once you click on Change the password, you should get this screen:
Type in a good password that you’ll remember then click the Next button. You should get this screen:
Click Finish and that should be it for creating your homegroup.
Now that you’ve got a reasonably good password, head on over to one of your other networked computers and bring up Control Panel again, and once again, click on Choose homegroup and sharing options. This time you should get a message telling you that “Somebody on SomeComputer has created a homepage on the network.” Of course on your network, Somebody and SomeComputer will be your own name and computer name.
Clicking Join now, should get you this next screen:
Check or uncheck whichever libraries you wish to share, then click the Next button. You should get this next screen asking for the password you just created on the first computer:
After you type in the password and click Next, you should get this screen:
Which means you are now finally ready to see the results of your efforts.
Close down Control Panel and bring up File Manager; note where it shows you your homegroup:
From here on in you can use your homegroup just like any other library, you can also change what is shared on any computer on the network at any time by going to Control Panel on that computer and clicking on Choose homegroup and sharing options. You can also add libraries not on the default list by creating a new library and then clicking on Share with, in File Manager.
Post from:
How to Setup and Use a Windows 7 Homegroup
This article was orginally posted on Online Tech Tips.
I created this function so that I could have a way of preventing very long non-breaking text links from breaking my web page layout. Paritcularly, this is used in my tweet / facebook section of my homepage. Whenever I posted a link to either of them, when the link URL was too long and could not be broken, it would overflow into the next column. Yes of course you could use css to do this, however the methods which are generally used are not valid with CSS2.1, so I came up with a way that programatically parses the link and replaces the text with “[Link]“. There are some limitations to this approach. First, since I use a simple solution, there is no way to preserve some information normally in the link such as target, title etc. Second it is being used for tweet and facebook statuses, so it is limited to checking only the first encountered link. It could be expanded to include multiple links, but I have no need for this at the moment so I left it out. Update: I noticed that it was also filtering my @links from twitter, so I made a slight change so that it will only shorten if it finds http:// in the url text now. Anyway here is the code:
/*
* Replaces all link-text with '[Link]' so that links which are very long do not break web page layouts
* Note: some information is lost, such as custom title, target etc.
* Jason Ernst- 2011
*/
function filter_long_url($content)
{
$startpos = strpos($content, "<a");
if($startpos !== false)
{
$midpos = strpos($content, ">", $startpos);
if($midpos !== false)
{
$endpos = strpos($content, "</a>", $midpos);
if($endpos !== false)
{
$url = substr($content, $midpos+1, ($endpos)-($midpos+1));
if(strpos($url, "http://")===false)
return $content;
else
{
$newcontent = substr($content, 0, $startpos);
$newcontent = $newcontent . "<a rel="nofollow" href='$url' title='View Link' target='_blank'>[Link]</a>" . substr($content, $endpos+4);
}
}
else
return $content;
}
else
return $content;
}
else
return $content;
return $newcontent;
}
If the function gets something with a half-completed tag, it should just return the original content since it is impossible to find the other parts of the tag correctly.
This article was orginally posted on Jason’s Computer Science Blog.
Most people protect their Excel files before sharing them—especially if the file is a form. While protecting the file keeps other people from altering the spreadsheet’s calculations, if the calculations are wrong, the other person has no way to correct them without the file creator’s password. Plus, such passwords are easily forgotten by the file’s creator.
There are several ways to unlock a protected Excel file without the password. Here are three of the easiest:
Uploading the Excel file to Google Docs will unlock the file. Simply upload the file, then download it from Google Docs. Be sure to save the file with a different name.
However, Google Docs may change some of the cell spacing in the spreadsheet. You may need to realign the many of the cells after the file is unlocked.
Zoho Sheet works similarly to Google Docs, but grants users a few more features, like the ability to edit spreadsheets stored in SharePoint. The process to unlock an Excel file is the same—upload the file, then download it again with a different file name.
For the most part, the file looked the same as it did before we uploaded it. Zoho did, however, change the font.
While Ensode’s Web site is by far the messiest of these three, the unlock utility provided there works better than both of the previous methods. Scroll past the advertisements to the bottom of the page. Accept the terms and upload your file. A link to your unlocked file is then provided. Simply download it and continue your edits.
Ensode’s unlock utility preserves the integrity of the original spreadsheet. All fonts, cell sizes and calculations remain completely intact. If you can stand the advertisements, this is definitely the best way to go.
Post from:
3 Ways to Unlock a Protected Excel File
This article was orginally posted on Online Tech Tips.
If you have an external hard drive that is formatted for a Mac computer and are trying to access the files via PC, there is a good chance that Windows will not recognize the external hard drive. However, with the assistance of a unique application, you can make Windows recognize Mac formatted external hard drives and hard drives with Mac files stored on them.
There are several different instances in which you may need to make a Mac formatted external hard drive recognizable by a PC. The application MacDrive makes the process simpler than ever.
To get started, head on over to meadifour’s website. Once there, download the free trial of MacDrive.
Upon download, proceed to install MacDrive onto your PC. You may need to reboot your PC after install.
You should now be ready to access Mac files on PC. Connect your external hard drive to your PC using USB or other connection type. The first time that you plug in the drive, Windows may take a few minutes to search for and find drivers for your particular device (external hard drive).
Once connected, MacDrive should auto-launch, but if it does not, click the start menu and navigate to All Programs – MacDrive 8 – Get Started With MacDrive 8.
Select the option Explore Mac disks. A new popup window will open. Select your external hard drive from the devices menu. From here, you can simply browse the external hard drive, and copy any or all files to PC by dragging and dropping.
That’s really all there is to using MacDrive, which is what makes it such a great program. Basically, it makes the Mac format readable by Windows PCs in a way that you can simply browse the external hard drive as if it was any other hard drive.
MacDrive bridges the gap between PC and Windows formatted drives very well. You can even pull an actual hard drive from a Mac computer, and access all of the files via PC. This would be very convenient for anyone who is switching from Mac to PC, and is looking for an easy way to move their Mac documents and files.
Of course, there are some other features as well. You can use MacDrive to format native Mac disks from a PC. MacDrive is free to try, but also very affordable should you decide to purchase the program. Prices start at $49.99 for a one computer license.
Post from:
Make Windows Recognize Mac Formatted External Hard Drives and Files
This article was orginally posted on Online Tech Tips.
You don’t need a Nintendo 64 game console to play Nintendo 64 games. There are several Nintendo emulators that will allow you to play Nintendo 64 games on your PC without getting a console or shuffling game cartridges.
You don’t need a game controller, either; instead, you can use your keyboard to play the game. Project 64 is one of the best free Nintendo 64 emulators currently available. It’s easy to use, but it still has a lot of configuration options to give you the gaming experience you desire.
Before installing Project 64, make sure that all of your video and audio drivers are up to date. Also make sure your PC meets the system requirements.
To run Project 64, your computer needs at least Windows 98 or later, a 700 MHz Pentium 3 or 800 MHz Athlon processor, 256 MB of memory, 200 MB of free hard drive space, DirectX compatible video, audio and input devices and the latest version of DirectX.
To continue, download and install the latest version of Project 64. Download some Nintendo 64 ROMs from a separate website. You can typically find free ROMs that work with Project 64 on websites like FreeROMs.com and CoolROM.com.
The ROM file types that are compatible with Project 64 include ZIP, ?64, ROM, USA, JAP, PAL and BIN. Always scan the ROM files with your virus scanner before attempting to install them.
Open Project 64 and click File and Open ROM. Navigate to the folder where you downloaded your ROM files. If the files are the right type, they will appear in the Open window. Select the ROM for the game you’d like to play, then click Open.
Before you begin playing your Nintendo game, click Options and Configure Controller Plugin. The default values for the controller emulation place most of the keys for the A, B, S, L, R and Z buttons from the Nintendo game controller in the lower left hand corner of the keyboard.
While this can help to enhance game play, it can also be confusing. If you can’t remember the the default keys, change them to match the letters on the Nintendo controller, starting with L. That way, when you’re prompted, you’ll always know which button to press. Click Save Profile and OK to save your changes.
Press the default buttons or your chosen buttons for A, B, S, L, R and Z to interact with the game environment, load menus and save your game. Use the Analog Stick keys you’ve chosen to navigate through the game. Press the keys you’ve chosen for the C-Buttons to change your point of view and use items during game play.
If you experience problems with the sound, such as popping or clicking, click Options and Configure Audio Plugin. Place a check mark beside Sync game to Audio and click Close.
If you have problems with the video, click Options and Configure Graphics Plugin. Ensure that the Windowed Resolution and Full Screen Resolution settings are right for your computer’s display. Set the Windowed Resolution to any size that comfortably fits on your screen.
Set the Full Screen settings to match your current monitor resolution and refresh rate settings. If you’re not sure what resolution and refresh rate your monitor uses, check your current display settings. If your video card has plenty of memory, also try setting the Full Screen Sync settings to Double Buffer Vsync or Triple Buffer Vsync.
If your video card doesn’t have much memory, stick with the default value, Transfer Memory. Also, if the Anisotropic filtering and Full-Scene Antialiasing options are active, turn them on and turn the values up as high as possible. If you experience trouble with the video, turn them back down again.
You can also solve some video problems by checking the boxes beside Super2xSal textures and Always use texture filter. However, in most cases, these values should be disabled.
![]()
For technical support, older versions of the Project 64 software program and additional information about system requirements and compatible hardware, visit the Project 64 website. For additional tips, read Download Virtually Any Game To Your Computer For Free.
Post from:
Play Nintendo 64 Games on Your PC
This article was orginally posted on Online Tech Tips.