[linrad] WLR2-25 on a slave computer
Hello The Net, I am sustaining progress, but I am not home yet. Tried the ethereal monitoring software on both the master and slave computers. Results were identical and showed the right group # and ports. Streaming UDP data at about 12 packets /second. I updated to the latest LAN drivers and I got the WLR2-25 slave to recognize the data. When I activate the "A" weak signal process, it encounters an error and wants to shut down. The error signature: mod name ntdll.dll, mod ver 5.1.2600.2180 offset 1010 I can send the detailed error report file, but I will need a direct e-mail address since NO attachments are allowed on this list. any pointers ? Thanks Stan, W1LE Z # This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>
[linrad] Re: Dangerous experiments ????
Hi Alberto, > My suggestion for another experiment is the following : > > Rename that kernel32.dll that gives the correct results with another fancy > name, for example mystery.dll > Then place it into the Linrad directory, and change the code so to load > mystery. dll instead of kernel32.dll > So you will be assured that Windows itself will not use it, avoiding in this > way any problem of compatibility or > updating, and Linrad only will use it, limited to the CPU load computation > functions. This does not work at all. I get an error exit which asks me whether I want to send an error report to Microsoft:-) The kernel32.dll file contains the text string KERNEL32.DLL Presumably Microsoft tries to protect the system a little;-) Your previous mail with the GetProcessAffinityMask function seems to be the solution for Linrad. The beauty of this solution is that it works under Windows 2000, the version that I have on my stationary computer. (I also have Win 98, but it is obsolete and missing the cpu load percentage there is of no concern to me.) I will simply get the number of processors and multiply with the elapsed clock time. Then I do not need kernel32:-) Dear Alberto, I tried to use the GetProcessTimes function long ago. Actually I spent quite some time on it. Your code showed me the solution: One has to use GetCurrentProcess() to get the proper handle. Such little "secrets" make life hard for newcomers;-) Thanks for the Win support. Also on the serial port through ON7GN:-) 73 Leif / SM5BSZ # This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>
[linrad] Re: Dangerous experiments ????
Leif Asbrink wrote: It seems to me there is a bug in the new kernel32.dll. I have tried to find out how to send bug reports to Microsoft but it seems they do not want me to Comments? Hi Leif, Kernel32.dll is a crucial file of Windows, and all the system depends on it, so better not play too much with it What Windows uses is the file kernel32.dll found in the Windows\system32 directory. If it gets ruined or erased, Windows replaces it with the backup copy held in the windows\system32\dllcache directory. A DLL is loaded into memory when first used, then usually it is erased from memory only when the program that uses it terminates and some memory is required for other tasks. So what probably happened in your experiment is that Linrad did load the kernel32.dll *not* from the system32 directory, but from its local directory, and the CPU load computation was correct. Then when Linrad exited, the copy loaded in memory was not unloaded, because there were not an immediate need of free memory, so when you restarted Linrad, even if you had erased the file, the loader did find the copy of kernel32 already loaded in memory and used it, still giving the correct results. Of course when you rebooted the system, the copy of the DLL found in system32 was that was used. My suggestion for another experiment is the following : Rename that kernel32.dll that gives the correct results with another fancy name, for example mystery.dll Then place it into the Linrad directory, and change the code so to load mystery. dll instead of kernel32.dll So you will be assured that Windows itself will not use it, avoiding in this way any problem of compatibility or updating, and Linrad only will use it, limited to the CPU load computation functions. 73 Alberto I2PHD # This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>
[linrad] Dangerous experiments ????
Hi Alberto and all, The error in system time I found on the dual core machine made me try an experiment. This site: http://www.dll-files.com/dllindex/dll-files.shtml?kernel32 offers a free download of Kernel32.dll. I have placed their file in the Linrad directory and a little to my surprise it fixes the problem:-) Now, the file is quite old. It looks like this: 1999-05-05 00:00 471 040 KERNEL32.DLL On my system there are several kernel32.dll files: C:\WINDOWS\$hf_mig$\KB917422\SP2QFE 2006-07-05 11:58 998 912 kernel32.dll C:\WINDOWS\$NtUninstallKB917422$ 2004-08-04 09:00 997 376 kernel32.dll C:\WINDOWS\system32 C:\WINDOWS\system32\dllcache 2006-07-05 11:57 997 888 kernel32.dll The following observation worries me. 1) After a reboot and without the 1999 file the CPU load is incorrect by a factor of two. 2) I can start and exit from Linrad any number of times but the error is always the same. 3) After the 1999 file is copied to the Linrad directory and linrad is started the CPU load comes out correctly. 4) When I exit from Linrad and remove the 1999 file and then start Linrad again it still reports the correct CPU load. It stays ok even if I enter and exit any number of times. 5) When I reboot and start Linrad I am back at 1). The conclusion is that the old file overwrites something in my system which then stays overwritten until I make a reboot. Of course I like the result as far as CPU load is concerned - but what other things have I changed? Have I only changed the code for "GetSystemTimes" or have I invalidated various security updates with unpredictable consequences? In other words, is it a good idea to make the old dll available to Linrad or is that dangerous? It seems to me there is a bug in the new kernel32.dll. I have tried to find out how to send bug reports to Microsoft but it seems they do not want me to Comments? 73 Leif / SM5BSZ # This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>
[linrad] Re: WLR2-25 as a networked Slave
Hello Stan, On Saturday 17 March 2007 23:30, Stan wrote: > Any ideas on how to troubleshoot the data between the ethernet port and > WLR2-25 ? With ethereal both on the master and the slave computer you can check the traffic of the packets http://www.ethereal.com/download.html > Somehow there is a gap in the routing of data in the ASUS Vintage > computer under Win XP sp2. 73 Pierre/ON5GN # This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>
[linrad] Re: Windows functions
Leif Asbrink wrote: . // prepare to support GetSystemTimes hKernel = LoadLibrary( _T("Kernel32.dll") ); Looks like using a dll;-) Hi Leif, of course Kernel32.dll *is* a DLL, but not one meant specifically for the purpose of measuring the CPU load :-) On my old laptop this works fine:-) It is a Pentium 4. On the new one the code does not give the correct result:-( The new one has a dual core centrino and the result I get is 50% of the load indicated by the system monitor. Well, this is what Microsoft writes on his SDK documenation : - The GetSystemTimes function retrieves system timing information. On a multiprocessor system, the values returned are the sum of the designated times across all processors. - and when they document the GetProcessTimes API, they write : - lpKernelTime [out] Pointer to a FILETIME structure that receives the amount of time that the process has executed in kernel mode. The time that each of the threads of the process has executed in kernel mode is determined, and then all of those times are summed together to obtain this value. lpUserTime [out] Pointer to a FILETIME structure that receives the amount of time that the process has executed in user mode. The time that each of the threads of the process has executed in user mode is determined, and then all of those times are summed together to obtain this value. - So apparently the the kernel and user mode time each thread has spent on whatever processor of the CPU should be summed together. If in your experience this is not true, then maybe there is (another) bug in Windows. I tested Winrad on a hyperthreading Pentium IV, which should have two execution units, but did not notice anything strange. But probably a hyperthreading Pentium is not the same as a dual core Pentium. Is there a way to find out how many cores there are in the system? Then I could use the system clock times the number of cores to get the amount of total CPU time available. Though I have never used it, the API BOOL GetProcessAffinityMask ( HANDLE hProcess, PDWORD_PTR lpProcessAffinityMask, PDWORD_PTR lpSystemAffinityMask ); should be what you want. The SDK doc says : - A system affinity mask is a bit vector in which each bit represents the processors that are configured into a system. - So the third parameter of that API should contain that information on return from the call; 73 Alberto I2PHD # This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>
[linrad] Re: Windows functions
Hello Alberto, On CPU load: > I don't know of any DLL tha can do that, but I can > offer you the code I use in Winrad for that purpose. . . . > // prepare to support GetSystemTimes > hKernel = LoadLibrary( _T("Kernel32.dll") ); Looks like using a dll;-) > res = GSTaddr(&idle, &kern, &usr); > res &= GetProcessTimes(GetCurrentProcess(), (FILETIME*)&crea, > (FILETIME*)&exit, (FILETIME*)&pkern, > (FILETIME*)&puser); On my old laptop this works fine:-) It is a Pentium 4. On the new one the code does not give the correct result:-( The new one has a dual core centrino and the result I get is 50% of the load indicated by the system monitor. I find it a bit peculiar that the elapsed time (kern+usr) runs four times faster than the system clock One solution could be to compare the system clock with kern+user or use sqrt((kern+user)*system_clock) as the reference time to which pkern+puser is related. In case the problem is a bug in Kernel32.dll Microsoft might correct it and then a fix inside Linrad would become incorrect. Is there a way to find out how many cores there are in the system? Then I could use the system clock times the number of cores to get the amount of total CPU time available. The computer is only a few months old and I have made all the updates that were available at Microsoft Update. Any idea? 73 Leif / SM5BSZ # This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>
[linrad] WLR2-25 as a networked Slave
Hello The Net: Thanks to Leif and Pierre for your critique and helping me achieve progress. The WLR2-25 as a networked master is working and is streaming data over the local area network at about 12-15 packets a second. The router is blinking, indicating streamed data. The LAN has worked in the past. On the networked slave computer with WLR2-25, the motherboard ethernet connection is also blinking at the same rate indicating data is getting to the slave computer. However, no data is being received by WLR2-25 in "R" mode with #10 enabled in N setup. It just sits there and says: listening for RAW16 rx input Group 239.255.0.0 port 50050 Any ideas on how to troubleshoot the data between the ethernet port and WLR2-25 ? Somehow there is a gap in the routing of data in the ASUS Vintage computer under Win XP sp2. Stan, W1LE Cape Cod, MAFN41sr Z # This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>
[linrad] Re: Windows functions
> The serial interface is from Pierre, ON5GN. Inspired by a code snippet from Alberto I2PHD ;-) > The latest version can set port number, baud rates and > stop bits. Currently only one serial port can be open > at any given time. 73 Pierre/ON5GN # This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>
[linrad] Re: Windows functions
Leif Asbrink wrote: 1) It would be nice to show the CPU load under Windows. The system monitor uses up a lot of resources, particularly during startup or when the window is moved so it would be nice to not have to use it. Maybe there is a dll somewhere that could be used to get this info? Leif, I don't know of any DLL tha can do that, but I can offer you the code I use in Winrad for that purpose. Let's hope that the mail system does not wrap lines where it shouldn't, making the code almost unreadable. In any case I can send it to you as an attachment. Let's first try with the mail... 73 Alberto I2PHD - < // Somewhere in main.h typedef bool (__stdcall * pfnGetSystemTimes)(__int64* lpIdleTime, __int64* lpKernelTime, __int64* lpUserTime ); pfnGetSystemTimes GSTaddr; // // Somewhere in main.cpp, during the init phase // prepare to support GetSystemTimes hKernel = LoadLibrary( _T("Kernel32.dll") ); if(hKernel != NULL) { GSTaddr = (pfnGetSystemTimes)GetProcAddress(hKernel, "GetSystemTimes" ); if(GSTaddr == NULL ) { FreeLibrary(hKernel); hKernel = NULL; } } // This is the routine that computes the CPU loads caused by this programs, and by // all the other programs. The returned cpuTot and cpuProc are expressed in percentage. // This routine works only under Windows XP and Windows 2003 //--- bool __fastcall TMainForm::getCpuLoad(int &cpuTot, int &cpuProc) { __int64 usr, kern, idle, sys, dusr, dkern, didle, crea, exit, pkern, puser, dpkern, dpuser; static __int64 last_usr, last_kern, last_idle, last_pkern, last_puser; static bool first = true; bool res; if(!GSTaddr) return false; res = GSTaddr(&idle, &kern, &usr); res &= GetProcessTimes(GetCurrentProcess(), (FILETIME*)&crea, (FILETIME*)&exit, (FILETIME*)&pkern, (FILETIME*)&puser); if(!res) return false; if(first) { last_usr = usr; last_kern = kern; last_idle = idle; last_puser = puser; last_pkern = pkern; first = false; return false; } dusr = usr - last_usr; last_usr = usr; dkern = kern - last_kern;last_kern = kern; didle = idle - last_idle;last_idle = idle; dpkern = pkern - last_pkern; last_pkern = pkern; dpuser = puser - last_puser; last_puser = puser; sys = dusr + dkern; if(sys == 0) return false; cpuTot = (int)(((float)sys - didle) * 100. / sys + 0.5); cpuProc = (int)((float)(dpkern + dpuser) * 100. / sys + 0.5); return true; } //--- > # This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>
[linrad] Re: Windows functions
Hello Günter, > please let me carefully ask if it is already too late > to ask for the parameters of the serial interface? The serial interface is from Pierre, ON7GN. The latest version can set port number, baud rates and stop bits. Currently only one serial port can be open at any given time. > Just asking if the data on the serial interface could > be just an ASCII string, I have not read the specifications but I think the serial port is opened to handle 8-bit data and that would allow binary data or ASCII strings as you please. > and if you can handle external LOs that do not have > 1Hz resolution, maybe 25kHz or such? It is up to the user to send LO control information according to the specifications of his hardware. Linrad imposes no restriction whatsoever:-) 73 Leif / SM5BSZ # This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>
[linrad] Re: WLR2-25 on the network
Hello Stan, > Master computer is at the receiver in the shack, Win XP sp2 > HP Pavilion, 100 base network activated, 2 GHz Celeron, 256MB RAM > > Start WLR2-25 and set N, network parameters to: > 1, base port = 50050 > 2, send address = 239.255.0.0 > 3. receive address = 239.255.0.0 > 4. send raw data in 16 bit format ON (port 50050) > (changes color to yellow ! ) > 5 thru 10 OFF > > exit network setup and save with a W OK. > toggle R for network input > (does this enable RAW16 data input into the network ?? ) No. R means receive from the network. When you press R you get to the network setup screen, you are supposed to tell linrad what kind of input you want to receive. A master has to be put in transmit mode. Press T and note that "NETSEND" comes up in red. You may press W here to have the network active in tx mode next time Linrad is started. > go to mode A for weak signals and verify it is working with a test tone. > All OK, but I see NO network activity, > I would expect to see streaming data in one direction, at least. No. You are not in any net mode. > Slave computer in the auxiliary shack, Win XP sp2 > ASUS 2.4 Ghz Pent4, 1 GB RAM, 100 base network activated > > start WLR2-25 and set N parameters to: > 1. base port = 50050 > 2. send address = 239.255.0.0 > 3. receive address = 239.255.0.0 > 4 thru 9 all set to OFF > 10, RX input from network ON raw data 16 bit > > exit network setupsave N setup with a W > > At the WLR2-25 startup page, toggle T for NETSEND > (as indicated in the upper left in red.) ?? This can not be the whole story. You can only have NETSEND in red if your network setup has enabled something (4 through 9) When NETSEND is present in red, Linrad will start acting as a master as soon as you enter a processing mode. > Mode A for weak signals, > > I get displayed: > listening to network for RAW16 RX input > Group 239.255.0.0, port 50050 Here you have had "NETWORK RX INPUT " in red on the top line. It is now a slave. When you enter a processing mode Linrad will wait for the network data from a master. > When I try to X for exit, I get > > internal error 1269 > [1269] waiting for master was interrupted from keyboard > press any key > > pressing any key dumps me out of Linrad Yes. You are supposed to start a master on the network now:-) This computer is sucessfully set up as a slave. - Setup for a master: 1) Press N to select data format (e.g. RAW16). 2) Press T to tell Linrad to make net transmit active. 3) Press W to remember this computer is the master. 4) Press e.g. A to start operation. The system monitor will show network activity. Setup for a slave: 1) Press N to select data format (e.g. RAW16). 2) Press R to tell Linrad to use the net for input. 3) Press W to remember this computer is a slave. 4) Press e.g. A to start operation. Good luck! 73 Leif / SM5BSZ # This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>