Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MYSQL Errors and Documentation #1

Open
lburrowes opened this issue May 3, 2023 · 1 comment
Open

MYSQL Errors and Documentation #1

lburrowes opened this issue May 3, 2023 · 1 comment

Comments

@lburrowes
Copy link

The MariaDB/mysql throws an error:
[Warning] Aborted connection 43 to db: 'LTE_Cells' user: 'admin' host: 'localhost' (Got an error reading communication packets)

Also would be nice to update readme to include all the require dependencies either via a script or just a sudo apt-get ....

@shark-fi
Copy link

shark-fi commented May 10, 2023

Here's the extra dependencies I had to run:
sudo apt install python3-dev python3-rpi.gpio
sudo apt install python3-gpiozero
sudo pip3 install mysql-connector-python
sudo pip3 install retry
->Also had to install the db.
sudo apt install mysql-server
sudo mysql
This will fix your error above, and sets the root password to 'admin'
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'admin';
We then need to create the Database and Tables
CREATE DATABASE LTE_Cells;
We need the rest of the database setup.. the script tries but doesn't work so I did it manually
USE LTE_Cells;
CREATE TABLE IF NOT EXISTS cells( earfcn int, rxLev int, mcc int, mnc int, cellId int, tac int, pci int, cellStatus int, rsrp int, rsrq int, bandwidth int);
sudo systemctl restart mysql
->Then I had to modify the config.py and Search.py to use root instead of admin as the username to login to the database. The Search.py has the username and password in two places.
nano config.py
nano Search.py
->After that you have to use this to access the database
sudo mysql -u root -p
->I then got an error about the screen not installed so had to install this
sudo pip3 install adafruit-circuitpython-rgb-display

I then got a successful message that it was attempting to connect.
I don't have the Adafruit Display on hand so I commented out those parts of the code. I need to figure out a different way to display the results, maybe in the CLI temporarily.
The AT#CSURVF=0 used by the LTEMain.py script isn't available on all LTE/5G Modems. Make sure you are using a Telit that supports that command by checking with minicom. Install minicom if you don't have it already.
sudo apt install minicom
sudo minicom -b 115200 -D /dev/ttyUSB2
I had to modify the AT# command because my modem uses AT#CSURV without the F=0
I then got a Network survey started ... message.

I'm exploring other modems that have similar AT Commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants