I had setup Legato (in linux), managed to connect to AirVantage and executed few of the sample applications.
Received 3 breakout-board few day ago and executed the GPIOCF3Demo and manage to capture some signal on GPIO 21 (IOT1_GPIO4)…
Now I need do connect mangoh to RS232 via IOT0 (2 wires) for a start.
The final intention is to connect to IOT0, IOT1 and IOT2.
Search all over for information on how to do it, but fail.
If you any information, can you guide me through?
Thanks in advance,
CSLEE
Eventually we intend that there be an intelligent service which queries an IoT card and then provides access to the required buses. For now you have to control the muxing manually. This is can be done using the MuxControl app which is part of mangOH.
FYI: I have considerable modifications to the GpioExpander and MuxControl mangOH apps pending in our internal code review system. I expect that those changes will be approved and pushed into github tonight.
To route UART 1 to IoT slot 0, you need to call the Iot0Uart1On() function declared in mangoh_muxCtrl.api and defined in mangoh/apps/muxControl/muxCtrlService/muxCtrl/muxCtrl.c. You can look at mangoh/apps/muxControl/tools/muxCtrlTools.adef for an example of how to bind to the MuxControl service.
For IoT slots 1 and 2, there are similar functions Iot1Uart1On() and Iot2Uart2On(). Please be aware that there are 2 UARTs so it will never be possible to have a UART connected to all 3 IoT slots simultaneously.
Although my previous message is accurate, I don’t think it will solve your problem. I forgot that UART 1 may not even be under control of the application processor. In order to give control of UART 1 to the application processor we need to send an AT command to the modem.
In our case we want to send a different AT command. The AT command we want to sent is briefly described on this Legato HOWTO - Customize UART page.
No documents, just the instructions!
in a terminal on the mangOH, run microcom -E /dev/ttyAT
type the command AT!MAPUART? to show the current UART configuration. The value is interpreted as UART1Routing,UART2Routing.
type the command AT!MAPUART=17,1 to route UART1 to “Customer Linux application”
type in the command AT!MAPUART? to confirm that the setting has changed
press ctrl-x to exit microcom
enter the command reboot -n to reboot the system
Now UART 1 should be available for use by your application. It will default to Iot slot 0, but you can use the instructions from my previous message to disable UART1 or route it to IoT slot 1.
Hello dfrey,
Thanks for the info. I will work on it.
I know that I can’t connect IOT0 and IOT1 UART simultaneously. I think it is possible to switch between the two by application(software). I would connect devices that used less frequently and also not simultaneously.
Thanks again,
CSLEE