BGS5T Setting of CommConnection for RS232 | Telit Cinterion IoT Developer Community
November 12, 2014 - 1:22pm, 3849 views
Hi,
I had sucessfully comunicated with RSR232 temeprature sensor when sensor was connected to computer and terminal settings were:
Baud rate:115200 Data bits : 8 Stop bits: 1 Parity: none Flow control:DTR/DSR
But I get no response in my java midlet with settings:
String strCOM = "comm:COM0;blocking=on;baudrate=9600;autocts=off;autorts=off";
commConn = (CommConnection)Connector.open(strCOM);
I tryed changing rts and cts to on, but no success. Could be that the problem is flow control? As far as I can see there is no option to set DTR and DSR.
Regards
Jure
Hello Jure,
You have been using different settings while the sensor was connected to computer. Have you tried these setting you are using in MIDlet via PC also?
And you don't set data bits, parity, stop bits in your MIDlet.
Are you sure that you need blocking=on? Maybe this causes the problems.
Please also try to issue AT commands on ASC0 interface or check with the scfg command if the asc0 lines are not assigned to other interfaces.
See also com.cinterion.io.CommConnectionControlLines interface for additional lines control.
Best regards,
Bartłomiej
Hi Bartłomiej,
I allready tryed the same baudrate as when connected to computer and other settings, but I can't set the DTR/DSR flow control, because there is no option for that.
Setting blocking to off didn't help:
String strCOM = "comm:COM0;blocking=off;baudrate=9600;autocts=off;autorts=off";
If I connect RSR232 to computer instead sensor I get correct values inside the terminal. So I suspect that there is somthing with DTR/DSR flow control. But I can't find out how to fix this.
Is this correct for setting DTR and DSR?
String strCOM = "comm:COM0;blocking=off;baudrate=9600;autocts=off;autorts=off";
controlconn = (CommConnectionControlLines)Connector.open(strCOM);
controlconn.setDCD(true);
controlconn.setDSR(true);
This is my scfg:
at^scfg?
^SCFG: "Call/ECC","0"
^SCFG: "GPRS/AutoAttach","enabled"
^SCFG: "Gpio/mode/ASC1","std"
^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/PULSE","gpio"
^SCFG: "Gpio/mode/PWM","gpio"
^SCFG: "Gpio/mode/RING0","std"
^SCFG: "Gpio/mode/SPI","rsv"
^SCFG: "Gpio/mode/SYNC","std"
^SCFG: "Ident/Manufacturer","Cinterion"
^SCFG: "Ident/Product","BGS5"
^SCFG: "MEShutdown/Fso","0"
^SCFG: "MEopMode/SoR","on"
^SCFG: "Radio/Band","15"
^SCFG: "Radio/OutputPowerReduction","4"
^SCFG: "Serial/Interface/Allocation","1","1"
^SCFG: "Serial/USB/DDD","0","0","0409","1E2D","0059","Cinterion Wireless Modules","Cinterion BGx USB Com Port",""
^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/Passwd",
^SCFG: "Userware/Stdout","null",,,,"off"
^SCFG: "Userware/Watchdog","0"
Thank you
Jure
Hi Jure,
I'd try something like this:
baudrate=115200;bitsperchar=8;stopbits=1;parity=none;autocts=on;autorts=on
to activate RTS/CTS flow control for the communication.
And your setting:
controlconn.setDSR(true);
to raise DSR line for the entire communication.
Regards,
Bartłomiej