UART communication issue


#1

Hi
I am trying to use MangOH Serial console port to communicate with my serial device. I have fired AT!MAPUART=17,1 to disabled Linux console and enabled application console . In my application I am writing data to the serial port “ttyHSL1” and I am able to print data to the serial port but my problem is, still i am getting Linux console output from this UART which is creating problem in my serial slave device. Please help me on this.
Thanks


#2

try:
at!mapuart=17,2 (for UART2 )
at!mapuart=17,1 (for uart1)


#3

Hi,
Thanks for your quick response.
Yes now Linux console is completely disabled even my application console too.
Now I cant able to print any data from my application over “dev/ttyHSL1”. Any suggestion.

Thanks


#4

Please use USB ECM for communication if you dont use console or you can ssh into the ethernet.


#5

Ok. But my serial slave device have only RS232 port and i connected this to MangOH DB9.
whatever data is coming from my Serial slave device, I am adding GPS data then pushing it to our tcp/ip socket server over GPRS.

Thanks


#6

So to be clear:
HSL0 = UART1
HSL1 = UART2
I know its confusing.
So, if you want console back on UART2, please do the followng:
at!mapuart=16,2 (for UART2 ) using USB ECM to AT port
Then if you want to talk to your slave, please use HSL0
at!mapuart=17,1 (for uart1) and have a UART to RS232 conversion to talk to your slave.


#7

Thank you for the details.
So I have to use UART1 and if i am not wrong then in MangOH board it is available as additional pad ( CN600 ). I shall try to trace tx, rx pin and will update you.
Thanks


#8

you can also use the IoT board that was shipped with your platform that gives access to UART1, Just insert it into the slot IoT0.


#9

Hi
Now I am able to use UART 2 . I just configure UART 2 as Diagnostic Message service by firing AT!MAPUART=2,2 and now I can able to print serial data from my application over UART 2 without Linux Console data. But I cant able to receive serial data in my application over ttyHSL1

Thanks


#10

hi,
I have forwarded your concern internally. In the meantime, can you use Linux application mode for UART2?
(http://legato.io/legato-docs/latest/how_to_customize_u_a_r_t.html)


#11

Hi,
Same issue. I can only print data to UART2 but cant receive anything from UART 2. It will be good if someone share a working example Serial communication over UART2 code here.

Thanks


#12

Hi,
If I disabled the sandbox in my code using sandboxed : false in the definition file then I am able to use UART2 for send and receive serial data properly.

Thanks
Niladri


#13

Can you use IoT1 or IoT2, I need IoT0 for WiFi. Apparently WiFi will only work on IoT0. From the Developer’s Guide (section: mangOH Green Hardware Architecture) it appears that UART1 can be used on IoT0 or IoT1, is this correct ?

Thanks
Kas


#14

yes, UART1 is available on IoT0 or 1.
UART2 is available as console by default but can be set to IoT2


#15

@Kas.Lewis yes you are correct and you can use GpioExpander and MuxControl for selecting the uart1 on IOT1

Thanks


#16

Thank you @niladridm, I am actually just going through the forum to try understand how to use the MuxControl to do what you have mentioned. I see that you have already worked through this issue to get the UART1 to connect to the RS232. I’m hoping to be able to work through this either with what’s already here or help from the larger community (such as yourself) as I understand the team is currently working hard to meet some tough deadlines.

Thanks
Kas


#17

I’m assuming I could use the same concepts as the i2c demo but substitute in the adef

requires:
{
    device:
    {
         [rw] /dev/i2c-0 /dev/i2c-0
    }
}

With the UART equivalent, I’m not 100% sure what that is yet but I hope to find that with a few searches. With regards to the control of the UART, functions like I2cAccessBusAddr() would be changed for the UART equivalent found here.

If this makes any sense I would appreciate someone saying so to prevent me spending a good deal of time only to find I have gone down the wrong path.

Thanks
Kas