Communication with OBD-II using Windows Phone - windows-phone-8

I have a problem with sending and receiving data from elm327 device.
I tried to connect to the device using channel 01 (on Bluetooth) but it doesn't matter what command I send, I just receive the string "AT+BRSF=24\r" as an answer.
I tried also to connect at channel 16 and there I receive a string "NO DATA"
somebody knows what is the problem?
thank you,
Arie

The AT+BRSF=24 response sounds like you're communicating with the wrong Bluetooth device (perhaps a headset?).
"NO DATA" sounds like an ELM327 response. What command are you sending? Try "ATZ\r" to start with.

Related

CreateFile failed with 5

I'm using win xp Professional x64 Edition and I'm trying to send message to Windows Message Service like using net send. I'm using mailslot:
LPCTSTR SlotName = TEXT("\\\\.\\mailslot\\messngr");
hFile = CreateFile(SlotName,
GENERIC_WRITE | GENERIC_READ,
FILE_SHARE_WRITE | FILE_SHARE_READ,
(LPSECURITY_ATTRIBUTES)NULL,
CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
(HANDLE)NULL);
and after launching it, I got error 5 from GetLastError() in CreateFile. I don't know how to fix it. I gave all VM permission, I turned message service ofc, and I can open it to be notpad like others suggested in: CreateFile() Failed With GetLastError() = 5. I tried many flags, but it didn't change anything. Any guess?
Like it says in the mailslot documentation, only the process that created the mailslot can read from it. Mailslots are one-way communication.
Remove the request for read access.

Expected response code 250 but got code "451", with message "451 4.2.0 92AC1r00M3X6cxD012AChG Message can't be accepted "

i would like to send email from action symfony 1.4 but i have this Swift_TransportException:
Expected response code 250 but got code "451", with message "451 4.2.0 92AC1r00M3X6cxD012AChG Message can't be accepted
"
Have you got any further info on your apache error log ?
Your SMTP response code of 451 indicates that you're connecting ok to your server but this one is not being able to process your message. Are there any limitations with your account ?
The "4.2.0" bit could indicate a Timeout communication problem.
Are you having this problem consistently ? Or has it just stopped working ?
Try the following :
-> "Message can't be accepted" clue :
In case there's a problem with your message try with a simpler message (one liner, no attachements, just the simplest of messages)
-> account clue :
In case there's a problem with your account (spamfilter, or some other limitation) try with a different account.
-> network / infrastructure problems :
Try a different mail server. (You can use something like mailchimp, mailjet, sendgrid, or some other third party email provider. See a comparative list here.)

What is the best way to store Clients in Serversocket

for an installation with multiple mobile phones and computers, i need to implement a socketserver which handles communication between the devices.
For example: Phone 1 wants to make computer 3 play a sound.
When the computer is done playing that sound it sends a message to the phone.
Now in the server i need to make sure that the connection payloads get delivered to the correct recipient.
For now i have an array with all the socket references in it.
When a phone sends the message to the computer the server looks up the socket corresponding to the recipient of the message by comparing the IPs of the message target and the sockets stored in the array to find the correct recipient.
var target_ip:String="192.168.2.25"
var payload:String="hello!"
for each (var sock:Socket in _clientSockets){
if(sock.localAddress==target_ip){
sock.writeUTFBytes(payload);
sock.flush();
break
}
}
Is there a more elegant version to do this?
Should I maybe store the sockets in a dictionary or similar?
Thanks for all tips!

APPFabric client communication error?

I have configured 2 AppFabric instances and try to connect from a test client to the cache.
At first, I had trouble establishing the cache using the DataCacheFactory, but after opening the 22233-22235 ports in the firewall I have managed to get the cache using the DataCacheFactory.
As soon as I try to use the cache for a very small object (using a simple get), I get the following with a null InnerException:
ErrorCode:SubStatus:The connection was terminated, possibly due to server or network problems or serialized Object size is greater than MaxBufferSize on server. Result of the request is unknown.
I don't believe it's the MaxBufferSize issue (I also modified the transportProperties in the config just to make sure), but on the other hand - I'm able to get the cache, which I believe should indicate that the client can communicate with the server. So what is it? -How can I get more details on this issue?
Thanks in advance,
Nir.
Got this to work!
All I needed to do was just to add the host names, as appear in ClusterConfig file to the hosts file of the client, and that's it!
Hope that helps anyone,
Nir.

Trying to send an HTTP request over sockets

I'm having trouble sending out a simple HTTP request using Actionscript 3's Socket() object. My onConnect listener is below:
function sConnect(e:Event):void {
trace('connected');
s.writeUTFBytes('GET /outernet/client/rss/reddit-feeds HTTP/1.1\r\n');
s.writeUTFBytes('Host: 208.43.71.50:8080\r\n');
s.writeUTFBytes('Connection: Keep-alive\r\n');
s.flush();
}
Using a packet sniffer, I can see the request does indeed get sent to the server, but the packet sniffer doesn't identify the protocol as HTTP like it does with other HTTP services. When I run this, the server just eventually disconnects me. I have tried to connect to other simple Apache Servers and just get a malformed request error.
What am I missing here?
You have to write another "\r\n" to the stream before the flush to tell the HTTP server that you're finished sending the headers.
Turns out I wasn't sending a blank line to the HTTP server after my request. The following minor tweak from the original works:
function sConnect(e:Event):void {
trace('connected');
s.writeUTFBytes('GET /outernet/client/rss/reddit-feeds HTTP/1.1\r\n');
s.writeUTFBytes('Host: 208.43.71.50:8080\r\n');
s.writeUTFBytes('Connection: Keep-alive\r\n\r\n');
s.flush();
}
Note the extra \r\n after the last writeUTFBytes. Thanks anyway Brian.
Edit: Thanks Graeme.
Instead of using UTF, try with ANSI/ASCII. The encoding may be the cause of the issue.
I just wasted a lot of time tracking down what is apparently a serious bug in some combinations of Flash 10 and Linux with writeMultiByte(). I would be very dubious about using writeMultiByte().
I hope this helps you.
Maybe wrong, 'ascii' encoding not supported (see http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/charset-codes.html) - use 'us-ascii'