- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi There!
I have a project where Intel Edison will be speaking with a GPS unit via UART (/dev/ttyMFD1).
I use java for the whole project and would like to continue using it.
However i only see in the uart class writeStr and readStr. There is no just-plain-.bytes method in the java class. Is there a way to add them easily? Any workaround?
Many thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
Have you already looked at this website http://iotdk.intel.com/docs/master/mraa/java/classmraa_1_1_uart.html http://iotdk.intel.com/docs/master/mraa/java/classmraa_1_1_uart.html . This site has the Public Member Functions for the UART class. Have you already considered using the setMode ()? Is this what you need?
-Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
No
We need the byte[] write and read methods instead of String ones.
In c++ you can use write(byte[] buffer) instead of writeStr(String). We need those ones, the byte[] one
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi wjax,
That function is not directly implemented in the UART class.
As a workaround, you can try to edit the uart functions for read and write string. You can try to edit these files so that they write and read bytes based on the string functions.
Look at
https://github.com/intel-iot-devkit/mraa/blob/master/api/mraa/uart.hpp https://github.com/intel-iot-devkit/mraa/blob/master/api/mraa/uart.hpp for the writeStr function
and
http://iotdk.intel.com/docs/master/mraa/uart_8h.html http://iotdk.intel.com/docs/master/mraa/uart_8h.html
https://github.com/intel-iot-devkit/mraa/blob/master/src/uart/uart.c https://github.com/intel-iot-devkit/mraa/blob/master/src/uart/uart.c
for the mraa_uart_write function.
-Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Do you still need assistance with this case, were you able to use the byte read and write methods?
-Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
What GPS Unit? Grove with SIM28 / U-BLOX 6?
Managed to fix it? Let me know if you still need help with it

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page