Weird Serial Port Problem - Windows Mobile Development and Hacking General

I've been having a weird, hard to reproduce problem reading data from the serial port (com 1 on an O2 XDA II.
I'm using a 'Port' class from the http://www.opennetcf.org project. (I'm using the .NET Compact Framework) for my app.
Sometimes, the Port class I'm using simply stops receiving data, as if the device were unplugged. However, I'm certain that the device I'm connecting is still sending data, and I'm pretty sure it isn't a physical connection problem (I can usually disconnect and reconnect the device at will , and the data stops and starts its flow as expected). It's just every now and then, for no apparent reason, the code I'm using behaves as if I've unplugged the device, and connection can't be re-established until I restart the app.
This can happen at any time, although some of my colleagues have a hunch that the problem happens more often if you start the app, and then leave it a long time before plugging the device in.
Suggestions, or shared tales of woe whilst attempting something similar much appreciated.

I know nothing of programming but I know that the infrared port impacts on the com1 so the incoming beams needs to be unchecked in the settings/connections/beams. This is probably useless info :roll:

cruisin-thru said:
I know nothing of programming but I know that the infrared port impacts on the com1 so the incoming beams needs to be unchecked in the settings/connections/beams. This is probably useless info :roll:
Click to expand...
Click to collapse
No it isn't useless info. Sadly, it's a problem I already know about, and it isn't the cause here. Thanks for taking the time to try and help

http://msdn.microsoft.com/library/en-us/wceactsy/html/cerefdesktopcomputerregistrysettings.asp
here are the registry settings for the activesync on the pc
but it does seem to be reset to com1 after a reboot
not sure why
guess one could make a program and make it auto run at start up changing it to what ever the port one wants default
that is unless there is an easier way.....

Related

can't sync. with my laptop

Hello All,
I don't know what is the problem. It seems ok for the first time after i installed the version 4.0 that comes with the CD. It works fine. But for the second time, it just 'connecting'. Have gone thru' the troubleshooting processes but without success. Also tried to install the new version 4.1 but won't work.
Pls can someone help me on this.
rgds.
zainal.
does it sync over BT?
i had the same problem before & i still do, but soem other guy here in the forum said it worked for him when he uninstalled AS then reinstalled it again.
try it, it might work with you.
until now i'm still stuck with BT syncing, i cannot sync over USB.
i still get "connecting" message all the time with no progress.
Hi Guys
I had EXACTLY the same problem, alhough I could not get BT to work but could get IRDA to work.
Here is what I THINK the problem is, by the way i-mate were useless it was a colleague at work that had finally found this problem on his device.
WM5 devices when connecting via USB create a NETWORK. Strange but true.
SO, open Control panels, open Network Connections.
Attach your K-JAM (or other WM5 device) you SHOULD see a new network get created with a random number at the end of it (the number changes depending on the USB port you use so you MAY need to do this procedure again if you connect via a different USB port).
Get the properties of this new network when it opens you should see that NONE of the services are checked.
Check them all.
Close.
Everything SHOULD suddently spring into action, it certainly did for me.
It appears that some PC config's (all our work ones) need to be configured this way were as otheres set themselves up fine.
Let me know if this works.
Cheers.
Robin
the wierest thing just happened.
i wanted to try your solution, i opened the network connections folder, connected my kjam, and for my surprise it just connected without me doing anything, and i had it sycronised over the USB.
BUT, the wierd thing, is even though i have the connection, and it is syncronizing with my laptop, i don't have the connection icon on my kjam, instead i had this message (attached).
what does this mean?
Don't know, I have never seen this!!!!
Robin
the strange things keeps coming...
when i wanted to sync my device again this evening, my whole laptop freezes without any responce.
can someone here tell me what's the problem i'm having here? & how to solve it?
i don't wonna format my PC over this.
thanks all in advance.
I have noticed that the synchronisation only happens properly if I connect to the SAME usb port. If I connect to another port, the laptop picks up the connection but won't synchronise.
Connect to the same USB port and voila!!
Hope that helps.
See my reply earlier.
Each different USB port you connect too AS creates a NEW network with a different number on the end of it.
You have to open the network properties for all the networks (with numbers) you intend suing and make sure all the properties are checked.
I use 3 different USB ports on my laptop depending on wether it is docked at home the office or undocked.
I have had to do this procedure for each port but now they ALL work smoothly every time.
Regards.
Robin
i did connect it to the same USB port, but no luck there, the same problem. i uninstalled the AS twice and re-installed it but it's the same.
hi.
i have tried yr solution by ticking all the boxes in the 'new' network properties. won't work though. the sync. icon shows 'connecting'.
mzk78 said:
hi.
i have tried yr solution by ticking all the boxes in the 'new' network properties. won't work though. the sync. icon shows 'connecting'.
Click to expand...
Click to collapse
Strange.
I know a number of people this worked for.
You could/should also try disabling your firewall and giving it another go.
Robin

