STm32L4R5VG firmware upgrade in run time - upgrade

In my application, I am using STm32L4R5VG as a host MCU. I want to upgrade the firmware of host MCU in run time over USB through the Android mobile app.
I have looked into USB DFU mode, but in that case, my device will enumerate as ST USB and also I need to enable the boot loader with boot pin.
In actuality, my device will connect with the Android mobile app using the CDC class device and enumerates as VCP. So I want to send the firmware file from Android mobile to host MCU over VCP and write into Bank2 of internal flash (as current code is in Bank1). Once the file transfer is done, the device will reboot on its own and check for the latest firmware and boots from Bank2.
I am stuck at how to write at bank2 securely during run time and perform self reset to boot from Bank2.
If anyone already worked on this or know about this then please guide me or point to the link where I can get details for this.

Related

iPhone With Windows - New Bluetooth Pairing is requested when logging into Windows even though pairing has already been completed on iPhone

iPhone With Windows 10 Enterprise Via Bluetooth Low Energy (GATT)
Bluetooth pairing is requested when logging into Windows even though pairing has already been completed. After that, even if the pairing is done, pairing will be asked again at the next login to Windows every time when the Windows is restarted.
Our iOS app acts as a Bluetooth central and the other as a peripheral (Bluetooth Driver on Windows).
when the app is trying to connect using Bluetooth Low Energy (GATT) at step 5 as mentioned below, new pairing is requested from windows every time when the PC is restarted.
Steps to reproduce the problem:
log into Windows and connect the app to the Windows computer
See the paring request on Windows and on iPhone,
Pair on both Windows and iPhone
Turn off the Bluetooth toggle on iPhone and then turn it on
Restart windows and see the login screen
Start the app on your iPhone and try to connect,
See the paring request on iPhone
With the above steps, if this issue is not reproducible, try rebooting the iPhone instead of changing the Bluetooth toggle at S4.
we also observe the iPhone device is receiving this log from Windows:
default 15:38:27.555377+0530 SpringBoard Received request to activate alertItem: <SBUserNotificationAlert: 0x105916a90; title: Bluetooth Pairing Request; source: bluetoothd; pid: 88>
We observed that looks like the issue reproduces more consistently when the windows restarts or reboots.
On the pairing request alert dialogue on iPhone, If I press "cancel", the app disconnects from the peripheral (Windows). If I press "pair", the peripheral nothing happens. However, Windows continues sending me pairing requests whenever the machine is restarted or rebooted.
We did not observe this behaviour with the Android Device. Windows and Android work without any problem (i.e. No new Pairing is requested once the device is paired in any situation).
In the below screenshots, we could see that the iPhone is already paired in Windows Bluetooth Settings but the Paring is requested from Windows on iPhone to pair again and in the background, our app is successfully connected to Windows using Bluetooth Low Energy (GATT).
Environment:
Windows details
Edition Windows 10 Enterprise
Version 22H2
Installed on β€Ž 5/β€Ž5/β€Ž2021
OS build 19045.2486
Experience Windows Feature Experience Pack 120.2212.4190.0
iPhone OS - iOS 15.6.1 and 16.1.1
Is this a known bug with Windows 10 Enterprise?
Is there any way to get around this issue?
Sample Code to reproduce the problem on iOS:
Our iOS app acts as a Bluetooth central and the other as a peripheral (Bluetooth Driver on Windows)
Initializes the central manager with a specified delegate and dispatch queueself.cbManager = [[CBCentralManager alloc] initWithDelegate:self queue:bleManagerQueue];
Scans for peripherals that are advertising services to discover other Bluetooth devices, passing in the UUID of the service it’s searching for.
[self.cbManager scanForPeripheralsWithServices:(NSArray<CBUUID *> *)serviceUUIDs options:(NSDictionary<NSString *,id> *)options;]];
When the central manager discovers a peripheral with a matching service UUID, The method saves the peripheral as the property discoveredPeripheral and calls connect to it.[self.cbManager connectPeripheral:
[[self.currentConnection device] peripheral] options:nil];
Step 3, when trying to establish a connection to a peripheral, pairing is requested even though pairing has already been completed. After that, even if the pairing is done, pairing will be asked again at the next logon to Windows.
Is this a known bug with Windows 10 Enterprise?
Is there any way to get around this issue?
iPhone Already Paried
Pairing Request on iPhone from Windows
Is this a known bug with Windows 10 Enterprise?
Is there any way to get around this issue?

Raspberry PI ad-hoc configuration

I'm working on a project where i have two raspberry PI connected in ad-hoc mode. the project is for transmitting streaming data using UDP supported by a self developed ARQ protocol for reliable data transmission. the thing is that i want my 2 raspberry Pi to be synchronized! i tried to install the NTP server on one device and get the time on the other (as an NTP client) but when i wanted to reconnect them on ad hoc mode again, it was necessary to reboot the devices where the time was lost because the devices don't contain the hardware clock!
is there are any idea how to synchronize the two raspberry in ad-hoc mode ?
thank you!

How to sync Android device with eclipse

I have a Android device. How to sync with Eclipse for execute code directly in mobile not in emulator.
Just simply connect your phone via USB cable to your computer and run your application. Window pops up and you can choose then between connected devices. Make sure you enabled debugging mode in your device.

How do I use Xperia Ray through Eclipse for Android programming?

I downloaded the Suite for the phone, the Google USB drivers and the Phone's connection drivers. So far, the phone works perfectly with the PC but Eclipse still refuses to see the phone and Device Manager is convincing me that I have no hardware compatible with the Google USB drivers. Therefore the Google USB drivers are downloaded but not installed or assigned to any device. I followed every answer on stackoverflow that there is so far, but none have solved the problem.
First, set your device into USB / debug mode.
Second, after you connect your device to the USB make sure your drivers is installed properly.
And last verify that adb.exe can detect you device from cmd (if running in windows) ..(path to your SDK)\platform-tools\adb device
If last step fails, then re-install you device driver, it should be handled automatically by sony pc-companion for your xperia phone.
You also have to enable USB-Debugging in Settings->Developer Options on your phone.

Android 2.1 Superpad Tablet: can't connect Eclipse ADB to Superpad USB port

I am developing an Android app for a class I'm taking. I've been using the emulator to date. I know what to see if it runs on the real HW.
My PC runs Windows 7. I downloaded the latest google/Android USb driver. I have enabled the USB Debugging feature on the tablet already. When I plug the tablet into the PC via USB, the PC doesn't seem to see the tablet at all.
What do I need to do to get these two devices to see one another.
thanks,
wk
HI, I'm using superpad 3, and just have adb connection over ethernet, all you need is type cmd: "connect your.pad.ip" and then Eclipse will see your device.