- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm currently working with Azure Iot hub and amqp v1.0 protocol on Wiced 6.1.
I have two questions concerning emission and reception frames.
1 - When I send a message I obtain special characters on Azure even if the message is empty (see below) :
(#define AMQP_MESSAGE_STR "HELLO WICED")
One special character if the frameis empty = #define AMQP_MESSAGE_STR ""
two special characters if the frame is not empty (with a json frame) = #define AMQP_MESSAGE_STR "Json frame"
what should I do to remove them ?
2 - When I receive a message but it is an empty frame (I added some modifications to use the demo with a receiver link):
WICED_AMQP_EVENT_TRANSFER_RCVD works but data is empty.
Can you help me ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem is in the performative "AMQP Value" , I hope this probleme will be resolved in a next version.
To workarround, you can use the performative "Application data" by replacing 0x77 by 0x75 inAMQP_transfert.c line 290.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have any idea for this issue ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your answer but :
1) I work on azure with AMQP V1.0 protocol (not MQTT).
2) The link show : how to use azure on receiver side but I have this problem on sender side.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I also modified one function in : librairies/protocols/AMQP/AMQPv1_0/amqp_transfer.c wiced_result_t
amqp_frame_get_transfer_performative( wiced_amqp_frame_t *frame, void *arg )
I did it to receive the data correctly during the reception (the decoding of the performative was not done well).
Do you think there might be a similar problem in the show that would explain the special characters?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did the test by filling the #define of the azure demo without any modification on amqp librairies
Here is the result:
My problems :
- I use empty messages (so free) to keep my connection active BUT with special characters, messages are counted in the billing.
- On Azure Side JSON frames are not decoded.
Would you like to tell me if you are observing the same things?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem is in the performative "AMQP Value" , I hope this probleme will be resolved in a next version.
To workarround, you can use the performative "Application data" by replacing 0x77 by 0x75 inAMQP_transfert.c line 290.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To solve the problem of the transmitter side (sender : device-->Azure), you have to:
- modify the following lines of codein the function
wiced_result_t amqp_frame_put_transfer( wiced_amqp_frame_t *frame, void* arg )
/* Encoding payload data */
AMQP_BUFFER_PUT_SHORT( &frame->buffer, 0x0053 );
AMQP_BUFFER_PUT_OCTET( &frame->buffer, 0x77 );
AMQP_BUFFER_PUT_OCTET( &frame->buffer, 0xa1 );
AMQP_BUFFER_PUT_SHORT_STRING( &frame->buffer, params->message->data, params->message->data_lenth );
return WICED_SUCCESS;
Replace by
/* Encoding payload data */
AMQP_BUFFER_PUT_SHORT( &frame->buffer, 0x0053 );
AMQP_BUFFER_PUT_OCTET( &frame->buffer, 0x75 );
AMQP_BUFFER_PUT_OCTET( &frame->buffer, 0xa0 );
AMQP_BUFFER_PUT_SHORT_STRING( &frame->buffer, params->message->data, params->message->data_lenth );
return WICED_SUCCESS;
Result with empty message :