smallbasic / smallbasic.plugins

Plugins
GNU General Public License v3.0
9 stars 4 forks source link

IOIO on Android not working #15

Closed Joe7M closed 3 weeks ago

Joe7M commented 2 months ago

Hi Chris,

IOIO doesn't work on Android:

Do you have any suggestions? Is it possible to get a better error message indicating what went wrong?

chrisws commented 1 month ago

Here's some steps - hope this helps:

  1. Launch SmallBASIC and then click Setup.
    • On the second screen, click to Load extension modules.
  2. Restart SmallBASIC and then click About
    • You should see: Extension modules: enabled.
  3. If you have enabled Android developer options, make sure USB debugging is disabled.
  4. On your ioio-otg board, connect a power source to the VIN + GND (9v battery worked for me).
  5. Connect a USB cable between your mobile and the board (I used the included red adaptor plus another cable).
  6. You should see "IOIO Standard application - no installed apps".
  7. Launch led.bas
    • You should see a prompt requesting permission for SmallBASIC to access the board. Click okay.
    • You should then see a toast message: IOIO board access permitted.
  8. For this initial setup led.bas has now timed out
    • I couldn't find a way to smooth over this part of the process.
    • You should be able to re-launch led.bas for successful operation.

If this all fails, you could use adb to retrieve the android log - there should be something that hints at what went wrong. You may also find some extra detail in SB's console screen.

Joe7M commented 1 month ago

I do step 1 (About shows me, that the extension modules are enabled). After restarting SmallBASIC (step 2) the extension modules are disabled. This happens on my mobile phone and tablet (Android 9).

chrisws commented 1 month ago

I think there's a bug where if you return to the setup screen, it shows as disabled. If you look in the about screen it should say enabled. I've mostly been using the same device, i'll try some others.

Joe7M commented 1 month ago

Good news. IOIO is working now on both Android devices. I'm not 100% sure, what the solution was. I had the problem, that I could not activate the extension modules. After running setup and restarting SmallBASIC, the modules were always listed as disabled in the About screen. It might be, that the fix was, to type in the Setup screen also for the web service port a new number (the tries before I just hit the enter key).