Help! at the point of sending back!

Had my XDA Exec for a week now and its great until I try and do any thing computer related.....
only managed to get it to sync once and that was just luck, sometimes even when active sync says not connected I can still explore but wont sync but this happened only a couple of times?
the message says:
CRITICAL COMMUNICATIONS SERVIES HAVE FAIL TO START, TRY RESETTING THE MOBILE DEVICE, AND CONNET AGAIN.
which i have done loads of time including hard resets!
I had none of these troubles with my ipaq!
Tried:
uninstalling active sync (NOW 4.1)
turning off firewall
soft resets
hard resets
rom update (luckly done it the one time it did sync)
Calling O2 - dead loss tried to get me to call a premium rate number!!
Tried Microsoft’s sync 4 help page - this is when i got it to work the once, i opened properties in networks and checked and uncheck the box's and just seamed to come to life didn’t change any thing??
Tried it since and nothing happens?? Must have some thing to do with this but no luck so far..............
The second problem is TomTom 5 put on sd card put in xda and and it fires up for one second then nothing? Does the same when I open from PDA?
Ahhhhhhhh! its driving me crazy!!!!
sorry to go on but I desperately need help as don’t want to send it back?
Sorry also am I correct in saying you get a 2 week cooling of period with o2 so could send back with in this time and cancel contract?
@glen
did you try to install the latest 4.1 with the firewall switched-off?
What firewall s/w are you using?
(remember to uninstall all previous versions)
yes already had it running and used with ipaq 2210 and worked spot on!
and as mentioned fire wall is turned off
What firewall(s) are you running? I take it that when you say you switched your firewall off you also mean the WIndows firewall as well? What messages do you get when you plug it in? USB device not recognised or something, or does it not react at all?Have you tried trying to connect through Bluetooth, or by using a different USB port on your PC? If so and it still isn't working, there might be a fault in which case return it!
Fin
Also, sorry if its a silly question, but you have got at least Outlook 2002 on your PC?
pretty sure i have willcheck later? whys that?
It's just that if your device is connected (you can explore it etc) there doesn't appear to be a connection problem, the problem seems to be with synchronization, for which Outlook 2002 (or later) is needed. Maybe I'm barking up the wrong tree, but I had a similar problem when i tried to sync my Exec to my laptop (which only runs Office 2K) I had to install 2K2 from the disc which came with the Exec and all was fine.
At work I get a similar problem.
When I sync with the PC I need to start outlook first before connecting via usb, or else it comes up with an error and only allows me to explore the device.
At home it seems to work ok.
For me at work I think its down to activesync trying to do its thing before outlook has properly loaded.
i dont think this is the problem as i sure i have the xp pro version but will check when i get home...
but saying that the exec connets fine at work?
but thats windows 2k
On mine here are my observations and what I did:
1) I deleted poutlook.ink from the start up folder. This seem to help and at the same time reduces any notification errors after a soft reset which I noticed occurs if I have either sadaemon.ink and poutlook.ink on the start up folder. As of now I only have handymenu.ink in there, a program that I use to launch some system applications.
2) I also noticed that for my computer to recognize my EXEC, I need to plug it in when it is OFF. If I plug it in when it is ON, I get the message device not recognize. If I forgot and plug my EXEC while it is ON, definitely, the message device not recognize appears, so I just disconnect my EXEC from the USB cable. Then turn my device OFF by pressing the power button and plug it back to the USB cable after 10 seconds.
3) Remember not to connect your EXEC immediately via USB cable if you just closed the screen and assume it is already OFF. You have to make sure your EXEC is OFF by turning it OFF using the power button or at least you have exceeded your set time for device activity while on battery power.
4) If however after all these precautions and I still get that message device not recognize, which I seem to experience 1 in 50 tries. I just disconnect my EXEC from the USB cable, make sure I turn it OFF using the power button and plug it back in.
5) I also ONLY experienced this problem to have occured after I upgraded my radio version to 1.06.00. BUT this is a small price to pay for the added benefit of that upgarde.
With these in mind, I always connect without any problems. The message device not connected, I only experience 1 in 50 tries, so I am happy with that.
checked outlook and i have 2002 sp3, going to try the over thing mentioned
tried all those tips and i still get the same message:
CRITICAL COMMUNICATIONS SERVIES HAVE FAIL TO START, TRY RESETTING THE MOBILE DEVICE, AND CONNET AGAIN.
which i have done loads of time including hard resets!
I had none of these troubles with my ipaq!
Is your USB cable plugged directly into your PC? I have had problems syncing before when my device was plugged in through my monitor instead of directly.
Thanks chaps i sorted it at last!!! only took 2 weeks!!!
it was the firewall after all just turning it of was not enough uninstalled it the got norton and set up prop as on microsoft web sight.
job done!
just got to sort tomtom prob now, but brought step by step instrucions of ebay for a fiver!!
looks like a rip of but had bits of the guy before so figures crossed!
if any good ill post up here........

Solution for Activesync crash/freezing Wizard after re-Sync!

Hi. This has worked for me, and solved a massive problem. Hope it helps someone else too.
Step 1:
Ensure you are trying to fix the same problem as I was by looking at the symptoms, which were:
- HTC Wizard synchronizes OK when you plug it in the first time
- It stays in sync if you leave it plugged in
- If you unplug it and then plug it back in at any time later, XDA goes s-l-o-o-o-w and then freezes and will NOT re-sync
- If you unplug it and soft reset before reconnecting then it's fine
Essentially, the Wizard was requiring a soft reset between every connection to the USB cable, or it would crash and require a reset anyway!
These issues have been discussed in about 10 threads on this board, and on pretty much every other resource for Wizards and Pocket PC devices on the net. I was, however, totally unable to find something like this which directly addressed the problem.
Step 2:
Download a program called Dr. TCP from here: http://www.dslreports.com/drtcp
Run it to open a dialog box with loads of fields with strange techy names... no, i didn't understand it either. However, I've been searching the net for days and I found an article here: http://www.pcworld.idg.com.au/index.php/id;504222574;fp;2;fpid;1277378924 which told me how to work the numbers out...
In the bottom drop-down box, select "Windows Mobile-based Device" and enter 1492 in the box next to that. That's your maximum "MTU".
Here are the settings which work for me (from the top). If i don't mention a setting, I didn't change it!
Tcp Recieve Window: 261360
Dial Up (RAS) MTU: 1492
Path MTU Discovery: Yes
Save and Exit Dr. Tcp.
Step 3:
You need to open "Network Connections"... in XP, that's Start > Connect To > Show All Connections. I'm sure you can find it yourself. Anyway there should be an icon called "Local Area Connection (x)" with "Wireless Mobile-based Device" written in grey underneath.
Right click on that and select DISABLE. This will close your USB connection to your Wizard so those MTU settings can be applied.
Now unplug your Wizard from its cable. Here, I tried right clicking on the connection and selecting "Enable", but it just errored. So you need to unplug it.
Step 4:
Reconnect and see what happens. I am now happily disconnecting and reconnecting as many times as i like and it just keeps on synchronising itself. MAMMA MIA!
If this solves your nasty "i need to reset every time I disconnect" problems then please post here to say so. If it doesn't work then post here also, I guess. If this is a solution for you then credit for this is not mine - it's just the sum total of a lot of searching across this and other forums, websites and message boards. THANKS!
not working
These steps did not work for me.
I still have to reset the device otherwise I get this message after about 5 minutes.
"Synchronization cannot be completed successfully. Reconnect your device and try again. If the problem persists, see the Microsoft ActiveSync Troubleshooter in Microsoft ActiveSync Help on your desktop computer."
It appears to be only a problem syncing as I can still explore the device.
well...
...that's depressing. I genuinely thought that would work for other people too.
Did you read that PCWorld article I linked to? it explains how I got those numbers... they could be different for you, perhaps?
I'll keep thinking...
I did not look at the article. I'm having other issues trying to get my 2 computers synced with my mobile device http://forum.xda-developers.com/viewtopic.php?p=234189. Once I get those resolved I can try some different things.
On my home computer I am only synchronizing favorites and files and it doesn't appear to be a problem.[/url]
Oh right ok. I read your other post too, but I only have 1 PC for home and work so i can't help with that.
Has anyone else tried this?
I am no longer having the problem since I fixed my other sync issue (multiple computers issue). I had reinstalled activesync and did a hard reset on my device so maybe something else got cleared up. I am also having much better luck with the way my device is running. Before I was getting frequent slowdowns and lockups. I am a much happier customer and will be sticking with my cingular 8125. I just love all the features, but the activesync issues and slowness was starting to get to me. I'm so glad it is all behind me now and I can start to really enjoy the thing. Although I have yet to connect my bluetooth headset, that may have caused me issues too. Sorry I couldn't be more help testing this out.
I and a work college have had this problem on both our systems and found that it was being caused by Avantgo.
It would work fine and sync every time for days until we installed Avantgo.
After these we both had the symptoms you describe in the first post until we did a hard reset and re installed everything except Avantgo, it was then fine again. As a test I then reinstalled it and it started not syncing again, my college who has not reinstalled it has had no further problems.
I have now been running for 3 weeks with no problems and no Avantgo.
If you have it installed it may be worth trying it without for a wile and see if it helps.
Didn't work for me. Still no connection when plugging in for the 2nd time. MTU value changes back to blank when opening the Dr.TCP again, the other values are ok though. But thanks anyway for the hints!
Greetings,
Andreas
Didn't work for me neither...
just to check (i know this sounds daft) but you did DEFINITELY press the SAVE button in Dr TCP before you pressed the EXIT button? can't imagine why it wouldn't store the data.
aaaaaaaaanyway i guess it's not the ubersolution i thought it was
Now I thought I had this working 100% using this hack (It was on a clean install of WM5 however so this may have been why it worked). Anyhow, it stopped working again after I installed PocketWeather ... now locks up whenever I connect....
I wonder if it is 3rd part s/w causing some of the problems with AS? Is it down to the scheduled update in PocketWeather or simply hooks into the ConnectionManager / ActiveSync from apps looking to see if a network connection exists....
I think some more investigation is required ... or perhaps I will flood MS with 1000's of emails telling them how flakey their software is *(Though I think they already know that)*
Any updated? I'm having this same problem, except my device won't connect at all! Even after a reset. It connected once and that was it.
Hi Silentz,
sure, I saved the settings. I'll try the ActiveSync clean install-method and report the results. 'Hope that MS will put out an update or better version soon! Rumours out there?
Greetings,
Andreas
tried and failed...
tried the above TCP solution- Not working for me either...
Found best solution. Go try the latest imate rom. You can then plug out/in the cable as many times as you want & it'll just work fine.
Bebbo said:
Now I thought I had this working 100% using this hack (It was on a clean install of WM5 however so this may have been why it worked). Anyhow, it stopped working again after I installed PocketWeather ... now locks up whenever I connect....
I wonder if it is 3rd part s/w causing some of the problems with AS? Is it down to the scheduled update in PocketWeather or simply hooks into the ConnectionManager / ActiveSync from apps looking to see if a network connection exists....
I think some more investigation is required ... or perhaps I will flood MS with 1000's of emails telling them how flakey their software is *(Though I think they already know that)*
Click to expand...
Click to collapse
It seems to be as soon as you access the internet through the passthru connection on Activesync. So installing AvantGo/PocketWeather might explain this to a certain degree as they may be accessing the internet.
Incidentally, how could Microsoft have stuffed up so badly with Activesync? It's a tiny program but works so badly - Couldn't a third party come up with a different version of Activesync or something? I'd pay for it if it worked better than this crock!
Just for info, the latest iMate ROM (With Push Email) does indeed seem to fix this issue. Obviously it was with the WM5 side rather than anything that could be fixed on the PC side.
My Active-sink probelms disappeared since upgrade to the latest iMate ROM. Has been working like a charm with all apps and utilities installed, Tweaks2k2, Spb Pocket Plus, Pocket Informant, Worldmate Pro, etc...
told you it works
cheers
I am running the 2.08 (Qtek test) rom and have this issue since last friday. before that never had it!!
What I changed on thursday was: enable exchange server sync and use it. because push-email si no solution for me I just disabled it and dropped the association.
Then (on friday) the trouble started.
I tried DrTCP...and ended up with a broken netlogon (secure client) service on the pc. The IS solution for that was a new image . . thank you very much.
I am back on track with the pc now, but AS still slows down my device.
Are any of you having this trouble using or have used:
-Push email
-Blackberry
What is the amount of free program memory on your device? Mine is around 6MB (probably caused by Blackberry install which I cant remove). . . .

USB Sync

I have searched this forum, found some Sync issues but nothing that relates directly to my issue. If I just didn't see it, point me in the right direction please!
I have a TILT2, stock ROM, I have made some reg mods for text msg notification, Data speeds & auto rotate via G-Sensor. My phone was syncing perfectly fine for a few weeks and I have the USB to PC "Enable Faster data sync" unchecked.
I lost sync a few days ago, I rebooted phone & computer figuring that would fix it as it has in the past only to find I only get charge light, no data connection. I don't hear the bum-bum audio indication that it is connected, and the device does not show under Device Manager nor mobile device manager and my connection methods include USB & Bluetooth.
Here is the caveat, I can sync to the computer through my bluetooth on my PC and I do hear the audio tone connection. I figure a reg change affected this, but I reviewed my changes, nothing dealing with USB, and I even reverted back to a Reg backup from prior to the problem occuring - no luck. I have swapped USB cords, nothing has helped.
Does anyone know of registry setting that would disable my USB sync? Do I have a defunct device?
Assistance appreciated - Dan
djwinn said:
I have searched this forum, found some Sync issues but nothing that relates directly to my issue. If I just didn't see it, point me in the right direction please!
I have a TILT2, stock ROM, I have made some reg mods for text msg notification, Data speeds & auto rotate via G-Sensor. My phone was syncing perfectly fine for a few weeks and I have the USB to PC "Enable Faster data sync" unchecked.
I lost sync a few days ago, I rebooted phone & computer figuring that would fix it as it has in the past only to find I only get charge light, no data connection. I don't hear the bum-bum audio indication that it is connected, and the device does not show under Device Manager nor mobile device manager and my connection methods include USB & Bluetooth.
Here is the caveat, I can sync to the computer through my bluetooth on my PC and I do hear the audio tone connection. I figure a reg change affected this, but I reviewed my changes, nothing dealing with USB, and I even reverted back to a Reg backup from prior to the problem occuring - no luck. I have swapped USB cords, nothing has helped.
Does anyone know of registry setting that would disable my USB sync? Do I have a defunct device?
Assistance appreciated - Dan
Click to expand...
Click to collapse
Is this of any help to you?
http://modernnomads.info/wiki/index.php?page=Windows+Mobile+Device+Center+Troubleshooting
Thanks for the link - I had found this before, and it really deals with no connection at all. I ran through most of the post, nothing helped. Considering I have sync via Bluetooth, it is not firewall.
Looking at restoring my computer to sometime last week, see if an update that came through caused this.
I'll post more when I done the restore.
OK - Update. I restored my PC to prior to issue, no luck. I disabled my security suite, no luck. I have tested the phone on another PC, it acts the same. communicates via bluetooth, but only charges via USB.
I am starting to work my way through the phone registry, is there any specific setting I should be looking for?
I'm just going to throw in a suggestion here: have you tried using a different cable? Often times the cable is the bad piece of the connection, but people don't even think to switch it out with another one.
And as well as the cable, have you tried a hard reset on your phone?
same problem!
i have the same problem. went to htc and they told me sorry you have a 3rd party rom so we are not going to help you.
yes i have treid 4 other pc's and 3 difrent cables and no luck.
please help!!!!!
Ferdi_H said:
i have the same problem. went to htc and they told me sorry you have a 3rd party rom so we are not going to help you.
yes i have treid 4 other pc's and 3 difrent cables and no luck.
please help!!!!!
Click to expand...
Click to collapse
I had the USB port go out on my TP2. I used the SD card to flash the sock hard SPL and then used the SD card to flash the stock T-Mobile ROM. Then I sent it in for warranty exchange. I suggest that you do this and then seek help from HTC.
cool can you perhaps help wit how to do it? please?
Ferdi_H said:
cool can you perhaps help wit how to do it? please?
Click to expand...
Click to collapse
Instructions are in this Forum:
http://forum.xda-developers.com/showthread.php?t=550540
Reversing hard SPL is here:
http://forum.xda-developers.com/showthread.php?t=649191
same problem here and the problem that the battery was draining even when the phone was off. call htc and the next morning the ups was at mine house to get the phone. 7 days later the phone was back with new motherboard. a had started a tread in general of this problem
Yep, mine too. I had to send it back to HTC UK for repair after the USB socket stopped working - came back with a new mainboard.
It looks as if it's prone to failure as I'm careful with connecting and disconnecting cables and it looks as if this one is already starting to go again!
Can't fail HTC UK Repair for it's great service though...

ActiveSync not working (all of a sudden)

Hi All
I searched the Forum but couldn't find a solution to this problem.
1. Came back form holiday yesterday - synced up my HD" with Outlook no problem
2. Tried to do it this morning. By the normal 'connect PC' option didn't come up and activsync icon didn'tr light up on PC
3. Rebooted HD2 and PC..no change
4. Tried to repair/reinstall activ sync, but towards the end of the repair it says 'there was a network error reading from file 'setup/msi'. Guessing that the file may be corrupt, I downloaded it again..same problem..so I can't repair or reinstall
5. There is definitely a connection of some sort as the HD2 begins to charge when connected
Bottom line is that the HD2 is not syncing - and I can't figure out why not.
Any advice appreciated...
Thanks
Do you have a Norton (Symantec) firewall installed? I’ve found that the Norton product can interfere with ActiveSync.
Active Sync not working
Good point..but no. I have AVG installed (and everything was working OK yesterday)
Spooky thing is, I have managed to uninstal, reinstal and reboot..and it still won't show that it's connected with AS even though there is a connection of some kind, cos the device is charging.
Steve
ActiveSync is just a bit crap. It'll do this occassionaly, so if you use it a lot then get used to it.
A restart of the phone, whilst the USB cable is not plugged in, usually does the trick. Only plug it in again when it's fully started.
Also, try setting the AS connection to not allow USB connections, unplugging and plugging back in, and then setting it to once again allow USB connections.
Just messing with it like that usually works for me. Like I said, it's just a bit crap.
Activ Sync
Yeah, I seem to recall I had this problem a while back - I'll faff around with the settings and see if it makes a difference
Steve
stevep said:
Good point..but no. I have AVG installed (and everything was working OK yesterday)
Spooky thing is, I have managed to uninstal, reinstal and reboot..and it still won't show that it's connected with AS even though there is a connection of some kind, cos the device is charging.
Steve
Click to expand...
Click to collapse
Well if johncmolyneux's suggestions don't work then try disconnecting your phone from the PC, restarting both, disconnecting the PC from the network, disabling the firewall element of AVG (if it has one) and then connecting the phone to the PC again.
If that doesn't work I can only suggest removing ActiveSync, totally shutting down your PC, starting up, then re-installing ActiveSync.
I had a similar problem but I was able to narrow it down to Norton in the end but it's a real pain when you don't know why it won't work.
Good luck with this.
I also occasionally was not able to connect with Active Sync, but rebooting the HD2 always fixes that issue. You said that this did not helped you, so try messing with the settings on Active Sync, like johncmolyneux said, also try when plug the usb cable into the device by default it asks you what kind of connection you're establishing (Active sync, data transfer and internet sharing) - try using data transfer, if it connects, unplug and connect it again, this time use active sync.
Reinstall activsync and Try to disable faster data Synchonization on HD2
Active Sync not working (solved)
That'll teach me to not check the obvious! - It turned out that the cable had developed a fault. I changed the cable and it's now OK.
Case closed.
Steve

Categories

Resources