i collect the data and display it to sever with udp by changing SendDataUDP code now i need to write it to text file and send it just once because i need the data every 1 ms and i can not send with this frueqency do you have any example or the solution to send the data with UDP with hight frequency because i will got the message "Failed to Enqueue SendAccelDataoverWifi to Application Command Processor".

Regards 

Sarawut

 

0 (0 투표)
RE: writing data to text file and send it over socket
응답
18. 2. 19 오후 3:35 as a reply to Sarawut Winyagul.

Hi Sarawut, welcome to the community.

At first glance, you can increase the command processor queue length when you setup it.

http://xdk.bosch-connectivity.com/xdk_docs/html/group___c_m_d_p_r_o_c_e_s_s_o_r.html

Here is the command processor API, which has the initialize fn, see the parameters:

CmdProcessor_initialize (CmdProcessor_T *cmdProcessor, char *name, uint32_t taskPriority, uint32_t taskStackDepth, uint32_t queueSize)

 

The queueSize is the number of slots you queue actually has, and is typically set by 5 slots by default, so increase it to something above 128 slots this will help to store the messages for more time and will reduce the data drop.

Please let me know if this was helpful to you.

Felipe

 

0 (0 투표)
RE: writing data to text file and send it over socket
응답
18. 2. 19 오후 5:15 as a reply to Felipe Neves.
Hello Sarawut,

the message you are getting, i.e. Failed to Enqueue SendAccelDataoverWifi to Application Command Processor appears because the queue of the application's underlying Command Processor is full.

This means, the frequency you are using for sending is too high, and the commands cannot be processed quickly enough. The command in question is the function that sends data via UDP.

So, sending one packet per second is quite difficult, since the application is already quite bloated with things you do not neccessarily require.

Felipe mentioned that you could increase the queue size, which can be done for the application's command processor in the main() function of Main.c . But I do not think that this will ultimately solve the issue. The queue would only get full after an increased amount of time.

Regarding storing data in files, you can do that with an SD Card. For one, there is an SdCardExample in the Workbench's Welcome screen. There is also an SD Card guide available in the Learning Section .

Additionally, the thread here may interest you, since it is also about a reading/sending frequency of 1kHz for sensors, with some insight that may be helpful.

Please tell me if this was helpful, and do not hesitate to ask further questions.

Kind regards,
Franjo
+1 (1 투표)
RE: writing data to text file and send it over socket
응답
18. 2. 20 오전 6:01 as a reply to Franjo Stjepandic.
thank you for your answer but it not working i still got the same message now i change from send every time after read from sensor to read and keep in to string 10 times and send it just once it's work for me.
0 (0 투표)
RE: writing data to text file and send it over socket
응답
18. 2. 20 오후 4:19 as a reply to Sarawut Winyagul.
Hello Sarawut,

I am glad to hear that you were able to make it work. As mentioned before, changing the queue size would not change much, if the data is not processed quickly enough anyway. Buffering, as you have implemented it, is the more appropriate solution in that regard.

Feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 투표)