EHS6T LAN - access by Java app | Telit Cinterion IoT Developer Community
January 17, 2017 - 11:11pm, 2628 views
Can Java app running on EHS6T LAN access the LAN port(send&receive TCP messages on local Ethernet)? The hardware docuemnt only talks about using EHS6T LAN as a cellualar gateway for a PC.
We've developed java app on EHS6T USB as a Modbus (serial) master to read data from field device through RS232 port. Now more and more devices are having Ethernet port only. Is it possible to develope a Java app on EHS6T LAN working as a ModbusTCP master?
Hi David,
EHS6T LAN terminal is different form other EHS6T terminals because it is based on OpenWrt open Linux platform which is running on the separate processor and controls all the LAN functionality. The EHS6 module is only used as a modem here. And the main and "official" usecase is to just use the device as a cellular gateway.
So the most straightforward way would probably be to implement some logic in the OpenWrt platform. The EHS6 module is connected to the OpenWrt via the USB so theoretically it should be possible to implement some communication with the Java application on the module - maybe some implementation in Linux platform would still be needed.
I think that you would need to do some tests to verify what would be the best way - I'm not much helpful here and for now there is no official documentation for that as it is out of the maim use case.
Best regards,
Bartłomiej
Hi,
We made a demonstration with EHS6T LAN. We used a public fixed IP SIM card and made OpenWRT port forwarding through the Ethernet to an external Ethernet based electic power meter. We added entries to the firewall to pass only http(s) traffic, port 443, through.
EHS6T LAN modem -> OpenWRT port forwarding -> Ethernet -> a Raritan Ethernet power meter
public fixed IP http(s) port 443 allowed one address with basic authentication
Perhaps a MIDlet could be written that listens to this 3G traffic and makes use of it.
The EHS6T LAN OpenWRT side is using ttyACM3 to communicate with the modem,
By reading/writing to this port you could control the Ethernet traffic.
I also tested this on the modem side: at^scfg="Userware/Stdout","usb1
Then I was reading the OpenWRT Linux side: root@OpenWrt:/dev# cat < ttyACM1
+PBREADY
SYSTEM.OUT STARTED
I will continue testing. There will certainly be a good way to use the Ethernet with Java.
Best Regards,
Antero
Antero Markkula
Communication and Mechatronics
Enkom Active Oy – www.enkom-active.fi
Upseerinkatu 3 A, 02600 Espoo, Finland
Mobile: +358 400 411368
Office: +358 10 204 0000
Fax: +358 10 204 0010
E-mail: antero.markkula@enkom-active.fi
Were you successful in managing the Ethernet side via Java code?
For example, can we connect to an IP: Port on the Local Network with Java code?