Nordic nRF51 DK on Mac with CrossWorks - arm

On OSX with Rowley Associates CrossWorks what are the steps needed to compile and run a simple BLE UART sample code for Nordic nRF51 DK to an iPhone.
I found iOS and Android code here and am comfortable with that part: https://www.nordicsemi.com/Products/nRFready-Demo-APPS
But I am not sure how to get the toolchain setup and running on the nRF51 board. I've seen some directions for SDK 6.x but can't find anything for SDK 7.x.

This is how I got it to work:
Setup "nRF51 SDK"
unzip "nRF51_SDK_8.0.0_5fc2c3a_packs/nRF_SoftDevice_S110/NordicSemiconductor.nRF_SoftDevice_S110.8.0.0.pack"
Load "$nRF51_SDK_8.0.0_5fc2c3a/components/softdevice/s110/hex/s110_softdevice.hex" on nRF51 with RKNRFGO.app
In CrossWorks File->Import Project and select "$nRF51_SDK_8.0.0_5fc2c3a/examples/ble_peripheral/ble_app_uart"
5.in "Select Template" select "nRF51_EXE - ..."template list
Remove "retarget.c" from project (it is easiest if you build now so you get the error)
Select Project Item-> "Project 'nrf51422_xxac_s110'" in project explorer
In "Properties Window" scroll down to "Linker Options" and set "Section Placement Macros" to:
FLASH_START=0x18000
RAM_START=0x20002000
Also make sure Properties Window->Target Loader Options->Can Erase All is set to "No"
Select Build->nrf51422_xxac_s110...
9.5 Select Target -> Connect -> SEGGER J-LINK
Select Debug->Go
Now apps can connect to the nRF51 DK board
iOS app
Android App is the Android version.
Get the mobile app source code here.
See this post for more details.

Related

Can't run my vscode project on android emulator

Everytimes i'm trying to run "npm start" in my vscode i'm getting this error in metro bundler
"Error
02:07
Couldn't start project on Android: Error running adb: No Android connected device found, and no emulators could be started automatically.
Please connect a device or create an emulator (https://docs.expo.io/workflow/android-studio-emulator).
Then follow the instructions here to enable USB debugging:
https://developer.android.com/studio/run/device.html#developer-device-options. If you are using Genymotion go to Settings -> ADB, select "Use custom Android SDK tools", and point it at your Android SDK directory."
and in android studio's log i'm getting this error
"Emulator: Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release."
how to solve this issue? Thanks.

Need Local Database for Flutter Web Application

I have tried using SEMBAST as local database but it works only for android or IOS Not Web, but i have a requirement to use local database to store all my UI data and reuse it locally , so please help to solve it .
Below is my flutter doctor log :
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.14.2-pre.54, on Mac OS X 10.15.2 19C57, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.41.1)
[✓] Connected device (2 available)
• No issues found!
IndexedDB is the main solution for local database in the browser. You can use that or any solution on top of that (hive, idb_shim/idb_sqflite).

Official ADB drivers for mi a1

I have tried everything to install google camera on my mi a1 but due to problem of ADB drivers it does not show my device in attached devices list after running "adb devices" command.I have tried everything but it doesn't show my device in that list.plz help me
My solution in the end: install HiSuite !!!!
I have had problems installing the ADB driver for my XIAOMI Mi A1. At one point, the mobile device appeared in the PC device manager but did'nt have any driver.
I tried intalling the Mi PC suite but it coudn't access the device, asking to update the driver.
As suggested in the post mentionned below, I installed the HiSuite. Unexpectidly, it solved my problem. ADB is working now. Besides, HiSuite works as a PC suite for the Mi A1 and even allows now to sync with Outlook.
(see Google: techubber blogspot com 2017 02 mi-pc-suite-and-usb-connection-problems-device-not-connected )

How do you debug react-native when it is running on device?

