landis - 2018-05-06

Hello to all!
I'm trying to setup my Raspberry (Raspberry B+) as Modbus master TCP with a slave (ESP8266) but using a wifi dongle to create an access point and use wlan0 for communication.
Before doing this i have successful used modbus communication connecting the Raspberry and the slave under home router network. But now i need to use the network created by the Raspberry in order to have a standalone network.

First i have setup the dongle as AP with the ip 192.168.4.1 and it works fine, i'm able to connect the slave without problems.
In Codesys i have changed the interface used by TCP Master:

And then the slave configuration:

But the slave on the wlan0 side doesn't work.

The project include web visualization and it works great connecting from a smartphone to the Pi's network (192.168.4.1:8080), i have no idea about reason the modbus doesn't work. The ip address is correct, tried the same configuration of the master and slave on eth0 interface and works like sharm, but not on wlan0.

Any help will be really appreciated
Many thanks
Alberto

IMG: Bild

IMG: Bild

IMG: Bild