B4J Question Problem with MQTT Broker remote connection

stefanogoria

Member
Licensed User
Longtime User
hi to all, I receive an excpetion like this:
java.lang.IllegalArgumentException: 00.00.00.00 (my static Ip address)
during an mqtt client connection via ip address (the broker is on my own machine behind a router with the port 1883 unlocked and forwarded to it)
Many clients are working in the same way and I would like lmplement a new client with b4J

Thanks for all suggestions
Stefano
 

jmon

Well-Known Member
Licensed User
Longtime User
I don't think 0.0.0.0 is a valid ip address:
https://en.wikipedia.org/wiki/0.0.0.0
Try to change you ip address to something else.

Also, could you post the code that initialize the client and the broker?
 
Upvote 0

stefanogoria

Member
Licensed User
Longtime User
[SOLVED] Thanks Jmon, yes I now that 0.0.0.0 is not a valid IP address !! ;)
I resolved during the same night !!
This my code for the connection working fine !!!
B4X:
mqtt.Initialize("mqtt", "tcp://xxx.xxx.xxx.xxx:1883", "Java_DB_Client")

where xxx.xxx.xxx.xxx is my private server IP address
Nice to meet you
Stefano
 
Upvote 0
Top