Nano 33 IoT comnection help

Hi, firstly, im new to this so please dont slate me too hard.

Im doing a uni project using Nano 33 IoT and am struggling to get info from the nano displayed on my phone.

I have code (verified) that searches for wifi and connects, but my phone (android) cant find the Nano.

Same issue with the bluetooth - it can see my phone but my phone cant see it.

Can someone please point me in the right direction?

Not sure what information to provide here now. Let me know what i need to tell you to get the issue resolved,

Thanks in advance

Ps. The app i downloaded is called ArduTooth from play store

Welcome to the forum

Please post your sketch, using code tags when you do

Hey there Bob, just checking - what are the tags? And by 'sketch' do you mean the coding i have so far?

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use [color = red]code tags[/color] (the </> icon above the compose window) to make it easier to read and copy for examination

Yes, the sketch is the code that you are running.

1 Like

hi Bob, thanks for your response and apologies for the delay on mine.
I used "copy for forum" so this should include all info.
After viewing it, i think the issue is the void loop (or lack thereof) and im unsure how to program it.
The sketch is as follows:

/*
Arduino Nano 33 IoT WiFi Test
nano-33-iot-wifi-test.ino
Demonstrates use of WiFiNINA library for WiFi Connectivity
Results on serial monitor

DroneBot Workshop 2021
https://dronebotworkshop.com
*/

// Include SPI and WiFi Libraries
#include <SPI.h>
#include <WiFiNINA.h>

// WiFi Credentials (edit as required)
char ssid[] = "Android....."; //SSID
char pass[] = "........"; //WiFi password

int status = WL_IDLE_STATUS;

// Initialize the Wifi client
WiFiSSLClient client;

void connectToAP() {
// Connect to Wifi Access Point

while ( status != WL_CONNECTED) {
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);

// Connect to WPA/WPA2 network
status = WiFi.begin(ssid, pass);

// wait 1 second for connection:
delay(1000);
Serial.println("Connected...");

}
}

void printWifiStatus() {
// Print results to serial monitor

// Network SSID
Serial.print("SSID: ");
Serial.println(WiFi.SSID());

// Device IP address
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
}

void setup() {

// Start the Serial port
Serial.begin(9600);

while (!Serial) {
; // Wait for serial port to connect.
}

// Check for the WiFi module:
if (WiFi.status() == WL_NO_MODULE) {
Serial.println("WiFi module failed!");
while (true);
}

connectToAP();

printWifiStatus();

}

void loop() {

}

The sketch that you posted appears to connect to an Access Point named AndroidAP5A25 using WiFi

If that AP is your Android 'phone have you set up a WiFi hotspot on it with that name ?

What do you expect to happen if/when the Arduino connect to you 'phone's AP ?

Ahh, rookie error there - i left the SSID and password in... will delete that and re-upload it. Thanks for spotting that. And yes, i set up a mobile hotspot on my mobile and connected Nano to that.
So, i can see in the serial monitor that it finds my network and connects but i cant then find that connection with my mobile phone app... as if the Nano is searching and connecting but cant emit its own signal to be detected by the phone....
I realise now i am missing a void loop so am guessing it's ts something to do with that?
Btw, im using the "ArduTooth" app from play store but have also been told about Nordic app so may look into that one as an alternate...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.