The simple way to find out is to test it, and I guess you’ve discovered that it doesn’t work because you aren’t creating a WiFi connection.
Because its been discussed many times, there are many many links!.
Try reading through this topic from start to finish, It has some good examples that should point you in the right direction…
Pete.