KemenAran Posted May 26, 2007 Share Posted May 26, 2007 Hi, I followed this thread for some time, and now wish to contribute. I have a VAIO with a 3945ABG wifi chipset, and know some C/C++. I have configured a build environnement using XCode, managed to compile and test the iwi3954 driver, looked at the sources of the various linux drivers – but I'd like to know where I can start to hack the code; if there are some pendings problems I could help to investigate, etc. Thanks ! Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-372740 Share on other sites More sharing options...
jalavoui Posted May 26, 2007 Author Share Posted May 26, 2007 i have a question, i need some help creating an installer for nsGUI. i need to make it so it will install the software and than make it so it will run at login time, anyone has any idea on how to do it ? can you commit the nsgui to the svn tree? maybe we need to create a multi-packager installer - one for iwi2200 and other for nsgui to start at boot... - maybe call some script in the system folder. need to check this how do you plan do deal with secure network detection?. i know it cann be done at scan time, but don't know how to handle with it if the driver detects a secure connection, it is supossed to ask for a password - how do we do this in nsgui? i've just looked at your changes in code can you try to enable the encrypt/decrypt functions in ieee80211_rx() and ieee80211_xmit()? this will not be easy to do - but we'll need it to suport secure connections KemenAran, can you check some of iwi3945 functions? i explain it some posts ago iwi3945/iwi2100 need logs to see how the driver is working Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-372821 Share on other sites More sharing options...
moseschrist Posted May 26, 2007 Share Posted May 26, 2007 well if we can identify secure networks while scanning it's easy, send extra data with wep/wpa keys, but it's still hard to say since we have no idea how it actually works... the other option is if we cannot identify if the network requires secure connection at scan time but only while associating we can, in theory send them at the network request, i'll explain. the kext control functions i added when creating network selector allow us to do 2 things: 1. send info to the driver. 2. request info from the driver. so we can, in theory, send the network assoc request through the second way, and if we get an answer (error) that the network requires secure connection we can send that data back to nsGUI and in turn nsGUI will ask the user to enter the pass phrase. again this is REALLY abstract, as i have absolutely no idea as to how exactly it should be done or how it works... for some time now i'm trying to understand how exactly we can identify the network type during scan time, but without success for ATM... Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-372836 Share on other sites More sharing options...
jalavoui Posted May 26, 2007 Author Share Posted May 26, 2007 moses, when you scan for a network, check the fields of "struct ieee80211_network". i think you can find there what you need to identify the secure connection type. (i notice that this info is updated during scans and can take some time to be retrieved by the driver) after this if it needs a password nsgui should ask for it, but i don't know how to send it to the server... finally you need to add support to rx/tx for secure connection maybe it's a good idea to add some debug messages and ask people who can access secure connections to post the scan logs so we can understand the values Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-372861 Share on other sites More sharing options...
moseschrist Posted May 26, 2007 Share Posted May 26, 2007 the only thing i managed to dig is when i checked the capability field of an ieee80211 network on a wpa protected network and on an open network, the one with wpa returned 1041 while the one without returned 1025, the two networks were basicly my own after setting my router to wpa and then setting it to open mode. can someone verify the diffrence in that values ? to do that simply add in the networkaction function main loop (the one that goes through the network list) inside nsGUI source the following line: cout<<priv.ieee->networks[ii].capability and see inside a terminal window (or inside xcode window, it has a built in terminal) the result. iwi2200: revision 421 - nsGUI sources added to SVN. Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-372884 Share on other sites More sharing options...
asstastic Posted May 27, 2007 Share Posted May 27, 2007 i have a question, i need some help creating an installer for nsGUI. i need to make it so it will install the software and than make it so it will run at login time, anyone has any idea on how to do it ? i think what you want can be found here http://www.macgeekery.com/tips/cli/adding_...ms_from_the_cli basicaly run this script when you install nsGUI: /usr/bin/osascript -e 'tell application "System Events" to make new login item with properties { path: "/Applications/nsGUI.app", hidden:false } at end' it'll add nsGUI to the login items list for the user currently logged in. probably easier than trying to edit the loginwindow plist any other way. if you want to see what it edits from the gui open "System Prefrences>Users>Login Items" which should be usefull if anyone should want to dissable it, assuming they can boot to the desktop. Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-372974 Share on other sites More sharing options...
ryuu123 Posted May 27, 2007 Share Posted May 27, 2007 Hi, jalavoui iwi3945i believe the problem (as i see it in logs) is the radio on/off can someone try to check this in iwi3945.cpp? we need to find a way to turn the radio on (as i did for iwi2200) or the driver will never work I think problem is not only radio on/off but interrupts handling too. for example, in darwin_iwi3945::ipw_enable_interrupts() ipw_write32(IPW_INTA_MASK_R, IPW_INTA_MASK_ALL); should ipw_write32(CSR_INT_MASK, CSR_INI_SET_MASK); IPW_INTA_MASK_ALL perhaps for iwi2200 value.isn't it? need some improvements about handleInterrput(). iwi3945 rev 419 dead locked when select turn on from networkSelector. BTW, I found linux iwlwifi's logs in google cache. http://bughost.org/bugzilla/show_bug.cgi?id=1221 http://72.14.235.104/search?q=cache:DeOee0...;client=firefox I compair my logs and above. currently I bothered about SW error... Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373046 Share on other sites More sharing options...
Airfly Posted May 27, 2007 Share Posted May 27, 2007 iwi3945 rev 419i'll try a hack with 0x05c - maybe with the right value we can make it work - please help test it with option (1) of networkselector. do loop below in function configureConnection(...opt=1...) UInt32 r1=0; while (!((clone->priv->status & STATUS_SCANNING))) //( clone->ipw_read32(0x30)!=0x50000 ) { clone->ipw_write32(0x05c, 0x1);// clone->ipw_read32(0x30) + 0x1); //if (clone->priv->status & STATUS_SCANNING) break; r1++; //if (r1==5000000) break; } I have already count to 5255240, I stopped it, I'l run the rest later. Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373199 Share on other sites More sharing options...
PainToad Posted May 27, 2007 Share Posted May 27, 2007 hi guys, Little confused sorry, is the 3945 card working but without WEP etc? thanks heaps Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373207 Share on other sites More sharing options...
ryuu123 Posted May 27, 2007 Share Posted May 27, 2007 Hi, Airfly do loop below in function configureConnection(...opt=1...) today, i beaware one more loop. reg_txpower_periodic() -> queue_te() -> reg_txpower_periodic() ... I think it needs some wait interval. can you check this ? Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373252 Share on other sites More sharing options...
Airfly Posted May 27, 2007 Share Posted May 27, 2007 Hi, Airflytoday, i beaware one more loop. reg_txpower_periodic() -> queue_te() -> reg_txpower_periodic() ... I think it needs some wait interval. can you check this ? OK, but I want to finish that r1 loop see can we get anything. yes, maybe it needs some wait interval. Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373284 Share on other sites More sharing options...
somewhatsmart Posted May 27, 2007 Share Posted May 27, 2007 A new 2100 user here. Thanks for pursuing this project. Enclosed are my logs. i just tried the iwi2100 from May 25: - the first boot passed (no kernel panic, wifi LED turned ON) - i click "Network" the network window open with an alert "new built-in ethernet found..." - i click apply now but a new kernel panic happens Thanks again. Ryan dmesg.txt.zip ioreg.txt.zip system.txt.zip Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373321 Share on other sites More sharing options...
KemenAran Posted May 27, 2007 Share Posted May 27, 2007 Ok, I looked at the sources of the 3945 driver, and spent some time to fix the kext unloading of the driver. Not very important, but warm unload works now. How can I get the changes committed ? Should I post there, send a patch, create a bug-report, use the SVN... or wait to have more significant changes ? Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373413 Share on other sites More sharing options...
amdmatt Posted May 27, 2007 Share Posted May 27, 2007 just wanted to say i really appreciate all the work everybody is doing for this.. but one quick question.. i have a intel 3945abg card and in the system profiler when i click on the pci-ethernet card in the network category it shows the correct wifi mac adress. but when i use noGUI or network selector it shows all 0's why is that? Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373544 Share on other sites More sharing options...
PainToad Posted May 27, 2007 Share Posted May 27, 2007 so thats a no? Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373545 Share on other sites More sharing options...
asstastic Posted May 28, 2007 Share Posted May 28, 2007 Ok, I looked at the sources of the 3945 driver, and spent some time to fix the kext unloading of the driver. Not very important, but warm unload works now.How can I get the changes committed ? Should I post there, send a patch, create a bug-report, use the SVN... or wait to have more significant changes ? does this mean we can now test driver revisions without having to reboot first? Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373653 Share on other sites More sharing options...
ttorok Posted May 28, 2007 Share Posted May 28, 2007 iwi2100 rev 418 boot with -s sh /etc/rc (iwi2100 loaded!) ./networkselector panic - pic below: Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373830 Share on other sites More sharing options...
KemenAran Posted May 28, 2007 Share Posted May 28, 2007 does this mean we can now test (the 3945) driver revisions without having to reboot first?In theory, yes (when changes will be commited) : you'll be able to unload an existing driver instance with kextunload and kextload the new version without rebooting. But as the power on/init sequence of the driver is not really mature yet, this is mainly usefull for developers - I would still recommand to reboot for a clean test. i have a intel 3945abg card and in the system profiler when i click on the pci-ethernet card in the network category it shows the correct wifi mac adress. but when i use noGUI or network selector it shows all 0's why is that?I noticed the problem too : it seems the ipw_priv structure isn't correctly copied from the driver to the networkSelector. In the driver, the struct is ok, but the networkSelector receives empty or meaningless data - thus the 00:00:0000:00 MAC address and the invalid LED status. I'm stuck there - Moseschrist, do you have any idea ? Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373882 Share on other sites More sharing options...
ryuu123 Posted May 28, 2007 Share Posted May 28, 2007 can't u attach unloadable src diff? I noticed the problem too : it seems the ipw_priv structure isn't correctly copied from the driver to the networkSelector. In the driver, the struct is ok, but the networkSelector receives empty or meaningless data - thus the 00:00:0000:00 MAC address and the invalid LED status. I'm stuck there - Moseschrist, do you have any idea ? I ckeck this few days ago. ipw_priv structure is different between iwidarwin/iwi3945/networkSelector/3945/ipw3945.h and iwidarwin/iwi3945/ipw3945.h. so driver and tool are uncompatible. it's problem but currently not so important for testing driver. current major problem is no scan result from device. >>Airfly the loop is around tx power cmd. I think sending so many command cause deivce hang. and currently some unknown command error here. we should check around receiving data from device... Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373938 Share on other sites More sharing options...
amdmatt Posted May 28, 2007 Share Posted May 28, 2007 im very new to the whole osx scene but correct me if im wrong.. do we really need a different program just to find the networks? or is there some way we could "fool" airport into thinking that there is an airport card there and just associate it to the (en1) card instead.. i took some screens.. as you can see from both of those images that the correct mac adress is there and in the network util it actually shows the vendor as intel and the model as 3945.. so does that mean that the driver isnt the issue? that all we need is a way to associate the built in airport os x network selector to this hardware? please correct me if im wrong but thats just what im making out of all the information... Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373945 Share on other sites More sharing options...
PsychoSync Posted May 28, 2007 Share Posted May 28, 2007 Hi I want to thank the author of this driver and all who contributed, it works perfectly for me with my 2200BG. One question though, is there any frontend for the NetworkSelector app? I know its fairly easy to use but it would be nice to have a GUI for wireless connections. Anyone with some knowledge of OSX programming could do it and add options like connecting automatically at startup... Please don't reply saying things like : Do it yourself. I can't program, i'm just proposing stuff. Thanks anyway. Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373947 Share on other sites More sharing options...
JustJoe Posted May 28, 2007 Share Posted May 28, 2007 it's called nsGui and it is presently being written/improved. Read previous posts - you can learn all about it. Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-373949 Share on other sites More sharing options...
PsychoSync Posted May 28, 2007 Share Posted May 28, 2007 thanks, gonna look at it! Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-374015 Share on other sites More sharing options...
tprins228 Posted May 28, 2007 Share Posted May 28, 2007 Hey, sorry havnt been around for a while, doin some landscaping. well i was doing some reading about everything i missed and realized that a lot has changed. well, i tried the driver and still didnt have any luck. im wondering if maybe someone can decifer some of these logs. im wondering if i have a hardware issue or what. just not sure what to do. well here you go, dont know if they will help, but here they are. dmesg.txt ioreg.txt system.txt Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-374018 Share on other sites More sharing options...
jalavoui Posted May 28, 2007 Author Share Posted May 28, 2007 for example, in darwin_iwi3945::ipw_enable_interrupts() ipw_write32(IPW_INTA_MASK_R, IPW_INTA_MASK_ALL); should ipw_write32(CSR_INT_MASK, CSR_INI_SET_MASK); if this code is from iwi2200 it is very wrong (my mistake). i've replace old iwi2200 code with code from iwlwifi-0.0.10 in ipw_enable_interrupts() i've disable the force scan in ipw_bg_alive_start() - maybe it's better this way can you check this? if you like to use svn, post me a gmail accout so i can add you to iwidarwin iwi3945 rev 422 http://code.google.com/p/iwidarwin/ do loop below in function configureConnection(...opt=1...) UInt32 r1=0; while (!((clone->priv->status & STATUS_SCANNING))) //( clone->ipw_read32(0x30)!=0x50000 ) { clone->ipw_write32(0x05c, 0x1);// clone->ipw_read32(0x30) + 0x1); //if (clone->priv->status & STATUS_SCANNING) break; r1++; //if (r1==5000000) break; } I have already count to 5255240, I stopped it, I'l run the rest later. you must have if (r1==5000000) break; or it will loop for ever can you check if 0x05c is valid for writting? note that 0x5000000 is iwi2200 value for 0x30 you need to find out what values are valid for iwi3945 (and maybe change 0x05c to other address) this radio hack is not very easy to do Ok, I looked at the sources of the 3945 driver, and spent some time to fix the kext unloading of the driver. Not very important, but warm unload works now.How can I get the changes committed ? Should I post there, send a patch, create a bug-report, use the SVN... or wait to have more significant changes ? this is a good help - if you have a gmail account post it so i can add you to iwidarwin reg_txpower_periodic() -> queue_te() -> reg_txpower_periodic() ... the queue_te, queue_td, functions are obsolete. they gave me bugs in iwi2200. if you can check the code from iwi2200 for this functions and replace them in iwi3945 you can use more exact timers for queue_te - this can prevent some bugs for the timer replace: queue_te(10,OSMemberFunctionCast(thread_call_func_t,this,&darwin_iwi3945::reg_txpower_periodic),priv,NULL,true); with queue_te(10,OSMemberFunctionCast(thread_call_func_t,this,&darwin_iwi3945::reg_txpower_periodic),priv,2,true); for a 2 second delay but it's better to remove this old code iwi3945 at this point i'm using functions from iwlwifi-0.0.10 and mac80211-4.0.4. this is not very compatible with ieee80211 lib (used in iwi2100 and iwi2200) but it's the possible solution for making iwi3945 work if anyone find code from iwi2200 or ipw3945-1.2.0 let us know. sorry for the mess in code but i've used several sources when i started writting code for the iwi drivers i'm happy to see that there are people willing to help this project going thank you all iwi2200:revision 421 - nsGUI sources added to SVN. what do you think of changing the code for getting the most info on secure networks? this way we can get several logs from all iwi2200 users you need to add a property for "build" folder - type svn:ignore. this way the build object won't upload to svn i've commited that to svn basicaly run this script when you install nsGUI: /usr/bin/osascript -e 'tell application "System Events" to make new login item with properties { path: "/Applications/nsGUI.app", hidden:false } at end' this is nice - i'll test it moses, i'll rebuild iwi2200 project structure so that it include nsgui, networkselector (i like it for prompt mode), iwi2200.kext and asstastic script. ttorok, do you test last version with other cards turned off? you should only use option (1) in networkselector - i haven't work on other options yet this is for all people having iwi2100 cards Link to comment https://www.insanelymac.com/forum/topic/36976-intel-wireless-driver/page/93/#findComment-374129 Share on other sites More sharing options...
Recommended Posts