PyPush icon indicating copy to clipboard operation
PyPush copied to clipboard

Internal Server Error (web server at :5000)

Open johngo7470 opened this issue 7 years ago • 9 comments

I have a RPi3 with Raspian. I purchased/installed a BlueGiga BLED112, and verified its installation with 'lsusb', 'lsmod', and found it at /dev/ttyACM0. I'm updated, upgraded, and dist-upgraded. I installed your library, and have nodejs v8.9.1, npm 5.5.1, bower 1.8.2, and angular 1.6.6 installed, though I did see errors when I tried to install npm (it was already installed, but said I was requesting an "impossible situation" or that I'm running an unstable distro), and during bower installation it warned I should migrate to yarn, and that my installation could stop working without notice.

When I execute 'sudo ./bin/serve.sh --ble_driver bluegiga --ble_device /dev/ttyACM0 web_ui', I see a response from Microbot Push ('EVT-GAP Scan Response - RSSI:-48 - Packet Type:0 - Sender:d4:e0:b4:29:89:a0...')

So far so good, but when I open raspi's browser to 127.0.0.1:5000, I get an Internal Server Error.

Any suggestions on how to troubleshoot what's wrong? (any logs I can look through?)

JG

johngo7470 avatar Nov 16 '17 11:11 johngo7470

I'm seeing the same, exact same setup - at the /microbots URL, from the screenshot, I get a 404/not found.

Seem to be able to see the API though : /api/microbots

iMiMx avatar Dec 01 '17 11:12 iMiMx

Use bower-away to convert to yarn, then it starts. Just follow the prompts throughout

https://github.com/sheerun/bower-away

Whilst it starts, it still threw a few bower errors and I was unable to pair. Might have to go the Docker route, although the images are going to be X86 so not on the Pi :(

iMiMx avatar Dec 01 '17 12:12 iMiMx

I recall seeing the deprication message about bower, but was reluctant to follow that rabbit. Incidentally, with regards to troubleshooting, I found that setting "export FLASK_DEBUG=1" in my shell, I was able to get debugging info (though haven't had a chance to make progress). Will give the conversion to yarn a try - thanks!

johngo7470 avatar Dec 01 '17 17:12 johngo7470

With FLASK_DEBUG set to 1 before I started serve.sh, and using the mac address of the Microbot discovered above (d4:e0:b4:29:89:a0), and parusing some of the code, I tried to go to http://127.0.0.1:5000/api/microbots/D4:E0:B4:29:89:A0/pair - it does seem to have an effect - the blue LED goes solid on the Microbot Push, but it doesn't seem to complete the pairing process. Worse, because it fails, the pair request appears to go onto a list, to be executed again in 60 seconds. This condition also survives a "sudo reboot", so I'm not quite sure how to clean up from this condition.

johngo7470 avatar Dec 09 '17 05:12 johngo7470

Hello Guys,

I have the same problem and i can't go around it,

Did you find away to solve it?

Thanks

negmos avatar Jan 02 '18 20:01 negmos

Unfortunately, no.

I eventually gave up and made my own device with a servo motor, and drive the motor to do what I need.

johngo7470 avatar Jan 03 '18 02:01 johngo7470

Likewise, I gave up. I tried deploying one of their Prota Hub/base devices on a Pi, updated the firmware to see if I could get even basic functionality...but alas, no. Wasn't a fan of having a Prota on my network.

iMiMx avatar Jan 03 '18 08:01 iMiMx

That is annoying :(.. I tried last night to deply their Prota OS, on a Pi Zero W and currently running this microbots push with local webhooks.

negmos avatar Jan 03 '18 08:01 negmos

The resolution here is to install angular via bower:

  • Install node / npm
  • sudo npm install -g bower
  • bower install angular

mwegner avatar May 08 '18 19:05 mwegner