How do you debug react-native when it is running on device ?
Figured our React Native debugging for Android. Steps to for someone struggling with this -
Launch your RN App
Shake device
Select "Dev Settings"
Select "Debug server host & port for device" Put in your system's IP address.
Shake device
Select "Debug JS remotely"
Chrome will open a new tab with the address "http://localhost:8081/debugger-ui"
If this doesn't happen, check your port and open a new tab and enter the above address with your port number.
Open #Chrome DevTools (Cmd+Alt+I on #MacOSX)
Select the Console Tab
Shake Device
Select "Reload"
View all your console logs or use "debugger;" in your JS for breakpoint debugging.
You have two options:
Debug remotely
iOS: Cmd + ctrl + z to open menu and select "Debug remotely"
Android: Cmd + M to open menu and select "Debug remotely"
Or run one of these commands:
react-native log-ios
react-native log-android
There are little hack in here for IOS.
In XCode open AppDelegate.m from project folder, comment the line with jsCodeLocation declaration and add near it something like this:
jsCodeLocation = [NSURL URLWithString:#"http://%YOUR_PC_IP%:8081/index.ios.bundle?platform=ios&dev=true"];
, where %YOUR_PC_IP% is IP of your dev machine on local net.
Then open project named RCTWebSocket wich located in Libraries folder and then open from this project file RCTWebSocketProjectExecutor.m. Next, comment the line with host declaration, then add near it something like that:
host = #"%YOUR_PC_IP%";
Almost done. Run app on your device with XCode and make sure that your IPhone can see your develop machin via internet.
After it launches make sure that node server is running (command "react-native -- --start" in root project folder) and open via chrome this page: http://localhost:8081/debugger-ui . Plus, option Debug JS Remotely must be enabled in your app on your IPhone. (Shake action, then tap in opened menu Debug JS Remotely, that is it.)
Now open dev console and have happy debugging.
2 options exist:
Remote debug: this would go over network, so it can be laggy.
Run app on device (install it whilst its plugged in)
Shake device (Android devices need to be vigorously shaken)
Press settings on the dev menu, and under Debugging, press Debug server host and port for device
Enter your debug server's IP address and port (usually 8081 unless you changed your settings of the debug server), e.g. 255.255.255.255:8081. Your ip address is the local IP address that your computer has. Ensure the device is on the same network. For mac users, open System Preferences → Network → Wifi → Under Status: connected, there is an IP address, use that.
You can unplug the device
Ensure debug mode is on (Shake device vigorously again, press Debug)
Wired debug: relatively better for slow connections
Install app on phone
If android, set up port forwarding with adb reverse tcp:8081 tcp:8081 and if iOS, follow the steps from RN docs)
Enable debug on device
If you are working on Visual Studio Code then you can install React Native Tools extension (provided by Microsoft) and debug your app like any other IDE.
Read all steps in detail in my this answer.

How Do I install an app on the ubuntu Touch device

I've been looking into Ubuntu Touch.
So I installed ubuntu on a Nexus 10 following the instructions here
I built the sample app following the instructions here
So now I have a device running ubuntu touch and an application, how do I put the application on the device?
You can use Qt Creator: Connect your Ubuntu Touch Device through usb open your project and simply press Ctrl+F12.
This works only if you have once installed ssh-server on the device.
Alternatively you can do it manually. Copy the necessary files (*.qml and *.desktop) to the device and start the application via ssh
qmlscene --desktop_file_hint=/usr/share/applications/qmlscene.desktop YourApp.qml
Source
Remember, this is all beta and if you are not a developer then you won't have much use for Ubuntu Touch at this stage. Eventually, Ubuntu Touch will have its own app store where it will be much easier to download apps and install them on your device.
If you are using the sdk provided by Ubuntu, then all you have to do is go:
Build -> Ubuntu Touch -> Install Application on Device
This will actually install the App instead of just running it. Now you can bring your prototypes with you =)

Resources