How to to do socket programming in titanium? - titanium

I did socket programming in phone gap using plugin .Now I am using titanium so I need some example so that I can understand well .I have my Socket Server Ip(where my exc file is running from there I want to fetch data from server).I have also port number.

With the Ti.Network.Socket.TCP
http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.Network.Socket.TCP
There are also code examples on that page as well.

Related

Silicon Labs CP2102 interface. How to talk using minocom

I have an infrared thermometer which operates on a virtual serial port over USB, which I am trying to use on a Linux intel and next on a raspberry Pi. The system did not enumerate a /dev/ttyUSB device.
I found a piece of a solution here :
Cygnal Integrated Products serial port on Linux
I reprogrammed the product_ID and can now see it as /dev/ttyUSB0.
But trying to talk to the thermometer with minicom doesn't work.
minicom keeps saying "disconnected" despite the "9600 8N1" indication.
I must say, I had many attempt to work with this kind of communication over USB/serial adapter trying using many different terminal emulator like screen or minicom but without any success at all !
I'm not even sure about the right way to send request and receive data.
Here is the documentation I'm using trying to talk to the thermometer :
http://www.optris.com/interfaces?file=tl_files/downloads/Manuals/addendums-de-en/ct-ctlaser-commands.pdf
Edit :
I'm now trying to use PySerial Python library in a Python script with an Arduino as a target (to act as my thermometer, the arduino runs a simple code that takes the data received and send them back to my Python console.) But still, there is so many confusion possible between ASCII, Hexa, binary, that I'm not capable of debugging anything as I don't know where the transformation between different format takes place !
The communication is working as I can get some data forth and back from my Python console through the Arduino. But I can't get sending hexadecimal data and getting any response back in hexadecimal format. + You say "Your latest question puts you in the off-topic category. ", what do you mean ? Sorry of being so confused.

VB.net Video Streaming Via UDP Port Error

Good Day to all
I am Currently developing a video chat application with Vb.NET
I used the example as explained in this VIDEO. The application runs, but only up to the point I can see my own Webcam but I can't connect to the client unit.
I used try, and an exception came out saying ("The Operation is Not Allowed on Non Connected Sockets") I traced the problem to this code:
Publisher.Send(sendBytes, Bitmapz)
I tried the following
Disabling my firewall
selecting a different port
I set the port to the one in the video btw, (2013)
What should I do to get past the error?
OK i have actually seen this before, remove the blocking lines of code and try again. eg
the listener.blocking = false, just remove it

What is the protocol of GPS tracking device TK103?

I am currently working on getting a location of a vehicle to a server. I am using TK103 as my GPS device. It is sending ##,imei:<my_imei>,A; to the server when the server is started.
This is the only document of the protocol I could find on internet: https://web.archive.org/web/20140401000000*/http://www.zhyichina.com/en/gpstracking/gprs-data-protocol.xls
I followed it. But it does not work properly. It needs to send "ON" command many times to work and any of other commands did not work. Could you please help me to identify the problem.
When you get message like ##,imei:123456789012345,A; you need to respond with LOAD.
When you receive just IMEI number like 123456789012345; you need to respond with ON.
Here you can find the source code of the decoder for this protocol:
https://github.com/tananaev/traccar/blob/master/src/org/traccar/protocol/Gps103ProtocolDecoder.java

how to stream live webcam in unity 3d?

At the moment i am being able to see my own webcam in unity3d as a texture using this simple tutorial
http://www.ikriz.nl/2011/12/23/unity-video-remake
Now i want to know that how can i see someone's else webcam in unity 3d?
can any body give me some pointers?
What do you mean under 'someone's else webcam'? Actually you can open socket connection between two computers, stream 'someone's else' webcam via socket and show a picture in your application.
An application for 'someone's else' can be written in any language/framework.
To help any one who would find this helpful in future, i have done this by using a flash client that takes the live stream and send it to a local server which was written in .Net.
and that .net server then sends the stream to our script which was running in unity3D. and that script was placed on any plane in your model , so showing you the received stream.
It was a bit laggy but it was working :)

Detect when PDA (Windows Mobile) is in flight mode

I need to produce an error display message when the Windows Mobile PDA is in flight mode. The user will need to pull and push data from a SQL Server server; however when in flight mode this is not doable and a message needs to be displayed. Currently the message that is displayed is:
a requeste to send information the the computer using IIS has failed.
For more results please see HRESULT
I am programming using VB.Net and I am fairly new to it. I have searched for the past week on the Internet and come across information suggesting that I use TAPI, however i do not know what to import, or where the "flight mode detection" code would go in my application.
Use the State and Notification Broker. Use the SystemState class to read and/or monitor the value of something like SystemProperty.PhoneRadioOff. Here's an example of using the SNB (in C#, but simple enough to convert).