EHS6 and UART | Telit Cinterion IoT Developer Community
August 15, 2018 - 10:53am, 9716 views
Hi!
I have a cinterion ehs6(revision 03.001) which I want to connect to arduino via a RS232 cable. Do I need an extra step to configure the port? I checked with AT^SPOW, the response is 1,0,0. However, I can’t send and receive any at command from arduino. Is it a must to have a MIDlet file in the module for RS232?
Hi.
After sending "at", the module suppose to respond "OK" but i didn't. First i thought maybe the connection of tx-rx and rx-tx. Then i changed to tx-tx rx-rx. But still no "ok" response. So my second thought is to open/activate the asc0/asc1 port. Is there any atcommand for opening the port? Or it will be enough for setting on scfg with Serial/Interface/Allocation, Gpio/mode/ASC1, Gpio/mode/DAI, Gpio/mode/DCD0, Gpio/mode/DSR0,Gpio/mode/DTR0 and Gpio/mode/RING0? Yes. i double checked the ipr and serial.begin, both are 115200.
This is my connection. To monitor the data flow, i had added a cable from gemalto to laptop. So two usb arduino compatible cables are used (one for arduino one for gemalto(tera terminal)).
Thanks.
Hi.
My RS232 cable has 3 wires (RX,TX,GND) only. Does it affect the output? If I connect with a 9-wire-cable, do i need to define and have some dorts of initialization? My scfg output is as below, using asc0.
at^scfg?
^SCFG: "Audio/Loop","0"
^SCFG: "Call/ECC","0"
^SCFG: "Call/Ecall/AckTimeout","5000"
^SCFG: "Call/Ecall/Callback","0"
^SCFG: "Call/Ecall/CallbackTimeout","43200000"
^SCFG: "Call/Ecall/Msd","0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
^SCFG: "Call/Ecall/Pullmode","0"
^SCFG: "Call/Ecall/SessionTimeout","20000"
^SCFG: "Call/Ecall/StartTimeout","5000"
^SCFG: "Call/Speech/Codec","0"
^SCFG: "GPRS/AutoAttach","enabled"
^SCFG: "Gpio/mode/ASC1","gpio"
^SCFG: "Gpio/mode/DAI","gpio"
^SCFG: "Gpio/mode/DCD0","std"
^SCFG: "Gpio/mode/DSR0","std"
^SCFG: "Gpio/mode/DTR0","std"
^SCFG: "Gpio/mode/FSR","gpio"
^SCFG: "Gpio/mode/HSIC","gpio"
^SCFG: "Gpio/mode/PULSE","gpio"
^SCFG: "Gpio/mode/PWM","gpio"
^SCFG: "Gpio/mode/RING0","std"
^SCFG: "Gpio/mode/SPI","rsv"
^SCFG: "Gpio/mode/SYNC","gpio"
^SCFG: "Ident/Manufacturer","Cinterion"
^SCFG: "Ident/Product","EHS6"
^SCFG: "MEShutdown/Fso","0"
^SCFG: "MEShutdown/sVsup/threshold","0","0"
^SCFG: "MEopMode/CFUN","0","1"
^SCFG: "MEopMode/Comp1",""
^SCFG: "MEopMode/Dormancy","0","0"
^SCFG: "MEopMode/ExpectDTR","current"
^SCFG: "MEopMode/ExpectDTR","powerup"
^SCFG: "MEopMode/SoR","off"
^SCFG: "Radio/Band","511"
^SCFG: "Radio/Mtpl","0"
^SCFG: "Radio/OutputPowerReduction","4"
^SCFG: "Serial/Interface/Allocation","1","1"
^SCFG: "Serial/USB/DDD","0","0","0409","1E2D","0058","Cinterion Wireless Modules","EHx",""
^SCFG: "Tcp/IRT","3"
^SCFG: "Tcp/MR","10"
^SCFG: "Tcp/OT","6000"
^SCFG: "Tcp/WithURCs","on"
^SCFG: "Trace/Syslog/OTAP","0"
^SCFG: "URC/Ringline","local"
^SCFG: "URC/Ringline/ActiveTime","2"
^SCFG: "Userware/Autostart","1"
^SCFG: "Userware/Autostart/Delay","0"
^SCFG: "Userware/DebugInterface","0.0.0.0","0.0.0.0","0"
^SCFG: "Userware/DebugMode","on"
^SCFG: "Userware/Passwd",
^SCFG: "Userware/Stdout","asc0",,,,"off"
^SCFG: "Userware/Watchdog","0"
OK
Thanks.
Hello,
Can you write what hardware you are using with EHS6 module? Is that any developer board or your own hardware?
When connecting serial interface you have to take into consideration that RS232 interface of the module is 1.8V. So you may need level shifters for connecting 3.3V domain interfaces. Please see the reference designs here: https://iot-developer.thalesgroup.com/documentation/example-schematic-eh...
Please check which interface (ASC0 or ASC1) you have connected. According to your SCFG ASC1 shared lines are currently configured for GPIO.
^SCFG: "Serial/Interface/Allocation","1","1" is fine for both ASC0 and ASC1. You should also disable flow control with AT\Q as you are only using 3 lines.
You have configured system out from Java applications to ASC0: ^SCFG: "Userware/Stdout","asc0",,,,"off" - so it is not possible to communicate over this interface as it is now dedicated to printing output from Java.
Please make sure that power saving on serial interfaces is disabled (AT^SPOW?).
Best regards,
Bartłomiej
Hi.
I'm only using CINTERION EHS6 linked with arduino via a rs232 cable with a rs232-to-ttl. Mentioning about level shifters, means that i need to configure at^scpin and at^ssio (M2M EHS6 hardware pdf. page 85.under section 8.5.2) ? Do I need to set AT^SCFG="Gpio/mode/SPI" to "rsv"?
Regarding the interface (asc0,asc1), i have tried both by changing the setting Gpio/mode/ASC1, DCD0, DSR0, DTR0 and RING0. when using ASC0, set to std except asc1 to "gpio" and vice versa. But i received nothing when i type at. Is there anything that i missed?
My at^spow is 1,0,0 and at+ipr=115200.
Thanks.
Hello,
Serial interface of EHS6 module is working with 1.8V while your device probably 3.3V, 5V or higher. With too high voltages you could even damage the module. So that's why you need the level shifters. It has nothing to do with SPI interface. Please refer to the reference design document from the previous post for an example solution.
If you want to use ASC1 you need to set ^SCFG: "Gpio/mode/ASC1" to "std". ASC1 shares some lines with SPI so ^SCFG: "Gpio/mode/SPI" will automatically be set to "rsv". You don't need to change it. You also don't need to use at^scpin or at^ssio commnads. You can find the table with all the shared lines in the hardware interface description document in the chapter 2.1.9 GPIO Interface.
DCD0, DSR0, DTR0 and RING0 are the lines of ASC0 interface which are shared with GPIO and SPI. If you want to use them for ASC0 you should set "std" for them.
You should reboot the module after changing the lines configuration.
Please also note that to successfully execute AT command <CR> character must be sent in the end.
Best regards,
Bartłomiej
Hi.
About the level shifters, i saw in theM2M EHS6 hardware pdf file page 85.under section 8.5.2. It actually has a sub topic on the Configuration using TXD0 Line of ASC0 Interface. It mentioned about AT^SCPIN and AT^SSIO. That's y i confused. Am I suppose to configure with AT^SCPIN=<mode>, <pin_id>, <direction>[, <startValue>] with the gpio pin?
A successfully execute AT command is this referred to convertion from text to hex? For example: i sent "0x41, 0x54" (AT) and reply me with ok in 0x4F 0x4B?
Thanks.
Hello,
So you are not using just EHS6 module placed on some piece of hardware of your design or some developer board but EHS6T - the terminal which is a complete product including EHS6 module, additional hardware and casing. And this is a bit different story.
Here you already have level shifters built in. And additional hardware which you can configure using i2c interface or TXD0 line at 1200bps. Data send on ASC0 with this baudrate will not be routed to ASC0 interface of the module but will be used for special configuration. You will find more in the hardware description document for the terminal. But for ASC0 interface which is connected to 9-Pole D-sub connector or ASC1 which is available on GPIO interface you should not need this. But in this case using of hardware flow control is recommend. You should set it on the module's interface with AT\Q3 command. In case you are not using RTS/CTS lines please try to connect RTS with CTS.
You should just add <CR> character to each command (hex value is 0x0D). The response usually looks like <CR><LF><response><CR><LF>.
Regards,
Bartłomiej
Hi.
How to connect RTS CTS to arduino? I think this is the cause because i am using a rs232 to ttl converter when connect to arduino which only connect TX,RX,VCC and GND.
Thanks.
If your arduino does not have RTS/CTS lines please try to short circuit RTS with CTS in the terminal and then try to communicate (first enable hardware flow control in the module with AT\Q3).
Hi.
I did it. CTS/RTS problem.
Thanks.