Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9881 Discussions

MRAA Uart causing problems

NK
New Contributor I
1,020 Views

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
149 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
150 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
NK
New Contributor I
149 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
149 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