stuffrabbit / icoap Goto Github PK
View Code? Open in Web Editor NEWObjective-C Client Implementation of CoAP - RFC 7252
License: MIT License
Objective-C Client Implementation of CoAP - RFC 7252
License: MIT License
Hello stuffrabbit,
Ihave tried to perform ping operation on server. Below is how i did it.
TRCoAPMessage *cO = [[TRCoAPMessage alloc] initAsRequestConfirmable:YES
requestMethod:req
sendToken:YES
payload:nil];
cO.code = IC_EMPTY;
TRCoAPExchange* iExchange = [[TRCoAPExchange alloc] initAndSendRequestWithCoAPMessage:cO
toHost:host
port:port
delegate:self];
Its not giving me any any success response. Request you to please help.
Hi
First thank you very much for nice implementation in this library.
I am using this library in my project and now i need to give DTLS support. Any idea how can i implement DTLS or any plan you have for implementing for DTLS in recent future. You can also help me for getting some approach so i can look into this.
Thank you very much.
:)
Hello Stuffrabbit,
I am having a file which is having a name with 2 or more special characters. When I send request JSON I don't get the proper response (response is nil).
Could you please give me some solution in this case?
Hi
I used this library in my project. I used observer which is working for very first time. But It is not working if data is huge and for second call.
Second observer only receive last packet in his call.
Please can you help me on this ?
Thanks in advance.
Hi stuffrabbit
I am facing weird problem in iOS. I was successfully able to start communication to server through library. But whenever application goes in background, all socket close automatically. On high level it cancels all observers.
Can you please help me on this.
Thanks
KD
I would like to connect to the Tradfri IKEA gateway.
DTLS support with PSK is required.
Can you please advice or update library to take this feature into account ?
DTLS support with PSK support (iKea Tradfri support)
- (IBAction)onTapSend:(id)sender {
[self.textField resignFirstResponder];
ICoAPMessage *cO = [[ICoAPMessage alloc] initAsRequestConfirmable:YES requestMethod:IC_GET sendToken:YES payload:@""];
[cO addOption:IC_URI_PATH withValue:@"obs-non"];
[cO addOption:IC_OBSERVE withValue:@"0"];
if (!iExchange) {
iExchange = [[ICoAPExchange alloc] initAndSendRequestWithCoAPMessage:cO toHost:@"wsncoap.org" port:5683 delegate:self];
}
else {
[iExchange sendRequestWithCoAPMessage:cO toHost:@"wsncoap.org" port:5683];
}
self.activityIndicator.hidden = NO;
}
This is my method of adding observe. Why can I only receive one reply? What should I set up? Thanks for help
Do you have any plans to support DTLS?
I am unable to set BLOCK1 option.
On adding option IC_BLOCK1, server gives below error.
INFO: Block1 transfer timed out: CON-PUT MID= 1076, Token=, OptionSet={"Uri-Path":["15001","7"], "Block1":"(szx=0/16, m=false, num=787)"}, "{"9001":"123456789012345".. 64 bytes
Can you please tell, how to add option for BLOCK1?
Hi,
We are using this library in our app and it works great! However, we are facing following issues while using the library in a multi-threaded environment, when multiple request and responses are sent in parallel:
Block 2 request is sent based on last request which is sent from library. It should be sent on the basis of latest block response received. When library receives any new block, it is creating a new request for getting its next block. This next block request should be created on the basis of block 1 which is just received. Instead, it is creating next block request on the basis of an old request (pendingCoAPMessageInTransmission) which is sent from library. This old request could be of any other request rather from the block received.
isMessageInTransmission variable is a shared variable in library. This is limitation in which if there are multiple request response done in parallel, we will not get correct state of isMessageInTransmission. If there are 2 message sent in parallel, we are not getting correct in transmission state.
Individual Blocks are received in application from the library. And app needs to append all blocks and create complete response. Instead, Library should handle all blocks and share complete response with app once all blocks are received.
Retransmitted response is not handled by the library. Application needs to check whether response is retransmitted or new one and then use the response based on the message ID. Library should discard response if app has already processed it or if it has already sent the same response to the app.
These are not fixed in the new Swift Library also.
Thanks!
Hey Wojtek ,
Nice work building up iCoAP !!
ICoAPMessage *cO = [[ICoAPMessage alloc] initAsRequestConfirmable:YES
requestMethod:IC_GET
sendToken:YES
payload:@""];
[cO addOption:IC_URI_PATH withValue:self.textField.text];
[cO addOption:IC_OBSERVE withValue:@""];
When observer starts it returns me payload in 4 Packets which i club together to form my complete JSON. But when i changed the resource at server endpoint, i get only 1 or 2 Packets i.e. incomplete response. As if some of the packets lost in between transmission.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.