STM32: Unable to successfully load BLE firmware because of FUS_IMAGE_NOT_AUTHENTIC so my code is failing in SHCI_C2_BLE_Init() - bluetooth-lowenergy

I have a custom board with an STM32WB55CEU (512K Flash) that is failing to start the BLE stack on CPU2 in the function SHCI_C2_BLE_Init(). I believe it's failing this function because it failed to load the BLE firmware (stm32wb5x_BLE_Stack_full_fw v1.13.0) correctly. Whenever I try to load the firmware I get an error at the end saying FUS_IMAGE_NOT_AUTHENTIC or FUS_STAE_IMG_NOT_AUTHENTIC depending on whether I try it from the command line over USB or through the GUI over SWD. I can delete the firmware image without error and my FUS appears to be up to date and running before I attempt the update.
Firmware Update Screen from STM32CubeProgrammer
Security Configuration Option bytes
I've also tried deleting the firmware by changing the RDP register from AA to BB and back. I still get the authentication error. This only happens on about half of the boards that I've loaded (13 out of 25). I feel like there is an address of setting somewhere that I'm not setting correctly and since all of the other posts I can find on this issue use the Nucleo with the 1MB flash part I'm not sure if my parts settings should be different. I am putting the FUS and BLE firmware at the correct address for my part according the v1.13 release notes.
Any help to get past this authentication issue would be appreciated. Thanks.

Related

NRF BLE chip, with bonding - bt-agent in NoInputNoOutput mode can't "forget" device

First little project at a new place and I'm having some trouble - hoping I can get some ideas. We have a BLE device using an NRF chip one which we've just enabled security and bonding. We're hoping to get our linux test fixtures set up so that the devices can be paired and bonded without the operator needing to accept the bonding request for every device. In the field, the end user will need to bond a device to a smartphone at least once.
I set up an agent using bt-agent --compatibility=NoInputNoOutput as described here:
https://www.kynetics.com/docs/2018/pairing_agents_bluez/
The bonding worked wonderfully without user interaction on my linux desktop (Ubuntu 20.10). Problem is, when I remove the agent, I had hoped that the bonding process would return to normal. It does not - it still doesn't require user interaction to establish the bonding. A similar operation completed from my Android phone works as expected after I "forget" the device.
I'm looking for more ideas as to how to reset the bonding/pairing of this device on my linux computer such that I can easily trade back and forth between needing user input and not (for testing and demonstration purposes). I've tried the following:
Remove the cache entry for my device in /var/lib/bluetooth//cache
Remove the device using bluetoothctl => remove aa:bb:cc:dd:ee:ff
Remove all agents using bluetoothctl => agent off (until no more agents remain)
probably some other things that aren't coming to mind right now
Regardless, the device automatically bonds when I click it in my Bluetooth list (or choose to connect in bluetoothctl). Any other thoughts on how I can return my linux box to a state where it's requiring user interaction for the bonding process?
thanks a million
I would expect Remove the device using bluetoothctl => remove aa:bb:cc:dd:ee:ff to have removed the device and the bond information.
Which leads me to suspect that your agent is still running in the background and being triggered on the request to do the pairing/bonding. My assumptions is that the agent registered by bt-agent would be unregistered when bt-agent exits. Could the bt-agent script still running in the background? Is the agent not unregistered on exit?
I don't have bt-agent on my system as it doesn't seem to be part of the standard BlueZ offering so I can't reproduce the issue. To get more debug information when pairing and exiting bt-agent, have separate terminals open with the following running to get more visibility of what is happening:
bluetootctl
journalctl -f -u bluetooth
sudo busctl monitor org.bluez
sudo btmon

Raspberry Pi 3 Model B (Android things OS) Error: Failed to open /dev/ttyAMA0: No such file or directory

