EHS6T LAN | Thales IoT Developer Community
August 18, 2016 - 4:00pm, 10217 views
Hello,
As I understand the EHS6T LAN is unavailible at the moment however it is important for me to know now if the module can act as a client on a network. We are going to be using an external router and will not be using the 3G in the module. I understand the module has a full TCP/IP stack but we want to be absolutely sure that we can set the module with a static IP and it will be able to reach the internet via our external router (gateway).
Thanks for the help.
Hi,
I'm a newby in the EHS6T LAN world, so I'm probably asking a very simple question.
I'm actually trying to establish a GSM Data connection with a remote ****m via an AT-command session on the 1234 TCP port.
Unfortunately, when the connection establishes the EHS6T module closes the TCP socket. I can barely see the following ATD result:
ATDxxxxxxxxx
CONNECT 9600/RLP
I suppose this is by design, since the connection should be handled via one of the WAN interfaces. Nevertheless, in this early stage of my development I would find very useful to work in data **** via the Hayes port.
Is there any way to do it?
Thank you,
UPDATE: it turns out that was the remote peer to disconnect (by toggling its DTR line). So, sorry for bothering you.
However, I would have appreciated, somewhere in the Module's docs, a note about the Hayes socket disconnecting at data connection hangup.
Hello,
So you were trying to establish a CSD call which is quite an old technology and probably not supported by many operators.
I suppose that the device was not designed for such functionality where you telnet to the 1234 port and establish a data connection from there for data transmission over telnet. So the transparent data channel is established on the module's interface after CONNECT and then the telnet connection is lost as I understand (after disconnection by the other party). Thanks for that report - maybe it will help somebody. I don't know the implementation details but the telnet connection makes it possible to execute AT commands and control the module that way but probably was not designed for data transfer.
The default scenario (as you probably know) would be that you just connect your device to the LAN port and have a direct access to the internet without establishing telnet connetion and using any AT commands.
Best regards,
Bartłomiej
Hello good day.
I comment here, because I think it has a bit to do with this issue.
I have the EHS6 LAN device. Connected to 3g with sim card. And I have a PC connected to the EHS6 through the LAN port.
From java I connect to a server using TCP sockets.
I want that when a certain TCP connection enters the EHS6 module in java, it transfers me to the PC connected to its LAN port, which has a web service, on port 80. and thus be able to view this web.
I don't know if I have to redirect a port from linux. I have tried to connect to the ip that the ehs6 assigns to the pc from java, and it has not been possible.
Hello,
It is not clear for me what you intend to do - what you mean by Java - a MIDlet working on the module or some other application?
In LAN terminal there are in fact two systems - one is OpenWrt which controls LAN and the other is the EHS6 module which is used by OpenWrt as a modem. It is connected via USB inside the casing. That's why USB is not available outside in LAN terminals.
OpneWrt controls a PPP connection over USB and also provides an access to AT commands via Telnet. The RS232 connector on the casing provides a direct access to EHS6 module. There is a potential possibility to use another virtual USB port to implement some custom logic between OpenWrt and EHS6.
In general any MIDlet running on the module does not have any access to the PPP link used by OpenWrt.
Regards,
Bartłomiej
Good Morning.
I have the EHS6 Lan, which uses the MQTT (TCP socket connection) protocol to a server. This connection is made through a midlet inside the module.
On the other hand, I have a computer connected to the LAN port of the EHS6. This PC has nginx active on port 80, to display an html (web) file.
The Ehs6 has a SIM card, to be able to establish this TCP connection.
What I want is that when the remote TCP server sends me a certain message to the midlet, example "show me the web". This midlet establishes a connection with the computer to view this web.
I have tried to make the connection to the ip assigned by the ehs6 to the pc, but it has not given result.
StreamConnection socket = (StreamConnection) Connector.open ("socket: //192.168.1.50: 80");
HttpConnection connect = (HttpConnection) Connector.open (192.168.1.50);
I have tried both connections with no favorable result.
What interests me is what I put in the red box of the diagram. Access the pc from a java midlet within ehs6. This is possible?
I hope I have explained myself. and thank you.
https://drive.google.com/file/d/1khx6a08Gugk2gWe1SmcVVWPv_V-JZx2g/view?usp=sharing
I did not know how to attach the image, I leave the link, sorry.
Hello,
The LAN terminal is designed to provide notwork connectivity to the device connected to the LAN port. It uses EHS6 module as a modem. So your PC connected to LAN should be able to access the internet.
OpenWrt establishes a PPP link with the network via the module. The PPP stack built into OpenWrt system is used for this connection.
At the same time any MIDlet installed on the module can also access the internet via a separate connection. But it has no access to the link used by OpenWrt. The module is using it's own protocol stack for this connection. So the MIDlet on the module can't access any devices connected to the LAN port.
As OpenWrt is an open platform based on Linux your scenario might be possible but could be more complicated. To try to achieve such a result you'd have to implement a communication between the MIDlet and OpenWrt (on both sides) via a USB port.
On the other side you could probably access the server on your PC in a more standard way - by connecting from the internet to the IP address assigned by the network to your PPP connection (provided it is a public IP and the network does not block inbound traffic) and implementing some port forwarding on OpenWrt side.
Maybe it would even be possible to connect from your MIDlet to the IP address of the PPP link of the terminal - provided these addresses are in the same subnet (if not public) and the operator is not blocking such a communication. Some port forwarding configuration would also be necessary in OpenWrt.
I can't see your image without requesting access. But I believe that I got the point now.
To place it in the post you need to click the image icon in the editor, upload it to your dedicated repository and add to the post from there.
Best regards,
Bartłomiej
From what you explain to me, if you understood what I want without the image. Anyway I attach it.
Yes, my pc actually has internet access.
The problem is that I have no public ip. so I cannot access the EHS6 directly and redirect ports to the pc. This is also why the protocol I use is MQTT through TCP.
In fact, I have checked the IP addresses of the midlet and OpenWrt and they are not the same, so I am not within the same network, as you have explained.
the ip address of the midlet that reaches the server is 34.123.13.34 (public ip of the midlet and OpenWrt)
the midlet has 10.23.54.32 (private ip)
and the OpenWrt has 10.23.62.283 (private ip) (within this would be the 192.168.1.50 of the pc)
these ip are not real, it is to explain.
try to make a direct connection to the OpenWrt ip (10.23.62.283) and redirect ports to the pc.
HttpConnection connect = (HttpConnection) Connector.open (10.23.62.283);
No favorable result. As you mentioned, the traffic are blocked.
So as a last option, I will try to do the communication between midlet and OpenWrt through the usb as you have said. I will investigate a little to see how this can be done. and then possibly ask them for help again. or if I find the solution, i publish
thank you.
Hello, I am sending AT commands to the modem via LAN, port 1234. Everything works fine, but after a few days the commands are no longer perceived by the modem. When trying to send an AT command, the modem responds "Error creating port lock file". Close the connection and reopen it gives nothing. The problem is solved only by restarting the modem. After a few days, the problem returns again. Here are the modem information that can be read via the web interface:
Hostname OpenWrt
Model EmbWir-Dorin
Firmware Version OpenWrt Chaos Calmer 15.05 / LuCI 15.05-35-g03901eb Release (git-15.286.36037-3e19939)
Kernel Version 3.18.21
Is there an update software for the modem?
What can be done to solve the problem?
Hello,
So the telnet connection still works but there seems to be a problem with the connection to the module. The question is why.
Have you tried to check if other functions are working? Is it possible to connect to the module over RS232 and execute AT commands? Is internet connection still working? Is SSH connection to OpenWrt system possible?
I need to verify if there is any newer version possible. What module is inside (ATI1 reply)?
BR,
Bartłomiej
Hi Brett,
Thank you for this information. It is nice to hear that you have implemented such a nice solution with our terminal.
It may be interesting for other people who are searching for a similar solution.
Regards,
Bartłomiej