View: 998|Reply: 6

PiCar-B does not connect but VNC does

[Copy link]

1

Threads

2

Posts

17

Credits

Newbie

Rank: 1

Credits
17
Post time 2019-7-2 00:58:16 | Show all posts |Read mode
Our Adeept Mars Rover PiCar-B client.py does not connect, but VNC does, same IP.

Many attempts all result in:

Connecting to server @ 192.168.0.112:10223...
Connecting

Cannot connecting to server,try it later!

Try 5/5 time(s)

When switching on, the motor HAT immediately shows red LEDs. Are these the LEDs we are to look for?

We have Wifi, which is how VNC is able to connect.

Is it a correct assumption that the PiCar uses the Pi's wifi? If yes, what would explain VNC connecting but not client.py?

I just did the entire install process on my Win7 PC as we did previousy on my son's Win10 PC, and same exact result, so I think it's got to be something at the PiCar end.

How can we diagnose? Can we get on the Pi and check GPIO pin status or something?

Thanks for any help!

Reply

Use magic Report

0

Threads

69

Posts

412

Credits

Website Editor

Rank: 8Rank: 8

Credits
412
Post time 2019-7-4 11:23:43 | Show all posts
The car and the Raspberry Pi have the same IP. That the client.py connection is unsuccessful may be because the server.py in the Raspberry Pi is not running successfully. Connect to the Raspberry Pi through ssh and manually run the server.py to see if there is an error: sudo python3 adeept_picar -b/server/server.py
Reply

Use magic Report

1

Threads

2

Posts

17

Credits

Newbie

Rank: 1

Credits
17
 Author| Post time 2019-7-5 01:53:37 | Show all posts
1557111628 replied at 2019-7-4 11:23 AM
The car and the Raspberry Pi have the same IP. That the client.py connection is unsuccessful may be  ...

Thanks for your reply! I'll bet that's the place to look next; the Pi-car has its own server which probably isn't running. I used Adeept_PiCar-B/server/setup.py, which was not 100% successful on the first try, so I reran it and it got further. I thought it was done, but probably not. So I will do as you suggest.

Unfortunately now I can't VNC into it, so I'll have to attach keybd/monitor/mouse. And I took yesterday off so today I have to work. But again I really appreciate you pointing me in what I'm pretty sure will prove the right direction. When we get this woirking, after we're done cheering wildly and playing with it, I'll try to remember to post an update.

Reply

Use magic Report

2

Threads

5

Posts

40

Credits

Newbie

Rank: 1

Credits
40
Post time 2019-7-14 09:41:26 | Show all posts
I ran sudo python3 adeept_picar -b/server/server.py and the last line it showed was
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
No errors

When I try and connect via the client.py it still times out after 5/5 tries.
Reply

Use magic Report

0

Threads

3

Posts

114

Credits

Registered member

Rank: 2

Credits
114
Post time 2019-10-5 12:20:11 | Show all posts
Edited by 1570248552 at 2019-10-5 07:34 PM

Ok i figured it out why following the directions do not work when trying to run client.py from the PC and trying to connect to the car.There are actually two mistakes both related to each other where the the server.py script on the RPi never gets executed either because of a missing file or the path to the server.py is wrong.
1. If you download and use the setup.py script in in the PDF manual shown in section 3.2, the script has a section that is commented out. It is supposed to add an autostart folder with car.desktop but since the file is not there, the server.py script never starts when the RPi boots up to the desktop. ADEEPT YOU NEED TO FIX THIS!!!
2. On page 65 of the PDF manual it shows that you need to create a car.desktop file and add some information. Well the path to the server.py is incorrect.
  • The PDF manual shows Exec=sudo python3 /home/adeept_picar-b/server/servr.py
  • It should have been written as Exec=sudo python3 /home/pi/adeept_picar-b/server/servr.py (pi path was missing!) ADEEPT YOU NEED TO FIX THIS ALSO!!! And put a date/revision on the PDF so we know it is the current document!


You'll know right away when the server.py script starts running when the RPi boots up to the desktop because the two big LEDs in front of the car turn On to RED. When you connect the PC then the LEDs changes to GREEN.

Hope this helps anyone that has the same issue as the OP.
Reply

Use magic Report

0

Threads

69

Posts

412

Credits

Website Editor

Rank: 8Rank: 8

Credits
412
Post time 2019-10-16 11:43:39 | Show all posts
car.desktop is an autorun solution that we used before. And it's canceled after the PI4,  so it was commented out in the program. If the autorun program does not start normally, apply the program to set it automatically start up and run. Use the command: sudo git clone https://github.com/adeept/autorun.git  to download the program of autorun setting.
Then: sudo python3 autorun/autorun.py
The program will automatically find out the server.py that needs to run automatically and then set the start-up.
This method is applied to all Raspberry Pi versions.
Reply

Use magic Report

0

Threads

2

Posts

14

Credits

Newbie

Rank: 1

Credits
14
Post time 2019-10-16 21:10:26 | Show all posts
this is what I got from support. I tried it. It did not work for me. Maybe I've done some thing wrong I will go back and try again. Car.desktop is an autorun solution that we used before. And it's canceled after the PI4,  so it was commented out in the program. If the autorun program does not start normally, apply the program to set it automatically start up and run. Use the command: sudo git clone https://github.com/adeept/autorun.git  to download the program of autorun setting.
Then: sudo python3 autorun/autorun.py
The program will automatically find out the server.py that needs to run automatically and then set the start-up.
This method is applied to all Raspberry Pi versions.
Reply

Use magic Report

You have to log in before you can reply Login | Sign Up

Points Rules