BGS5T Problem opening port COM0 at 1200 bps | Thales IoT Developer Community
December 3, 2014 - 11:02am, 12146 views
Hi there,
We have a java Midlet working on TC65T. It was developed a few years ago and it is working right now. But now we want to make it work in BGS5T devices. So, we've made all the changes in code as when import classes (siemens/cinterion), etc. It seems to work quite well after all the minor changes but there's one problem when opening the comm port COM0 with the next configuration:
comm:COM0;baudrate=1200;bitsperchar=8;stopbits=1;parity=none;blocking=off
We receive an "java.io.IOException: Opening port COM0 was failed" error.
It happens only when opening the port at this 1200bps baud rate. If we open the port at another baud rate (e.g.9600 bps) then it works fine, we can send to and receive data from an external device with no problem.
After reading some documentation I've found something on the Chapter 8. Appendix A: (Hardware) Watchdog, and 8.3 Configuration vía ASCO Interface of the Cinterion document Terminals Hardware Interface Description of BGS5T & EHSxT. It seems that this baud rate of 1200bps is reserved for watchdog configuration and could not be used for a serial communication via ASC0 interface with an external device.
We are using the cinterion Watcdog2 to switch off the module if the timer expires. Also the GPIO classes (InPort, InPortListener, OutPort) and this is the BGS5T configuration:
^SCFG: "Call/ECC","0"
^SCFG: "GPRS/AutoAttach","enabled"
^SCFG: "Gpio/****/ASC1","std"
^SCFG: "Gpio/****/DAI","gpio"
^SCFG: "Gpio/****/DCD0","std"
^SCFG: "Gpio/****/DSR0","std"
^SCFG: "Gpio/****/DTR0","std"
^SCFG: "Gpio/****/FSR","gpio"
^SCFG: "Gpio/****/PULSE","gpio"
^SCFG: "Gpio/****/PWM","gpio"
^SCFG: "Gpio/****/RING0","std"
^SCFG: "Gpio/****/SPI","rsv"
^SCFG: "Gpio/****/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","50"
^SCFG: "Userware/Passwd",
^SCFG: "Userware/Stdout","null",,,,"off"
^SCFG: "Userware/Watchdog","1"
OK
The midlet need to communicate with different external devices via RS232. Some of them works at 1200bps and could not be configured to work at a different baudrate. They work only at 1200bps. We have no problem with external devices that works at 9600bps.
The question is:
¿Is there any way to communicate with an external device working at 1200bps? We still want to use watchdog and GPIO module functionalities.
Any help would be appreciated.
Thanks in advance.
Fran
Hi everyone,
Finally there's a solution to the problem I've exposed here. The idea is not mine and was given to me from José Gallego at Matrix Electrónica, Spain.
The idea to signal the vending machine that we need data is not using the CTS signal. It works fine in the TC65T but it doesn't work in the BGS5T. Instead, we can use the DSR signal and with the help of the interface CommConnectionControlLines we can change the state of the signal. So, after opening the COM port we can tell the vending machine that we want data activating DSR. It's a lot much easier than using GPIO signaling in this case. We only need to change the line from CTS to DSR in the DB9 connector. If you're not using CTS-RTS handshake and to avoid in the BGS5T to throw the exception "java.io.IOException: Opening port COM0 was failed" you can bridge the CTS-RTS lines in the DB9 connector or open the port appending the parameter "autorts=off" to the COM0 setting string. But you must do one or the other. This exception is only thrown in the BGS5T and not in the TC65T.
Thanks
Best regards
Fran