Community
cancel
Showing results for 
Search instead for 
Did you mean: 
NK
New Contributor I
939 Views

MRAA Uart causing problems

Jump to solution

I am working on sending AT commands to GSM module using eclipse IDE.I am using mraa library for the uart functions.

But it seems that the UART can only send/receive 8 bytes at a time according to the mraa_uart_set_mode documentation.But this constraint is a hurdle for me.

Does anybody know any way around this problem?Any suggestions?

Thanks

Nathan

1 Solution
idata
Community Manager
68 Views

Hi KS_Nathan,

 

 

Each serial transfer has 8bits of data. If you need to send more than 8bits, you would have to split the data and send it in "pieces" of 8bits each. For example, if you have to send 16bits, you have to send the first 8bits in one transfer, and then the remaining 8bits in a second transfer.

 

 

Regards,

 

Diego

View solution in original post

3 Replies
idata
Community Manager
69 Views

Hi KS_Nathan,

 

 

Each serial transfer has 8bits of data. If you need to send more than 8bits, you would have to split the data and send it in "pieces" of 8bits each. For example, if you have to send 16bits, you have to send the first 8bits in one transfer, and then the remaining 8bits in a second transfer.

 

 

Regards,

 

Diego

View solution in original post

NK
New Contributor I
68 Views

Hey diego I would like to ask you how many bytes of data can "mraa_uart_write()" send at a time.Because In my case I could only send 8 bytes in one instance of the function

regards

nathan

idata
Community Manager
68 Views

Hi KS_Nathan,

 

 

I haven't tested the mraa_uart_write() method, however, if you check the following UART example: https://github.com/intel-iot-devkit/mraa/blob/master/examples/uart.c https://github.com/intel-iot-devkit/mraa/blob/master/examples/uart.c, you will see that the string "Hello Mraa!" is sent in one instance. That message should be 11 bytes. I recommend you to check the example and try to run it to see if you can send more than 8 bytes.

 

 

Regards,

 

Diego

 

Reply