I am a beginner in Android and testing Android code in which I am receiving and sending data through UART communication.
Hardware for communication- MAX232 device which is connected to Raspberry Pi3 Model B and the other part of MAX232 is connected to Vending Machine Port(Rx,Tx,Gnd to communicate my android app with the Vending Machine). My communication breaks SPORADICALLY and then starts communicating.
I do not know what the reason is
If anyone can help me in this, please suggest. Or any other information will be needed,I will share
private static final String UART_DEVICE_NAME = "UART0"; // define in my code.
**
I have to use ttyAMA0(PL011 UART) port because baudrate does not
change with the core frequency like with ttyS0(MIniUART)
**
For example: If I send 100 commands one by one, I get 2-5 times this
error.
**
> ERROR: Failed to open /dev/ttyAMA0: No such file or directory
**
Same thing happens to me reading data. I do not talk to the device (particle photon) connected to it, just listen. Since i'm expecting a response frequently, anything more than a couple seconds means things have gone south on one side or the other. It didn't seem likely though that my photon code was bad, as I had done many day-long tests with other things reading the data (arduino IDE, whatever).
Anyway, I created a runnable that fires every few seconds and checks when the last received response was. If it exceeds 60 seconds (things are most certainly wrecked and not going to get any better), I'll attempt to start up the connection again (Periperhal manager's openUartDevice). The main code waits another 60 seconds before trying again if it still has not received a response.
I also added code in 'onUartDeviceError' to trigger a callback the second that goes bad (not really sure if that's ever been the culprit in this), which will attempt the same restart logic but with a much smaller wait (like 5 seconds).
Lastly I made the Pi reboot itself (and thus the attached photon) so everything starts fresh, every morning at 6am. This has solved the issue for my purposes and its been in service for somewhere in the neighborhood of two years. Due to this reliability issue I don't do anything important with the pi, it simply exists to aggregate data from a few places and provide JSON. The photon is much more reliable even if the pi stops listening to it, so it controls the important/dangerous stuff (heaters, lithium batteries). Hopes this helps a little, but maybe some reconnect logic would solve the problem.

Problem with my block diagram: Error 5002 occurred at Init.vi

I'm making a heart rate analyze, but I'm having a real problem with that. When I'm press to start the programm doesn't work, so, I've press to stop the running program and it shows me in the section where it's ready to close or finish the connection:
Error 5002 occurred at Init.vi. Unable to establish connection with
Arduino. Please ensure that you have selected the correct COM port
and that you have flashed the Arduino with the correct firmware.
This error code is undefined. Undefined errors might occur for a
number of reasons. For example, no one has provided a description for
the code, or you might have wired a number that is not an error code
to the error code input.
Additionally, undefined error codes might occur because the error
relates to a third-party object, such as the operating system or
ActiveX. For these third-party errors, you might be able to obtain a
description of the error by searching the Web for the error code
(5002) or for its hexadecimal representation (0x0000138A).
This is my VI diagram:
And this is my control panel:
And the connections to my arduino:
So:
how can I solve this problem?
Where can I find more information to get this
Thanks for your help, but I'm new on this world (Arduino and Labview)
Follow the suggestion given in error message. First of all, make sure that you could communicate with Arduino using some simple serial line terminal, like RealTerm, or HTerm. In case if you couldn't send any command using serial line terminal, check out which firmware do you have on Arduino.
This is the way, how you could troubleshoot this issue...
You can ignore the second and third paragraphs of that error message; they're generated because the Arduino VI's you're using are generating a custom error code that they haven't registered with the LabVIEW development environment, so its automated error handling doesn't know what they mean. The information you need is in the first paragraph though.
As kosist's answer says, the first thing to check is that you can communicate with the Arduino at all. Before you even start with LabVIEW, have you tried using the Arduino IDE to program your device with a simple program like the 'blink' example?
If that works, then the next step is to make sure you've programmed your Arduino with the firmware it needs to communicate with the LabVIEW VIs you're using (can you link to where you got them from?) and then try a much simpler test program in LabVIEW - again, just get the Arduino to do something simple like turn the buzzer on and off. If you hit a problem with any of those, I suggest asking a new question with details of exactly what you tried and what errors you saw.

How to make a CSD call from modem

I recently bought a modem that supports CSD (Circuit Switched Data) calls. I put SIM card in it and I am able to make calls via AT commands. But these are always VOICE calls. I have another modem and I need to connect to it via CSD.
I know it is possible because our colleagues are using it this way to access some network.
They are using windows dial-up connection, but I guess that is just something that in the background calls the AT commands.
Nevertheless the dial-up is still giving me "Error 678: Remote computer did not respond". I have tried many settings, but still the same error. I even tried different computer and still got the same error.
So I found out that when I call CSD, then on the receiving side (if AT+CRC=1) it should display +CRING: REL ASYNC. So I setup another modem and called it and it showed +CRING: VOICE.
So how do I convince my modem to call in the REL ASYNC mode?
I already tried:
AT+IPR=115200 or AT+IPR=9600
AT+FCLASS=0 (this is default though)
AT+CSNS=4
AT+CBST=7,0,0 or AT+CBST=71,0,1
AT^SXRAT=0 (this changes the network to GSM)
But still when I do ATDNUMBERIWANTTOCALL; the receiving side shows +CRING: VOICE.
Also my mobile provider ensured me, that the CSD technology is still supported in my country and that I do not need any kind of special SIM card.
You need to remove the semicolon after the phone number in the ATD command: that semicolon is what tells the modem to make a voice call rather than CSD.
Check with your teleoperator does your sim card have separate data number.
Sometimes postpaid (and/or M2M) cards have three different numbers
1. voice
2. fax
3. data
In the end the number could be called normally like it is written in the question, but it only worked in Germany, not abroad...

Error: "job pending on /dev/sda1" when plugging in USB device

On my raspberry pi running raspbian (unix based i think) I get this error "job pending on /dev/sda1" every time that i plug in my USB flash drive. from my research it has something to do with mounting and un-mounting the device but I'm new to command line and most other posts are over my head. What do i do to fix this error?
if it matters i'm running a script on the pi that writes to that flash drive
Your desktop (LXDE for Raspberry Pi) has spotted that you have inserted a USB disc and has tried to mount it. You can enable or disable this behavior by editing the file ~/.config/pcmanfm/LXDE-pi/pcmanfm.conf and changing the line
mount_removable=1
to set '0' instead.
You would get that error if there were more than one thing trying to mount your USB disc at the same time. The second to run will notice that the first has already started a job to mount the disc.
Are you running two copies of your desktop GUI? (You may not realize that you are, but if you have a VNC or XRDP service you probably will be.)
If that is the cause of your problem (and probably in any event) the message is harmless. Something will have mounted your USB disc (perhaps you can even see it in /media?) The only infelicity will be that your desktop won't show you the results (e.g. by displaying the drive in a file manager.)

Resources