-
Notifications
You must be signed in to change notification settings - Fork 0
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
SW asks for Encryption Key, directions say Password... #4
Comments
You have a rev 0.8 hardware as far as I know. The radio encryption key is a short password, yes, specific to a sensor, different for every sensor |
Yes the sensor radio password will be on the sheet with the info.
The sensor UID is always a number. When prompted for it, you need to enter it without any preceding hash sign. What does
|
By the way: case is important (upper/lowercase), so password needs to be entered exactly as on the info sheet. |
pi@caniquepi:~ $ journalctl -f -u canique-radio-bridge No Decrypt failed messages. So I don't think it's getting any data from the sensor. Then went downstairs last night and got a fresh Duracell from a brand new package. Same lighting of the LED, but no data. The sensor is sitting on that same mouse pad that I took the picture of the raspberry pi, so shouldn't be a noise or distance issue. Thoughts? |
Backing up in the journal, here's the full top of the log (so it "looks like" the gateway started ok) Mar 20 16:02:39 caniquepi systemd[1]: Started Canique Radio Bridge. |
BTW, The password which I entered was from the paper and is all upper case. |
Oh and just FYI the values in the dialog are Danish (which I suspect makes sense for you :-) ) Google translate let me know what you were intending... but it didn't pick up the US English set up of the Raspberry Pi. |
"Gateway Module initialized" is missing. I'll give you some instructions tomorrow... |
I have a local NTP stratum 1 server in my network. I'll try updating the local config (as I have for other Pi's) to use that.... |
I'm going to try to reproduce the problem on a Raspi3B tomorrow with fresh OS (no manual changes), same radio hat revision, with coin cell installed/removed. NTP seems ok - the linux command "timedatectl show" is internally run and evaluated. "NTP synchronized: True" is output if the command outputs "NTP=yes" and "NTPSynchronized=yes". Some output is missing, though. E.g. "Success setting date/time.", "Gateway startup counter xxxx" |
FYI, my time set up normally uses NTP, so that mucked up stuff.... and got it to were it was failing like the 3B+ Mar 21 23:57:13 caniquepi systemd[1]: Started Canique Radio Bridge. Still no Gateway Initialized, but does dhow Gateway Module started up. Could I have gotten old code from Github? |
Ok, another piece of data. On the last two restarts, it initially fails but if I restart it, it provides the output as above... It first outputs : Then after a restart the output from previous comment. |
Correction... right now it's not starting... so I'm confused... |
Something with your UART is not working. I have just taken a Sandisk Ultra 16GB A1 SD card, installed Raspberry OS Lite 32 Bit on it, then ran the setup instructions 1:1 on a Raspberry 3B, and had no troubles. There are some differences though
I will upload exact instructions of what I did, and also upload an image of the SD card in the course of the day, so you can clone it 1:1.
Good question. Please run
|
This is the output after booting up, after the hat has been physically attached. Command: Mar 22 12:43:44 raspberrypi3 systemd[1]: Started Canique Radio Bridge. |
after a restart of canique-radio-bridge, the output looks like this: Mar 22 13:01:14 raspberrypi3 python[919]: RSSI threshold -98 |
This is the extended installation procedure describing everything step by step: I also tested the radio hat with coin cell inserted now, did a reboot, no troubles at all. |
As promised, the image: https://resources.canique.com/radio-hat/raspberry-pi-os-lite-radio-hat-0.1.img This image (hope I extracted it properly from the SD card) is the OS I've just used during my tests. While testing this image, please run no other commands before checking whether the communication with the radio is working okay. A short intro how to install this image:
|
Ok, replying to comments, 1:1. Checking code:
So looks identical. |
I'm downloading and will do the initial install. I've always been running with a battery installed.... is this set up without the battery? (at least I'm going to start with no battery). I'll be using Raspberry Pi Imager v.1.7.4 to flash the SD card. (it's a Microcenter branded card, but I've used them without any issues for years). It's a 64GB card. I'm on a Mac, just FYI.
checksum looks right. Flashing now (have a work call, so will send this for now...) |
Ok, just finishing these steps (call got delayed 15 min :-) )
Logged in. FYI, Wifi is off, on mine it was on. (from login note : Wi-Fi is currently blocked by rfkill) So running command (#7) I've checked the antenna (did that last night) -- Nothing seems to be wrong there. Didn't do anything (command wise) except logging in and then running the journalctl command. Going to try to reboot (in case this was a situation of needing the reboot after first start) Nope, identical output from journalctl command. Also checked the cable from hat to antenna and re-seated it (it seemed to be connected just fine). Let me dig around and see if I have another RPi 3B..... but so far, nothing obviously wrong with this one. (I even just removed a heat sink that was underneath the board... visually I didn't see it touching anything... at worst the outside of the black battery connection but that's plastic... I'm running without battery, please confirm that's correct. |
The WiFi note is fine, I saw the same msg on my setup. The fact that it does not get any data from the hat is abnormal. If you can get another 3B - perfect. Another important note: My Raspberry was on a thick sheet of paper e.g. |
Ok, on another RPI3B, I moved stuff over, and first boot had the same problem. Did a restart of the service and got this output : Mar 22 20:20:49 raspberrypi3 systemd[1]: Started Canique Radio Bridge. In your first startup you had: Mar 22 12:43:49 raspberrypi3 python[634]: NTP synchronized: False I noticed that my Pi has a date of 2023. Yours had 1900. pi@raspberrypi3:~ $ date So, going to try to set it to 1900 and restarting...(no luck, the time sync updates too fast) |
FYI This section is what I see as different : Mar 22 12:43:49 raspberrypi3 python[634]: NTP synchronized: False In reviewing this output, I see that it doesn't set system time because HAT time is old. We both see the same BOLD line, but mine never goes past that. Even after changing the RPI board. Is there anything in the firmware that has any sort of check before the line afterwards? |
My concern is the pad under the Raspberry. Like I said, to me this seems like a hardware issue. That your raspberry time synchronizes fast, is okay.
You misunderstood that. Raspberry requested the date from the hat, which was found invalid. The 1900 came from the hat because it had no battery. Then it starts with 1900. My most important question is: What is underneath your Raspberry right now? Did you try it with a sheet of paper or a book? |
Maybe this will make a difference. |
Ok, some progress (but absolutely NO idea why) I did get this in the Journal : Mar 22 20:42:33 raspberrypi3 systemd[1]: canique-radio-bridge.service: Consumed 1.316s CPU time. I'm not sure if it just woke up after a while or what... I'm going to try removing the battery from the sensor to see if it reconnects. (This all happened while I was trying to enter MQTT info to see if that gave me any more info.... and had a typo in the password '&' which caused some weird behavior as it tried to background the command with not all of the password... doh!). Can you perhaps generate a version with more debugging output so perhaps we can sort this out? |
BTW, this new one is in a plastic case bottom. I'll try another power supply... |
BTW My hat doesn't have a battery either but I don't get the 1900 message... |
Ok, so we have success! I'm seeing amber light on a bunch and data in the console.. |
So, what should be my next steps? Put in battery? Change locale? |
This is perfectly normal. Your Raspberry syncs the time fast from the NTP server -> hence it does not try to get the time from the hat but instead transmits it to the hat. |
I have no explanation for this.
Any ampersand in a command (starting a background process) would be gone after the next reboot... |
Yes. Both should be fine. You can also expand the filesystem - #4 (comment) - step 8. You can run step 6 from https://github.com/canique/gateway/tree/main/raspberry-pi-radio-hat (setting up cloud connection if not already done). |
My current guess, is still, that it was a hardware issue. Maybe some electrical charge that build up somewhere where it should not be. see: Mouse pad static charge What you can try is: reboot. shutdown. disconnect power. Start up. Just to see if that error ever comes again.
|
There's a pre-release available now: canique-radio-bridge 0.8.4 Following things have changed
The log output looks like this now: Mar 23 14:29:06 raspberrypi3 python[1999]: RSSI threshold -98 ... |
Yesterday I mentioned the Gateway startup counter being low. So, again, this seems to have been due to UART communication problems. Like the missing "Gateway Module started up" at the beginning. |
Possible causes for the troubles so far:
This would explain why the problems were suddenly gone. With the newest software release -at least at startup- (until "Starting serial interface RX...") a race condition is impossible. This means: If, after installing the latest release, the message "Gateway Module started up" does not appear - even if it's a single time, then this is a clear indication that there is a hardware issue or some fundamental issue with the Raspberry's UART. |
Other possible cause: Overtemperature or Undervoltage, see raspberrypi/linux#4123 You could run
Not necessarily. If you have an undervoltage condition, then everything would make perfectly sense having a bad power supply as the cause. This would also explain why the 3B+ causes more troubles - because it consumes more power and is more demanding to the power supply. Basically: the PI must not change its core frequency, otherwise the UART baud rate will be wrong, and received data will be garbage. When I run |
Just to confirm, with new psi, I get So I think we're all good. |
For the sake of clarity: Basically this issue belongs to #2 It's all part of the same problem: Broken Raspberry UART because of (most probably) undervoltage. Your output looks okay. Another quick fix (although not proper) would have been to tell the Raspberry to have a fixed core frequency (core_freq=... in config.txt) I'm closing this issue. |
In adding the first (and only) sensor I have, it's asks:
sudo -u cnq canique-sensor-keytool set
You will be asked for the sensor UID and the sensor radio password. Repeat this step for every sensor you want to connect.
However, on the screen it asks :
i@caniquepi:~ $ sudo -u cnq canique-sensor-keytool set
Enter UID (number): XXXXX
Enter Radio Encryption Key:
Is Encryption Key Password? (that's what I entered, but not sure if it's correct...)
The text was updated successfully, but these errors were encountered: