Hey there,
I've got a little issue here and I am not entirly sure on how to solve it.
I am trying to connect to multiple devices in a loop. After every connection I close the socket and create a new one with
Code:
BluetoothSocket,createRFCommService...(UUID);
At the moment I am getting an "IOException read -1" error and I found out, it could be caused, by the TCP stack, which is slower than the loop I am running.
To fix this, I am now catching the error and simply trying again, but this is neither effectiv nor really clean. What would you recommend?
For now I am having the following process;
-BluetoothDevice depeding on the BluetoothAddress
-Socket of BluetoothDevice.createRfcommSocketToServiceRecord(UUID)
-Requesting the data
-Closing the streams/sockets
Related
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). . . .
After a while the Internet Explorer comes back with the msg: The page cannot be found. Check the name and try again.
Goodlink stays operational, so it can't be the GPRS connection. Tried several ROMs and am now on faria v5.0/2.18.0.0WWE. Still with the same problems.
Usually it happens when connecting with the PC through ActiveSync (4.5).
However it has happened without connecting to the PC too.
Solution till now is: cold reset and reinstall applications. But am wondering:
* is this a common problem? (met another person with a Trinity running into the same problem)
* is there another workaround, i.e. registry setting which locks up?
Thanks,
Johan
problem ?solved?
identified the problem to be with the laptop, not quite sure why, but it has to do with the USB port in the laptop. Even after exchanging the harddisk and re-imaging the laptop the problem still occurs. When I hook my pda's up with other PCs/laptops (after cold booting - reinstall apps) to run sync, there is no problem and Mobile-IE keeps working normally.
Don't know why, but at least its reproducable.
jverseveld said:
After a while the Internet Explorer comes back with the msg: The page cannot be found. Check the name and try again.
Goodlink stays operational, so it can't be the GPRS connection. Tried several ROMs and am now on faria v5.0/2.18.0.0WWE. Still with the same problems.
Usually it happens when connecting with the PC through ActiveSync (4.5).
However it has happened without connecting to the PC too.
Solution till now is: cold reset and reinstall applications. But am wondering:
* is this a common problem? (met another person with a Trinity running into the same problem)
* is there another workaround, i.e. registry setting which locks up?
Thanks,
Johan
Click to expand...
Click to collapse
This is very common. I'm sure everyone has gotten this message sometime or other. If the website has a broken or bad link, this will pop up, or if a link wasn't tapped properly on the touch screen. No fix...
8125
2.25.11.102
laptop problem
hotdog53 said:
This is very common. I'm sure everyone has gotten this message sometime or other. If the website has a broken or bad link, this will pop up, or if a link wasn't tapped properly on the touch screen. No fix...
8125
2.25.11.102
Click to expand...
Click to collapse
THANKS for your reply.
It's a bit more complicated than that. After connecting to the laptop there is no url accessible what so ever. Of course the msg is seen on other occasions as you said when not tapping properly or broken links, but after connecting it to the laptop directly it will give this msg continously.
I hooked it up to the laptop through a docking station/port replicator and then the internet connection keeps running. With the current laptop I have I simply musn't hook it up to through direct USB connection.
I also get the same error, but only over GPRS when I'm receiving an email and thus ActiveSync is going.
jverseveld said:
THANKS for your reply.
It's a bit more complicated than that. After connecting to the laptop there is no url accessible what so ever. Of course the msg is seen on other occasions as you said when not tapping properly or broken links, but after connecting it to the laptop directly it will give this msg continously.
I hooked it up to the laptop through a docking station/port replicator and then the internet connection keeps running. With the current laptop I have I simply musn't hook it up to through direct USB connection.
Click to expand...
Click to collapse
If you're getting a good and steady internet connection, and still get this message, I'm assuming the problem lies in the laptop itself.
8125
2.25.11.1
I'm completely lost as to what is wrong with Android, I can turn on WiFii and sometimes it works great, other times I get nothing other than an IP, so what does that mean. It means the initial handshake to the DHCP server is succeeding, but once I have a connection, I can not do anything at all. I've downloaded "Overlook Fing" and when this happens basically I can not do anything pings, traceroute ... all fail with 100% packet loss. If I go back to a cellular connection then I get data again, but sometime if I keep turning WiFii off and on repeatedly it will work eventually, also sometime rebooting the phone helps, but none of these are sure fire solutions, and often only work about 20% of the time. When at home or at work, I'd really like to to waste my data plan as I have WiFii, but since it fails so often and when it fails I get no email and see no messages as to what has failed I'm stuck not trusting WiFii ever.
So far the only solution or recommendation I've gotten is reinstall, which helped but it started up again later. Now between the time when it worked and when it did not work, I did not install any new software or change any data settings on the phone. Also as I said I know the WiFii can get an IP so the radio works, its just it will not send any packets. I even tried disabling Droidwall, but that made no difference either.
Recommendations?
ERIC
egandt said:
I'm completely lost as to what is wrong with Android, I can turn on WiFii and sometimes it works great, other times I get nothing other than an IP, so what does that mean. It means the initial handshake to the DHCP server is succeeding, but once I have a connection, I can not do anything at all. I've downloaded "Overlook Fing" and when this happens basically I can not do anything pings, traceroute ... all fail with 100% packet loss. If I go back to a cellular connection then I get data again, but sometime if I keep turning WiFii off and on repeatedly it will work eventually, also sometime rebooting the phone helps, but none of these are sure fire solutions, and often only work about 20% of the time. When at home or at work, I'd really like to to waste my data plan as I have WiFii, but since it fails so often and when it fails I get no email and see no messages as to what has failed I'm stuck not trusting WiFii ever.
So far the only solution or recommendation I've gotten is reinstall, which helped but it started up again later. Now between the time when it worked and when it did not work, I did not install any new software or change any data settings on the phone. Also as I said I know the WiFii can get an IP so the radio works, its just it will not send any packets. I even tried disabling Droidwall, but that made no difference either.
Recommendations?
ERIC
Click to expand...
Click to collapse
1.Wrong Section (not trying to be rude).
2. I had a similar problem but the simple fix was to reset the router(silly me), which i doubt is the cause for your problem. Sounds more like a hardware problem.
3. If it's a software problem, flashing the specific wifi module on your phone should help....otherwise flashing a new ROM should help. If it's a hardware problem indeed.....no fix.
Felt this was the right place as it is an Atrix that is causing the problem. Also I've try both stock and Alien ROMs same issues with both. I'm hoping there are some logs on the Atrix at the OS level with information to review to find out whats wrong.
Eric
have you tried connecting to other wifi networks?
Exactly what are all of the wifi related apps you have installed? Any wifi profile apps like Zakus Wifi Profiles?
You listed Droidwall, which looks like it could cause your issues. What do you mean by disable? Just kill the task or freeze it using TiBU? The Droidwall app might respawn soon after you kill it as a task. Try uninstalling or freezing Droidwall to make sure it's not running.
First off, I believe what he meant by wrong section is it should be in Q&A. Second, what kernel / radio are you using? That is kinda important. Stock? 1.77 radio? 1.97? I had a lot of problems with 1.97 radio, but 1.77 works perfect for me. Where as others say 1.77 is terrible for them and 1.97 works perfect for THEM, so...
Hi,
I am having some trouble getting wifi to work properly. It works fine for a (more or less) short time after reset / device reboot, but stops receiving any data from the network (it claims to be sending, though). The problem exists with both stock kernel and villain kernel using several different roms, but other devices (including two android phones and a non-acer tablet) don't have the problem.
Here's what I tried so far:
- Resetting DHCP
- Connecting via static IP
- Resetting wifi config
- factory-resetting device / reinstall rom
Currently, I'm stuck there. I hope I didn't miss anything obvious, any pointers towards a solution would be welcome.
EDIT: Sorry, I should have read which forum I was posting in... when I noticed my mistake, it was too late.
UPDATE: Never mind. The problem turned out to be a faulty wifi AP and a rather less-than fault-tolerant wifi on my tab.
Jan
So im trying to figure out exactly what is causing the overwrite of dun required set to 1 whenever i activate data, turn on hotspot, or restarting the phone. soft boots dont do it. but something happens and it says " Error: dun is exist" and im trying to stop that. activating the hotspot with dun set to 0 causes a query it finds it at 0 dun is exist and sets it to 1. then goes about its day activating the hotspot, which is totally useless. i can see it says what its doing when it overwrites dun back to 1 but i cant figure out how to stop it. and i figure there are people out there with a lot more knowledge that could help me i think ive gotten as far as i can with such little experience. i need help. my brain is bleeding.