The MP3car.com Store The MP3car.com Store    

Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development > Coders Corner

Reply
 
LinkBack Thread Tools Display Modes
Old 05-02-2006, 07:32 PM   #1
Newbie
 
Join Date: Jan 2006
Posts: 27
Getting stats from wireless card

I didn't see this covered in any depth so far, so here goes...

What I'm looking to do is get a list of detected access points from the wireless card and then attempt connection to the ones that are not encrypted. If an ip address is assigned by that AP then do an event. Such as play a sound, popup a box, etc.

I haven't found anything on this specifically from searching google. I'm thinking it may come down to trying to get objects from the cards drivers and approach it that way.

Anyone have any thoughts on doing that?

Thanks,
James
Pendragon445 is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 06-08-2006, 10:42 PM   #2
Newbie
 
Join Date: Jun 2006
Location: Louisville, KY
Posts: 6
I'm currently on the same hunt...

I'll let you know if I come up with anything clever.
13bats is offline   Reply With Quote
Old 06-10-2006, 02:23 AM   #3
Variable Bitrate
 
Join Date: Apr 2006
Location: Dallas, Texas
Posts: 229
Language?
Ineffigy is offline   Reply With Quote
Old 06-14-2006, 08:19 AM   #4
Newbie
 
Join Date: Jun 2006
Location: Louisville, KY
Posts: 6
The app is written in VB6, but I'm porting it to .NET, so either is fine with me if you have any info
13bats is offline   Reply With Quote
Old 06-14-2006, 05:22 PM   #5
Maximum Bitrate
 
Jarrod's Avatar
 
Join Date: Jan 2002
Location: Melb, Australia.
Posts: 474
Here is a little bit of VB.NET code I wrote a while ago to list the available SSID's. This only worked once Windows Wireless Config had picked up the list of networks though, so not sure how much help it will be.

Code:
Imports System.Management Imports System.Text Imports System.IO Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents lblHomeNetwork As System.Windows.Forms.Label Friend WithEvents lblAvailable As System.Windows.Forms.Label Friend WithEvents btnSearch As System.Windows.Forms.Button Friend WithEvents lstAvailable As System.Windows.Forms.ListBox Friend WithEvents txtHome As System.Windows.Forms.TextBox Friend WithEvents statusBar As System.Windows.Forms.StatusBar <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.lstAvailable = New System.Windows.Forms.ListBox Me.txtHome = New System.Windows.Forms.TextBox Me.lblHomeNetwork = New System.Windows.Forms.Label Me.lblAvailable = New System.Windows.Forms.Label Me.btnSearch = New System.Windows.Forms.Button Me.statusBar = New System.Windows.Forms.StatusBar Me.SuspendLayout() ' 'lstAvailable ' Me.lstAvailable.ItemHeight = 16 Me.lstAvailable.Location = New System.Drawing.Point(12, 88) Me.lstAvailable.Name = "lstAvailable" Me.lstAvailable.Size = New System.Drawing.Size(219, 100) Me.lstAvailable.TabIndex = 0 ' 'txtHome ' Me.txtHome.Location = New System.Drawing.Point(12, 40) Me.txtHome.Name = "txtHome" Me.txtHome.Size = New System.Drawing.Size(219, 22) Me.txtHome.TabIndex = 1 Me.txtHome.Text = "" ' 'lblHomeNetwork ' Me.lblHomeNetwork.Location = New System.Drawing.Point(12, 19) Me.lblHomeNetwork.Name = "lblHomeNetwork" Me.lblHomeNetwork.Size = New System.Drawing.Size(219, 19) Me.lblHomeNetwork.TabIndex = 2 Me.lblHomeNetwork.Text = "Home Network:" ' 'lblAvailable ' Me.lblAvailable.Location = New System.Drawing.Point(12, 68) Me.lblAvailable.Name = "lblAvailable" Me.lblAvailable.Size = New System.Drawing.Size(219, 19) Me.lblAvailable.TabIndex = 3 Me.lblAvailable.Text = "Available Networks:" ' 'btnSearch ' Me.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.System Me.btnSearch.Location = New System.Drawing.Point(68, 196) Me.btnSearch.Name = "btnSearch" Me.btnSearch.Size = New System.Drawing.Size(107, 31) Me.btnSearch.TabIndex = 4 Me.btnSearch.Text = "Search" ' 'statusBar ' Me.statusBar.Location = New System.Drawing.Point(0, 244) Me.statusBar.Name = "statusBar" Me.statusBar.Size = New System.Drawing.Size(245, 22) Me.statusBar.TabIndex = 5 ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(6, 15) Me.ClientSize = New System.Drawing.Size(245, 266) Me.Controls.Add(Me.statusBar) Me.Controls.Add(Me.btnSearch) Me.Controls.Add(Me.lblAvailable) Me.Controls.Add(Me.lblHomeNetwork) Me.Controls.Add(Me.txtHome) Me.Controls.Add(Me.lstAvailable) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog Me.MaximizeBox = False Me.Name = "Form1" Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide Me.Text = "WirelessMan" Me.ResumeLayout(False) End Sub #End Region Dim bFoundNetworks As Boolean = False Private Sub SearchNetworks() lstAvailable.Items.Clear() lstAvailable.Items.Add("Searching...") Try Dim query As String = "SELECT * FROM MSNDis_80211_BSSIList WHERE Active='True'" Dim searcher As ManagementObjectSearcher = _ New ManagementObjectSearcher("root/WMI", query) Dim moc As ManagementObjectCollection = searcher.Get() Dim moe As ManagementObjectCollection.ManagementObjectEnumerator = moc.GetEnumerator() moe.MoveNext() Dim objarr() As ManagementBaseObject = CType(moe.Current.Properties("Ndis80211BSSIList").Value, ManagementBaseObject()) lstAvailable.Items.Clear() For Each obj As ManagementBaseObject In objarr bFoundNetworks = True Dim ssid() As Char = Encoding.ASCII.GetChars(CType(obj("Ndis80211Ssid"), Byte())) lstAvailable.Items.Add(New String(ssid)) Next If lstAvailable.Items.Count = 0 Then lstAvailable.Items.Add("No networks found!") End If Catch ex As ManagementException ' Wireless device disabled lstAvailable.Items.Clear() lstAvailable.Items.Add("Wireless device disabled!") Catch ex As System.NullReferenceException ' Windows hasnt searched for wireless networks yet bFoundNetworks = False lstAvailable.Items.Add("Windows must search...") End Try End Sub Private Sub CheckShare(ByVal strPath As String) 'Inherits System.IO.FileSystemInfo Dim mobjFileInfo As FileInfo Dim mobjDirectoryInfo As DirectoryInfo Dim mblnIsDirectory As Boolean = True Try mobjDirectoryInfo = New DirectoryInfo(strPath) Catch ex As Exception Console.WriteLine(ex.ToString()) End Try If mobjDirectoryInfo.Exists Then MsgBox("share exists!") Else MsgBox("share doesnt exist!") End If End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load txtHome.Text = "Please select a network..." 'SearchNetworks() CheckShare("c:\Mp3") CheckShare("\\Terabyte\200gb (c)\MP3") End Sub Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click SearchNetworks() End Sub Private Sub lstAvailable_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstAvailable.SelectedIndexChanged If (bFoundNetworks) Then txtHome.Text = lstAvailable.Items.Item(lstAvailable.SelectedIndex) End If End Sub End Class

__________________
Jarrod - Holden VX S!
Jarrod is offline   Reply With Quote
Old 06-15-2006, 10:30 AM   #6
Variable Bitrate
 
Join Date: Apr 2006
Location: Dallas, Texas
Posts: 229
I found this control for .NET to detect wireless networks, but it was designed for the compact framework. You might want to look into it.

http://www.pocketpcdn.com/libraries/...perceptor.html
Ineffigy is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with PCI video card install ... help!!! DonkeyBoy General Hardware Discussion 4 08-10-2005 04:22 PM
FM sound coming from tuner card not sound card Ascension Newbie 2 07-18-2005 04:24 AM
Wireless card powered up when computer is off? PatO General Hardware Discussion 5 03-08-2005 07:54 PM
802.11g Wireless PCI Card - $25 Shipped hd54321 Classified Archive 16 11-07-2004 09:04 AM
help - video card problems Cliff General Hardware Discussion 4 04-15-2002 05:25 PM


All times are GMT -5. The time now is 08:59 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics