Re: OqtaDrive
Posted: Tue Nov 14, 2023 8:56 pm
OqtaDrive 0.5.3 has been released.
Code: Select all
LOG_LEVEL=debug ./oqtactl serve --device /dev/tty.usb...
From the log, we can see that the Nano is correctly flashed and serial communication works. However, it looks like there's tremendous noise at least on the COMMS_CLK line. When the QL idles, this signal should be low. However, the Nano repeatedly sees high at startup, which is why it erroneously detects your QL as a Spectrum (idle level is high there). After the initial sync it then constantly receives level changes an the COMMS_CLK line (that's all the CK CR OF DR messages), hence my suspicion about the noise.spkr wrote: Thu Nov 30, 2023 7:14 pm Attached you find the log running with debug.
As soon as I have it all connected AND power on the QL, the logging hangs/stops. (As seen yb the log)
This could actually be a reason. If you have an oscilloscope, you could check on the COMMS_CLK line. A faulty Nano could also be a cause, so if you have a second one, you could swap it out and check whether that changes anything.[Edit:] I read on your project page to keep cables under 5cm, I have wiring that is longer (20cm from Arduino to Connector), I guess I should shorten them.
I shortened all cables, and remeasured them (no faults as far as I can tell).xelalex wrote: Thu Nov 30, 2023 9:07 pmFrom the log, we can see that the Nano is correctly flashed and serial communication works. However, it looks like there's tremendous noise at least on the COMMS_CLK line. When the QL idles, this signal should be low. However, the Nano repeatedly sees high at startup, which is why it erroneously detects your QL as a Spectrum (idle level is high there). After the initial sync it then constantly receives level changes an the COMMS_CLK line (that's all the CK CR OF DR messages), hence my suspicion about the noise.spkr wrote: Thu Nov 30, 2023 7:14 pm Attached you find the log running with debug.
As soon as I have it all connected AND power on the QL, the logging hangs/stops. (As seen yb the log)
What happens when you reset the Nano in this situation?
This could actually be a reason. If you have an oscilloscope, you could check on the COMMS_CLK line. A faulty Nano could also be a cause, so if you have a second one, you could swap it out and check whether that changes anything.[Edit:] I read on your project page to keep cables under 5cm, I have wiring that is longer (20cm from Arduino to Connector), I guess I should shorten them.
If I understood correctly, you attach OqtaDrive to the Microdrive edge connector of your QL. Are the two internal drives still present and both work, i.e. do they at least briefly spin up when doing 'dir mdv1_' and 'dir mdv2_' ?
EDIT: A broken COMMS_CLK line could also cause the observed effect. I remember seeing similar log messages when I forgot to plug in the adapter. COMMS_CLK is floating in that case and can easily cause this. So checking the cable for continuity would be another idea.
I would not advise hot-plugging the Arduino to the QL! Only connect it when the QL is powered down!spkr wrote: Thu Nov 30, 2023 9:20 pm What I do is:
- turn on the oqtactl wihtout the Arduino connected to the QL
- after its initialzied, I connecft it to the QL
- then I remove the usb from the Arduino
- reattach the usb to the Arduino
- I do dir mdv1_ (it lights up)
- i do dir mdv3_ (not found)
- I shut down daemon
Code: Select all
https://www.aliexpress.com/item/1005002966043359.html
Code: Select all
time="2023-11-29T14:29:14+01:00" level=debug msg=fragmentation best=925 ideal-best=924 ideal-worst=1020 strict=false visited=925 worst=1020 zero=13
time="2023-11-29T14:29:14+01:00" level=debug msg="no file changes"
time="2023-11-29T14:29:14+01:00" level=debug msg="CK 8 [ 00001000 ] - 632.589887ms"
time="2023-11-29T14:29:14+01:00" level=debug msg="CR 0 [ 00000000 ] - 4.058987ms"
time="2023-11-29T14:29:14+01:00" level=debug msg="OF 0 [ 00000000 ] - 3.376988ms"
time="2023-11-29T14:29:14+01:00" level=debug msg="DR 0 [ 00000000 ] - 4.183986ms"
time="2023-11-29T14:29:15+01:00" level=debug msg="ping from QL"
Code: Select all
#ifndef OQTADRIVE_CONFIG
#define OQTADRIVE_CONFIG
#define BAUD_RATE 500000
#define LED_RW_IDLE_ON false
#define LED_SYNC_WAIT true
#define RUMBLE_LEVEL 0
#define DRIVE_OFFSET_IF1 0
#define DRIVE_OFFSET_QL -1
#define HW_GROUP_START 0
#define HW_GROUP_END 0
#define HW_GROUP_LOCK true
#define FORCE_IF1 false
#define FORCE_QL true
// set this to true if you added the write protect boost circuit
#define WR_PROTECT_BOOST false
#endif
Code: Select all
[Unit]
Description=OqtaDrive Daemon
After=local-fs.target sysinit.target
[Service]
Environment=LOG_LEVEL=debug PORT=/dev/ttyAMA0 BAUD_RATE=500000 OLD_NANO= RESET_PIN=18 FQBN=arduino:avr:nano
ExecStart=/home/pi/oqtactl serve -d /dev/ttyAMA0 -b 500000
WorkingDirectory=/home/pi
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi
KillMode=process
[Install]
WantedBy=multi-user.target
Code: Select all
dmesg | grep tty
Code: Select all
pi@raspberrypi:~ $ dmesg | grep tty
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.en able_hdmi=0 video=Composite-1:720x480@60i smsc95xx.macaddr=B8:27:EB:1D:E7:30 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 console=t tyAMA0,115200 console=tty1 root=PARTUUID=6eb19e83-02 rootfstype=ext4 fsck.repair=yes rootwait
[ 0.001637] printk: console [tty1] enabled
[ 3.864306] 20201000.serial: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2
[ 4.872236] printk: console [ttyAMA0] enabled
[ 9.757494] systemd[1]: Created slice system-getty.slice.
[ 9.791218] systemd[1]: Created slice system-serial\x2dgetty.slice.
Code: Select all
sudo apt install screen
Code: Select all
sudo screen ttyAMA0 500000
What exactly did not work, writing the image or the automatic installation afterwards? The install process is very reliable, so I would be surprised if that didn't work. I don't know about the RaspberryPi image writer, standard image writer under Ubuntu Linux has been giving very good results so far.gozdniJezek123 wrote: Fri Dec 01, 2023 9:50 am I went the hard way, because i tried the image, written with the raspberry pi image writer, but it did not work even with multiple different SD cards.
I'd recommend using the latest official release until all works, then you could try development builds. Regarding the serial speed, I have used many different cheap Nano clones, and they were all capable of running the 1Mbps. They only situation where you need 500kbps is when you connect it to a BananaPi M2 Zero.I also tried to use the developer builds version but still no luck. I had to set the baud rate to 500000, because the default one was too much for my cheap Arduino to work properly.