Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
United Kingdom
Asked — Edited
Resolved Resolved by thetechguru!

2 Questions Regarding Ez-B V4 Startup

Hi everyone.

I have a couple of questions regarding the start up of my EZ-B v4 that I have installed in to my bot today, and hope someone may be able to help answer.

Q1.) Is there a way to have the EZ-B4 auto connect to my computer when the v4 starts up? E.g, the computer is already on and ARC already running. I power up the EZ-B4 and it automatically connects to ARC without having to manually "scan" and "connect". (Via client mode).

Reason: I hooked up a remote control power switch to my v4 (like a cars remote central locking relay) which works great, and to have the v4 auto connect to ARC and control my bot straight away I thought would be a nice touch.

Q2.) Is it possible to have a custom verbal message, either using speech synthesis script, pandorabots control or prerecorded MP3 file, to automatically say something like, "Hello. How are you today?" or "My systems are now online. Welcome." ect, after the default "I am now connected to your network" phrase when I power up the v4?

Reason: Just because I think it would be a cool feature.

Cheers,
Steve. :)

United Kingdom
#6  
You will need a connection script (here's an old one for connecting all 5 EZ-Bs, it may use old syntax as it's an old script);

Code:


# Auto Connect/Reconnect Script
# Version: 1.0

:start
# Check if EZBs are connected
IF (IsConnected(0) = FALSE or IsConnected(1) = FALSE or IsConnected(2) = FALSE or IsConnected(3) = FALSE or IsConnected(4) = FALSE)
# Visual output
PRINT("Connection Error: Attempting Reconnection")
# If any are not connected attempt to connect all
ControlCommand("Connection", ConnectAll)
# End of if statement
ENDIF
# Return to the start
GOTO(start)


This must be an EZ-Script control not part of script manager. Name it "Auto Connect".

Now, use the shortcut creator in ARC to create a shortcut for the project. The creator will ask if you want to run a script on load, use the above "Auto Connect" script.

Now when you open the shortcut it will load ARC, load your project and run the specified script.


You can use the shortcut in your PCs startup so when booted it will open ARC and connect. If the EZ-B is in AP mode set the wifi to auto connect to the EZ-B WiFi. If client mode make sure you have a fixed IP.

You could go one step further. Set up EventGhost. Add a macro which pings the EZ-B IP. If it's "alive" have it run the shortcut. This will automate the entire process so all you need to do is hit the switch on the EZ-B.
United Kingdom
#7  
@Rich.

Thanks for the reply. Your instructions for the set up will come in very useful indeed. Much appreciated. ;)
United Kingdom
#8  
Only me. I'm just getting back in to the swing of things with my build after unexpectedly spending a few days in hospital. :(

Anyway, I have been having a good play around with my EZ-B today and pleased to say that I got the verbal start up script working just the way I wanted, so I just wanted to say thanks again to Alan and Chris.

But I am still having a little trouble with the auto connect. I am using Virgin media's superhub 2 router and I can't figure out how to give my EZ-B a fixed IP address. I will be the first to admit that I'm really not that good with networking, so any more help anyone can offer regarding this would be a great help.

Thanks,
Steve.
United Kingdom
#9  
VM's superhubs are better put in Modem mode (I have one, not sure if it's a 1 or a 2 though). I have had quite a bit of trouble with mine in router mode (unfortunately it's in router mode now since my buffalo air station died on me last week)

On mine...

Log in to the router
Go to Advanced Settings
Scroll down to DHCP
Click on DHCP reservations
Scroll down and there is Add Reservation

You will need to know the MAC address of the EZ-B but this should be in the lease table below the reservations.

But, I'm not 100% sure if I have a 1 or a 2 (possibly a 1) so if the above doesn't match what you have then I don't know.
#10  
Little hard to find complete documentation on the Virgin Media Superhub 2 router, but when there is a will, there is a way.

Log onto your router. Go to Advanced Settings.

Then go to DHCP and DHCP Reservation.

Attached Devices: Shows a list of devices currently connected to your Network. You can click Refresh to update the list.

To add a connected device to the reservation table: Select the connected device you'd like to add from the 'Attached Devices' table. Enter a friendly name for the device you'd like to add. Enter the IP Address you'd like to reserve for this device. Click 'Add Reservation' to add it to the reservations list.

To add a device that isn't currently connected to the IP Lease Table: Enter a friendly name for the device you'd like to add. Enter the MAC address of the device you'd like to add. Enter the IP address you'd like to reserve for this device. Click 'Add Reservation' to add it to the reservations list.

To delete a device from the reservation table: Select the device you want to delete and tick the Delete checkbox. You can repeat this for any other devices you wish to delete. Click 'Apply'.

IP Lease Table: Shows the details of all DHCP reservations. Note: You cannot reserve an IP address that is already leased to another device.

User-inserted image
United Kingdom
#12  
@Rich and @Alan.

Many thanks for the information. That should help me a lot. I will give it a try a little later. 1 question. What is the difference between router and modem mode? I read the documentation for the hub but it made me sense to me. *confused*

Steve.
#13  
If you are getting a wireless signal, it is in router mode, and you are all good. Modem mode is when you want to use your own wireless (or wired) router and you just want the SuperHub to provide connectivity to your ISP.

Alan
United Kingdom
#14  
Ok, that makes a little more sense (I think). Anyway I'm currently trying to set this up but the EZ-B is not showing up in the attached devices, only my laptop and phone. The EZ-B is connected and refreshing the list is not helping. Hub is still in router mode and EZ-B is in client mode. Trying to find how to switch it in to modem mode as Rich suggested. Also, where do I find the MAC address for the EZ-B? Can't see it in the lease table.
United Kingdom
#15  
Router and modem mode differences...

Basically, the superhub is a combo router/modem. If you were with VM a while back you got the old surf board modem and a separate router, the superhub has both in one.

In modem mode you will need a separate router. Modem mode turns off the router part of the superhub. All it then does is become a modem.

You connect the superhub to the WAN port of the router and the router does everything from there. This basically means you can use any router and have a lot more options if you need them (like I do). I changed mine as the wireless on the superhub was dropping a lot, I needed port forwarding where I could point an external port, for instance 8001 to an internal port of something else, such as 80. I have a lot of devices which use port 80 but only one can have the real port 80.

I also found the superhub to be unstable. Having read a lot about DD-WRT firmware I opted to get a router which supported it.

Don't put your superhub in modem mode if you don't have a separate router too.
United Kingdom
#16  
@Rich.

Thanks for your reply. That cleared things up a little more. No I i don't have a separate router, so hub is staying in router mode as you said. Still having trouble finding the EZ-B in the reservation list. *confused*
#17  
I assume your phone is Android since you mentioned it can see the EZ-B. Download "fing" from the google play store. It will give you the MAC addresses of all devices on your network, then you can manually add it on the dhcp reservation page in the router.

(there is a way to do it in Windows too, but fing is super simple).

Alan
United Kingdom
#18  
Sorry no, it's an iPhone I have.
#19  
If you know the current IP address of the EZ-B, or connect your pc to it in AP mode so you know the addres will be 192.168.1.1

Then follow these steps:
1) open cmd command prompt

2) ping the IP address at least once

3) type ARP -a

You will see the Mac that matches the ip
United Kingdom
#20  
Thanks Alan. I'll give it a try tomorrow. Only problem about AP mode is that I have a HP laptop and it won't connect that way as there are issues with HP's and EZ-B AP connections at the moment, so I can only connect with client mode.
#21  
Client is fine as long as you know or can find the EZ-B current IP address.

There are also probably network tools similar to Fing for iPhone, I just don't know of any to recommend.

Alan
United Kingdom
#22  
No problem. I'll have a look through the App Store and see what I can find. IP address won't be a problem as it shows up when I run a scan and connect EZ-B. I'll keep you posted on how I get on tomorrow.
United Kingdom
#23  
Hi. Just a quick update and a question for this topic.

I finally managed to sort out the IP/MAC address for my EZ-B on my VM router so thanks for everyone's input. I followed Rich's instructions and script and when the EZ-B is on and I open up my project shortcut, "it does exactly what it says on the tin" and auto connects every time. Good stuff and thanks to Rich.

Now the question I have is this. As I just mentioned, this works great and will come in handy, but it wasn't exactly what I was originally looking for. What I wanted was to be able to things the other way around.

E.g. The PC is on and my project is already loaded and running, EZ-B not powered up yet. What I would like to do is to power up my EZ-B (via IR remote control which I have set up) and have it auto connect to my already running ARC project.

Is there a way of doing this? *confused*
United Kingdom
#24  
Without constantly attempting connection in ARC, which would end up with it asking if you need help on connecting you will need to use another small piece of software...

EventGhost. Set up a macro to ping the IP of the EZ-B at regular intervals. On successful ping have it fire a script command (via telnet) to ARC which connects the EZ-B. Use the "On Connection" script to start any required scripts running.

It's not difficult to set up but you will need to install EventGhost and set up a python script for the telnet command and enable the ping addon.

If Python isn't your thing you could have it run the ARC project shortcut which would open ARC and run the desired On Load script (such as auto connect).
#25  
@Steve

I use the following script to do exactly what you looking for. With this method you don't get the failed connection dialog Rich was explaining. You probably want to adjust the sleep commands to your liking (longer the better) but other then that should be able to just copy and paste this into your script.


Code:

:start
$status = IsConnected(0)
If($status = FALSE)
ControlCommand("Connection", Connect0)
sleep (5000)
Goto (start)
EndIf
If($status = TRUE)
sleep (60000)
Goto (start)
EndIf