Does anyone here have experience sending fragmented SNEP message to android?
I tried sending large SNEP message to android using SNEP fragmentation as defined in NFC forum specs (shown on figure 3 and figure 6 in SNEP spec document).
After sending first fragment (complete SNEP header + data chunk), android replies with Continue response. As defined in SNEP spec, i send remaining data (without header) to android. After all data sent android never gives Complete response. Is it because my wrong sending sequence or android just doesn't support SNEP fragmentation?
I use Google Nexus S with android 4.1.2 and reader from chinese manufacturer with proprietary SDK.
Android SNEP does support fragmentation. I use this all the time when I send out 20kb test messages via SNEP. The problem must be in your implementation.
I suggest that you take a look at the SNEP Android code to find out why you don't receive the confirmation. The code is here:
https://android.googlesource.com/platform/packages/apps/Nfc/+/ics-plus-aosp/src/com/android/nfc/snep/
Related
I am doing some serious performance analysis against Parse.com on Android platform. I would like to know exactly the size of the request made to appname.parseapp.com for a certain ParseObject.save() operation.
Kind regards and happy Parsing!
Since the SDKs are all just wrappers over the REST API, that means all payloads are just HTTPS traffic.
You could use any number of tools to capture that traffic and see the size of the payload. I've used Fiddler before (it is free), just a matter of setting your PC as the proxy for your device.
First of all, is it a nice and successfull idea to use peer 2 peer to broadcast realtime video ? I know that it will make the application scallable and will allow more users to get the real time video without affecting the server much, but are there drawbacks performance-wise and video quality-wise ?
Now the specefic question, my intention is to share realtime video, and then use peer2peer in the webclient level using websockets, are there any libraries that are used for this purpose?
I know that streaming should be better using UDP but the follwing post says that even using websockets (TCP) at 30fps is fast ennough (Video streaming over websockets using JavaScript)
XSockets.NET provides a WebRTC API.
This will provide you a JavaScript API for P2P communication. You can actually have a video chat with 2 or more participants really easy.
If you are a .NET dev you can install the sample from nuget. That sample contains a example of a multivideo chat.
The video will be of high quality, but you can set parameters to get lower resolution if you have low bandwith.
WebRTC works in Chrome and Firefox today (as well as chrome 29 on android). You can try this site with Chrome (not updated for Firefox or mobile) http://browsermeeting.com/
Nuget Package
You can check out IceLink (disclaimer: I work # FM), it'll help you do this.
I've actually built something along these lines for a client of ours, where each successive client becomes a potential "distribution" node. So X clients connect to the main server, and from there, other clients can connect to those clients (provided they have appropriate bandwidth/CPU/etc) for a re-broadcast version. It's sort of a supernode/mesh concept, and it works reasonably well.
How is it done? The documentation is unclear and there are no examples.
What I do is the following..
I chop off the data into small fragments and then I send the fragments sequentially. The SNEP header is only included once in the first fragment. Do I need to change something in my SNEP header or LLCP? I don't understand how LLCP should be changed to make android understand the sequence of the messages? After the whole message is sent, android does not acknowledge receiving the message.
Examples would be much appreciated.
C# Desktop application trying to send data through NFC Peer-to-Peer to an android ICS running on an SIII. The contact-less smart card reader is an ACS ACR-122U/T
SNEP Fragmentation needs to be implemented. LLCP Sequences numbers need to be taken care of and finally, I think there should be some acknowledgement messages in between fragments which is where I'm going wrong.
You need to implement SNEP fragmentation and encapsulate the fragments in LLCP frames. Read about the LLCP protocol in the NFC forum.
Yes, is exactly like you describe.
They change between them consecutive chunks like is specified in the SNEP protocol
Check this classes, i've tested them and works fine in 4.0.4 (not working on => 4.1)
I would need to track how much many bytes are sent and received by my application per session. Is there some API for this provided by the OS? Or is the only way to somehow manually track this every time I send/receive something with WebClient instance?
As keyboardP mentions. This is currently not supported by the API.
There's nothing built in but you could build a decorator IWebRequestCreate decorator implementation that tracks the bandwidth being used.
I have a client who wants a solution to allow delivery people to text (SMS messaging) in that they have completed a pick up at a particular location. What I'm looking for is Code to read an imbound SMS message or a SMS component if appropiate. This would allow me to create a windows service to read the message and update a SQL record accordingly.
Probably not quite what you're looking for but one approach is to use a gateway like iTagg which provides a number of interfaces for developers to send and receive SMS/MMS etc. Depending on your location, iTagg may be no use but I'm sure there'll be an equivalent for your region.
Sometime ago I implemented something similar using a GSM modem. I think most of the GSM modems offer AT commands that can be used for receiving and sending SMS messages. At the time, I used a library in Java that provided a easy to use API. The commands to read and send SMS are really easy but I bet there is something in .Net for that purpose that can make the task even easier.
I made a little search and I found this article with an example of using AT commands to interact with a GSM phone. I looked into the supplied source and it includes a library with operations related to SMS.
In my previous project I used a Siemens GSM modem with a RS232 interface. It wasn't very expensive and was able to manage all the messages sent by onboard units placed in vehicles. But if you have a unused phone it can work as well.
Thanks Luke, I am thinking more of a GSM modem which would be connected to the server. I think this would give more control rather than go through a third party, but I take your point and will investigate further.