Related
Hi Folks!
I'm trying to add GPS emulation to my navigation system, that is based on CellTracking via GSM.
Does anybody know how to create a virtual CommPort in eVC++ :?:
I tried it with function like ActivateDevice or RegisterDevice, but i always receive a zero Handle:
Code:
#include "winbase.h"
bool virtPortOpen(HANDLE& HandleGiveAway)
{
//HandleGiveAway = ActivateDevice(L"HKEY_LOCAL_MACHINE\\Drivers\\GPSvirt", 0);
HandleGiveAway = RegisterDevice(L"COM", 7, L"serial.dll", 0);
if ((HandleGiveAway == INVALID_HANDLE_VALUE) || (HandleGiveAway == NULL))
return false;
else
return true;
}
int virtPortClose(HANDLE& GetHandle)
{
return DeactivateDevice(GetHandle);
}
Did i use the right .dll-File? Need i create a own .dll-DeviceDriver with the DDK?
Please give me a hint!
Greetings,
Florian
http://www.eltima.com/products/virtual_drivers/
ELTIMA Solution to expensive
cairo31male said:
http://www.eltima.com/products/virtual_drivers/
Click to expand...
Click to collapse
Thanks for the URL, but i think that this solution is much to expensive for a student!
Any other suggestions?
Greetings,
Florian
http://mamaich.kasone.com/rover/IrCOMM.rar
Archive contains a sample virtual COM-port driver. It is installed as a COM8 and after opening COM8 it redirects all data to COM1. You may modify the driver as you like.
Post of "mamaich"
mamaich said:
http://mamaich.kasone.com/rover/IrCOMM.rar
Archive contains a sample virtual COM-port driver. It is installed as a COM8 and after opening COM8 it redirects all data to COM1. You may modify the driver as you like.
Click to expand...
Click to collapse
In this Archive is a C++ project, which deals with infrared communication. I don't know what it has in common with creating a virtual CommPort. - Haven't you postet the right file?
When i try to compile this project, i found out, that it calls some functions not included in the header files, or anywhere else! Look here:
Code:
Compiling resources...
Compiling...
IrCOMM.cpp
C:\Dokumente und Einstellungen\Administrator.MCFLOWNNET\Eigene Dateien\Programmierung\eVC\IrCommEmu\IrCOMM.cpp(34) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
C:\Dokumente und Einstellungen\Administrator.MCFLOWNNET\Eigene Dateien\Programmierung\eVC\IrCommEmu\IrCOMM.cpp(47) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
C:\Dokumente und Einstellungen\Administrator.MCFLOWNNET\Eigene Dateien\Programmierung\eVC\IrCommEmu\IrCOMM.cpp(77) : warning C4018: '<' : signed/unsigned mismatch
StdAfx.cpp
Linking...
IrCOMM.obj : error LNK2019: unresolved external symbol closesocket referenced in function WinMain
IrCOMM.obj : error LNK2019: unresolved external symbol recv referenced in function WinMain
IrCOMM.obj : error LNK2019: unresolved external symbol select referenced in function WinMain
IrCOMM.obj : error LNK2019: unresolved external symbol send referenced in function WinMain
IrCOMM.obj : error LNK2019: unresolved external symbol __WSAFDIsSet referenced in function WinMain
IrCOMM.obj : error LNK2019: unresolved external symbol accept referenced in function WinMain
IrCOMM.obj : error LNK2019: unresolved external symbol listen referenced in function WinMain
IrCOMM.obj : error LNK2019: unresolved external symbol bind referenced in function WinMain
IrCOMM.obj : error LNK2019: unresolved external symbol setsockopt referenced in function WinMain
IrCOMM.obj : error LNK2019: unresolved external symbol socket referenced in function WinMain
ARMRel/IrCommEmu.exe : fatal error LNK1120: 10 unresolved externals
Error executing link.exe.
Please give me further information! - Thanks in advance!
Florian
Re: Post of "mamaich"
oops. Wrong archive. Should be http://mamaich.kasone.com/rover/RIL_hook.rar
it contains 2 projects:
Serial - a wrapper around the standart COM1 driver
seRILal - a virtual COM8 driver that creates COM8 and redirects all its IO to the first driver.
Re: Post of "mamaich"
mamaich said:
oops. Wrong archive. Should be http://mamaich.kasone.com/rover/RIL_hook.rar
it contains 2 projects:
Serial - a wrapper around the standart COM1 driver
seRILal - a virtual COM8 driver that creates COM8 and redirects all its IO to the first driver.
Click to expand...
Click to collapse
Sounds good. - Thanks!
I'll give it a try in the evening! - Too good weather here in Germany!
Florian
How to install virtual ports?
This project seems to be exactly what I was searching for! - Much thanks!
But I still have a question: :arrow: How do I install the drivers? - Should I place a new Key in the registry, and in that case, which values do I need to add?
When I try to load one of the drivers with RegisterDevice, I always receive a NULL handle.
Is it a problem that I have deinstalled the standart serial COM1? - But the serial.dll is still existing!
Greetings,
Florian
Re: How to install virtual ports?
this project is coming from Anextek SP230. It had COM1 driver named xsc1_serial.Dll.
To install you should go to registry and modify COM1 driver to be serial.dll and add manualy COM8 driver to be seRILal.dll (you may choose any other COM-port number).
In case of Imate COM1 driver is com16550.Dll, so for this method to work you should recreate import library from com16550.Dll and overwrite Serial\serial.lib file with it. Otherwise your serial.dll would import functions from a nonexistent DLL and the system will crash.
Re: How to install virtual ports?
Well,
thanks very much for your explanations!
But I still have a problem: How do i edit the link to the "xsc1_serial.dll" in the .lib-file?
Need it to be rebuild? - My Problem is that i only have emVC++ without DDK or Platform Builder! - It isn't availibe for free, i think!
Why is the .lib-file needed? - Does it export the COM_Write etc. fuctions to the project?
Thanks in an advance!
Florian
Re: How to install virtual ports?
Probably you don't need this file.
My project is hooking COM1 and makes the real hardware accessible by both COM8 and COM1. As far as I understand you are trying to add a new COM-port to the system that would emulate a GPS receiver. You should take seRILal project, remove Redirected_COM_* functions, remove serial.lib from the project and write your own implementation of My_COM_* functions (they would be exported as COM_* functions, look into serial.def file).
Reed MSDN library for information on this, but remember that it is incorrect in most function prototypes .
You should implement COM_Init (typically driver reads its settings from registry), COM_Open (allocate buffers, return HANDLE for the opened port, that is typically a pointer to allocated buffer), COM_Read (read data), COM_Write (wite data), COM_Close (free the memory allocated in COM_Open). All other functions should be present, but they may do nothing (simply return "success"). You should later implement COM_IOControl function, so that your driver would correctly implement read/write timeouts. My code does not implements this. All timeouts are hard-coded.
My Problem is that i only have emVC++ without DDK or Platform Builder! - It isn't availibe for free, i think!
Click to expand...
Click to collapse
Everything is available for free (soft, beer, girls, etc ). At least in Russia.
Trial 120-day version of Platform Builder 4.20 is available for free from Microsoft.
http://franson.biz/gpsgate/index.asp
Maybe you could look here.
Sorry I can't be any help but...
I've been thinking about CellTracking via GSM for a while now.
Most folk I've talked to in the UK tell me that it's not possible for a GSM device to discover it's own position !?
Any links or pointers on tracking ?
Ideally i'd like to append coordinates of the device on every post to the backend db.
Cheers (and good luck with the comm port thingy!)
I need to creat on my ipaq 5550 a virtual comm port
Hi,
Have you solve your problem ?
I am working on a robotic project and I have the same problem but on a ipaq 5550 under ppc2003.
I need to creat on my pocket pc a virtual comm port.
Because I receive by WIFI, GPS NMEA sentences, so I want to redirect them to this virtual port, and finaly connect to this port my regular GPS navigation software.
Thanks
Laurent
FRANCE
http://ourworld.compuserve.com/homepages/richard_grier/CFSerial.htm
Hi,
i have written a very simple hello world program and transfered it on my xda. But when i want to start the prog this message apears "hello world or one of its components are missing" ( in german Hello World ( oder eine der komponenten) konnte nicht gefunden werden. )
i use emc 4.0, is it necessary to install some kind of runtime dll or so. here my inf file for building a cab
[Version]
Signature="$Windows NT$"
Provider="frost"
CESignature="$Windows CE$"
[CEStrings]
AppName="helloworld"
InstallDir=%CE2%
[CEDevice]
ProcessorType = 2577 ; StrongARM
UnsupportedPlatforms = "HPC","Jupiter"
VersionMin=3.00
VersionMax=32767.0
BuildMax=0xE0000000
[DefaultInstall]
CopyFiles = Files
[SourceDisksNames]
1=, "SourceDisk01",,C:\Projekte\Development\xda\hello world\ARMV4Rel
[SourceDisksFiles]
"hello world.exe" = 1
[DestinationDirs]
Files = 0, %InstallDir%
[Files]
"hello world.exe",,,0x40000003
ok thanks a lot
what happens if you just try to run the exe file without using the cab to install?
the same message, is it possible that the os of my xda is too old or is an additional dll needed?
does it also happen when you debug the program using the simulator and your xda as platform ?
when i use the emulation on evc 4 it works, but how can i configure the emulator as xda platform?
somewhere in the embedded visual c++ 4 settings you should be able to pick the pda as debugging platform
hi,
now i figured out why it doesn´t work the solultion for this problem can be found here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/evc4migration.asp
for people with the same problem ....
the reason:
the os is too old for evc 4
well you can upgrade it to 2003SE then
It's seems DllMain won't run when a dll loaded by LoadLibrary in wm5.0.
The dll is very simple,complied by vs 2005 beta2,just a MessageBox in dllmain
I load this dll in another process,using the api loadlibrary,In windows mobile 5.0 ppc emulator,no dialog box appear,but you can see that dll.dll had been loaded with remote file viewer.In Pocket PC 2003 SE emulator,every thing is ok
anybody has any idea about it?
Thanks
dll.cpp
#include "stdafx.h"
#include <windows.h>
#include <commctrl.h>
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
MessageBox(NULL,L"11",L"22",0);
return TRUE;
}
Hi,
There is no default entry point in a DLL. You are doing everything fine except you need to load the module (function) you want to call. I cant remember off hand the details but its LoadModule.
Look thought the documentation for calling a function in a dll some more.
Paul
psneddon said:
Hi,
There is no default entry point in a DLL. You are doing everything fine except you need to load the module (function) you want to call. I cant remember off hand the details but its LoadModule.
Look thought the documentation for calling a function in a dll some more.
Paul
Click to expand...
Click to collapse
Thanks for your reply.
I don't want to call any function,excep the default entry point DllMain when loading library.
There should be default entry point in the dll I complied,because in wm2003,everything is ok(Messagebox appears when loading or unloading library)
DllMain worked in my programs in 2K5. Maybe your messagebox appears behind today window? I never tried MessageBox in DLLs, but CreateFile worked fine.
oh right. Maybe I'm wrong - i always thought DLL's didnt have default entry points - I need to get reading the SDK's more
Paul
mamaich said:
DllMain worked in my programs in 2K5. Maybe your messagebox appears behind today window? I never tried MessageBox in DLLs, but CreateFile worked fine.
Click to expand...
Click to collapse
hi mamaich,what device are you using?Emulator?
I've tried in another way:return TRUE or FALSE in DllMain,then check whether the dll is loaded with remote process viewer.
In wm5.0 emulator,DllMain's return value is ingored,the dll is always loaded.And in wm2003 emulator,dll can be loaded only if DllMain's return value is TRUE
I've compiled the DLL with eVC4 and run it on XDA2 with WM5. That DLL was a part of a rather large project.
Maybe VS2005 produces incorrect DLLs?
mamaich said:
I've compiled the DLL with eVC4 and run it on XDA2 with WM5. That DLL was a part of a rather large project.
Maybe VS2005 produces incorrect DLLs?
Click to expand...
Click to collapse
The dll should be ok,it works well on ppc2003's emulator.I have also tried the dll produced by evc4.0.
Seems it's my fault,I got it work on wm emulator now
Thanks for all
I found it,dllmain not run just because the dll export no function.after add a not used fuction,MessageBox appear when loading
Hello All!
On my QTEK9000 the keyboard shortkey "Fn" + "->" key doesn't load the Connection Manager anymore after I upgraded to v1.30.68 for i-Mate.
Q1: Is these difference between i-Mate and QTEK, and i-Mate JasJar doesn't have the Comm Manager red icon on the "->" key on the physical keyboard?
Q2: Is there any hack to setup this shortcut ?
Sorry, have not found any info so far.
THANK YOU VERY MUCH for your answers, All!
This was a known issue with the Beta ROM. upgrade to .76
I used Hsect2 a while ago to turn off WIFI and BT. Since then I have not been able to
turn them back on.
I checked the installation of IOPERM.SYS. there is no problem. So I reinstalled Windows Vista and started all new. Still, the devices are not coming up anymore.
I then installed some cab files in SnapVue to test compatibility and guess what, SnapVue is stuck at the Windows Mobile bootscreen
I tried to use ECshift and Hsect2 to get into the bootloader mode and hard reset
SV.
But it doesnt work.
The EC of my shift doesnt react to my commands, neither in Bash nor in DOS BOX
- Is your touchscreen working?
- Is your vista installation from the recovery partition or a new installation from a vista DVD? (I ask because I've seen some of your posts asking for a recovery partition and drivers).
- Can you post a screenshot of your device manager?
pof said:
- Is your touchscreen working?
- Is your vista installation from the recovery partition or a new installation from a vista DVD? (I ask because I've seen some of your posts asking for a recovery partition and drivers).
- Can you post a screenshot of your device manager?
Click to expand...
Click to collapse
Hey Pof...
my installation is not from the recovery partition. It was not possible, since the XVista.wim is broken.
My touchscreen is not working either.
Which point in the device manager do you want to see?
No exclamation marks.
Most probably you have installed a driver which is blocking i/o port access to 0x250-0x251, 0x68 and 0x6c. Those are the i/o ports used by the touchscreen and EC Controller. Check for properties of the device drivers you have installed and remove those "taking" these ports.
If that does not help, to make sure the EC controller is not really screwed you have two options:
a) find someone willing to share his recovery partition with you
b) install Linux and try if the EC Controller and the touchscreen are responsive there.
pof said:
Most probably you have installed a driver which is blocking i/o port access to 0x250-0x251, 0x68 and 0x6c. Those are the i/o ports used by the touchscreen and EC Controller. Check for properties of the device drivers you have installed and remove those "taking" these ports.
If that does not help, to make sure the EC controller is not really screwed you have two options:
a) find someone willing to share his recovery partition with you
b) install Linux and try if the EC Controller and the touchscreen are responsive there.
Click to expand...
Click to collapse
I will get right on it and install ubuntu.
I opened a fast FTP (100mbit up and down), its permanent. If someone want to upload Shift images and stuff, no problem. Have a few TB free
pof said:
Most probably you have installed a driver which is blocking i/o port access to 0x250-0x251, 0x68 and 0x6c. Those are the i/o ports used by the touchscreen and EC Controller. Check for properties of the device drivers you have installed and remove those "taking" these ports.
If that does not help, to make sure the EC controller is not really screwed you have two options:
a) find someone willing to share his recovery partition with you
b) install Linux and try if the EC Controller and the touchscreen are responsive there.
Click to expand...
Click to collapse
0x250-0x251 and 0x68-0x6c are used by Intel 82801GBM ICH-M LPC Interface.
I uninstalled it and disabled the device. ECshift says " Cant open EC"
err... you have disabled the LPC (low pin count) bus, which connects "legacy" I/O devices to the CPU. You should better keep it, otherwise it won't be possible to have I/O access to the EC controller.
pof said:
err... you have disabled the LPC (low pin count) bus, which connects "legacy" I/O devices to the CPU. You should better keep it, otherwise it won't be possible to have I/O access to the EC controller.
Click to expand...
Click to collapse
thats what I thought. I was under the impression that the guys using XP cannot get their touchscreen working, because the LPC shows up as "Unknown Device"
I guess I better wipe the disk and try ubuntu. See what happens.
I had some time tonight to install Ubuntu. Now I could activate everything again and I will keep ubuntu for a while.
However, I still cannot hard reset SnapVue
aquasesh said:
However, I still cannot hard reset SnapVue
Click to expand...
Click to collapse
I haven't found the EC values for hard reset yet, that's why hsect2 doesn't have this option. I will not have much time during this week, but it's on my TO-DO list
pof, is there a way to increase the frequency of the touchscreen? Its very slow and jerky, the cursor jumps while dragging.
I tried playing with TouchKit, but nothing much changed.
aquasesh said:
pof, is there a way to increase the frequency of the touchscreen? Its very slow and jerky, the cursor jumps while dragging.
I tried playing with TouchKit, but nothing much changed.
Click to expand...
Click to collapse
install a kernel debugger in vista (ie: syser) and figure out the correct initialization values to change the irq triggering speed. It's also on my TO-DO list
pof said:
install a kernel debugger in vista (ie: syser) and figure out the correct initialization values to change the irq triggering speed. It's also on my TO-DO list
Click to expand...
Click to collapse
Pau, your to-do list is very long.
But I am really thankful and I know everyone else appreciates your hard work.
I will donate some money, since I cannot buy you SERVECA
Thanks, we spell it "cerveza"
aquasesh said:
However, I still cannot hard reset SnapVue
Click to expand...
Click to collapse
Just had a thought:
Put it in bootloader mode (hsect2 -b) and then use HTCFlasher to connect to the bootloader Cmd prompt. There just type "task 28" and hit enter.
This will do a Hard Reset on SnapVue
pof said:
Just had a thought:
Put it in bootloader mode (hsect2 -b) and then use HTCFlasher to connect to the bootloader Cmd prompt. There just type "task 28" and hit enter.
This will do a Hard Reset on SnapVue
Click to expand...
Click to collapse
Thanks for the advice. Now I really owe you one.
Worked perfect.
Now, Linux is just a little slow.
aquasesh said:
Thanks for the advice. Now I really owe you one.
Worked perfect.
Now, Linux is just a little slow.
Click to expand...
Click to collapse
heh, I'd have to kill you for not reading - you said you tried ecshift and my ecshift thread describes how to do task 28!
pof said:
I haven't found the EC values for hard reset yet, that's why hsect2 doesn't have this option. I will not have much time during this week, but it's on my TO-DO list
Click to expand...
Click to collapse
I have two different ioctl's to do it, neither works.
one was taken from vistadiag - then tested and it is broken in vistadiag too.. this one would not hard reset though if WM is not fully booting as it sends the COLDBOOT string to the WM side EC driver.
the other is from the htc official software (don't know if this one hard resets if WM is not booting, but I doubt it as I didn't find anything in the SPL that'd look for a GPIO or anything, the normal hard reset function is simply edited out of the SPL, you only have task 28). that doesn't work either. I checked in debugger and my ioctl params are correct, but I must be missing something because this htc software definitely isn't broken.
I also looked at the software that HTC published in the support site to hard reset windows mobile. From the DLL disassembly I found the IOCTL which also didn't work in my tests, so I tried to do some brute-forcing with this code (look at hsect2 source code for the defines of wsio() macro and EC_PORT_INIT).
Code:
void ClearWMStorage()
{
int len = 0xc;
int checklen = 0xe;
int clearstorage = 0x80;
int i,checksum;
int total = 0;
/* the initial value should be something between 0xa and 0x29 */
//int val = 0x0; // switches to CE and asks for PIN (does it work always?)
//int val = 0x1 to 0x9; // does nothing
//int val = 0xa; // hangs EC controller
//int val = 0xb to 0xf; // does nothing
// issued a soft-reset after trying 0xc - nothing changed
//int val = 0x10 to 0x1f; // does nothing
// issued a soft-reset after trying 0x1f - nothing changed
//int val = 0x20 to 0x2f; // does nothing
// issued a soft-reset after trying 0x2f - nothing changed
int val = 0x0;
wsio(0x20, len); // mov byte ptr [esp+44h+var_44]
wsio(0x21, checklen);
wsio(0x22, clearstorage);
for (i = 0; i < 8; i++) {
wsio(0x23+i, val+i);
total += val+i;
}
checksum = 0x200 - (len + checklen + clearstorage + total);
wsio(0x2b, checksum);
outb_p (0xa1,EC_PORT_INIT);
}
However after trying al possible values I'm still unable to hard reset WinCE. I think we must be missing something obvious here, but don't know what
cmonex said:
heh, I'd have to kill you for not reading - you said you tried ecshift and my ecshift thread describes how to do task 28!
Click to expand...
Click to collapse
Dont kill me...pleeeease...Actually, I tried ecshift, but it gave me an error and couldnt establish a connection to SnapVue.
Sadly, I didnt try it under linux...only XP and Vista...