Read , write and notify ble cc2540 ti - core-bluetooth

in cc2540 ble can read,write and notify options can be enabled at a same time? i only tried notify options.
is there any guidelines to be followed.

yes,the cc2540 read write and notify can be enabled at a same time
guidelines

Related

Sending Bluetooth Advertising Packets and Getting Some Answers

I want to build something with Raspberry Pi Zero and write in Go,
I never tried bluetooth before and my goal is;
Sending a dynamic packet which it will change every second, an iOS app will expand this message and with a button, client will send a message back without a connection.
Is Bluetooth Advertising what I am looking for and do you know any GoLang library for it? Where should I start?
There are quite a lot of parts to your question. If you want to be connection-less then the BLE roles are Broadcaster (beacon) and Observer (scanner). There are a number of "standard" beacon formats out there. They are summarized nicely on this cheat sheet
Of course you can create your own format as these are using either the Service Data or Manufacturing Data in a BLE advertisement.
On Linux (Raspberry Pi) the official Bluetooth stack is BlueZ which documents the API's available at: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc
If you want to be connection-less then each device is going to have to change it's role regularly. This requires a bit of careful thought on how long each is listening and broadcasting as you don't want them always talking at the same time and listening at the same time.
You might find the following article of interest to get you started with BLE and Go Lang:
https://towardsdatascience.com/spelunking-bluetooth-le-with-go-c2cff65a7aca

WinRT/C++ issue with concurrent MIDI and BLE communication

My team has been struggling with a pretty strange issue while using the WinRT/C++ APIs for Windows to connect to both a MIDI port and receive BLE notifications through a proprietary service on the same device.
The WinRT/C++ library itself is really nice and provides easy and modern C++ interfaces to access the managed Windows runtime classes.
I've pushed a sample repo to Github where we've replicated the issue with a minimal example.
The repo's readme goes over the problem in detail, but I'll post the relevant bits here for completeness.
The sample program is performing roughly these steps:
Check for available MIDI devices using a DeviceWatcher.
Check for available Bluetooth LE devices using another instance of a DeviceWatcher.
Match discovered MIDI and BluetoothLE devices on their ContainerId property (see DeviceInfo for details). This is the method JUCE employs in the native WinRT code for their library, and works as expected.
Open the MIDI port and attach a handler to the MessageReceived event (see the code).
This causes the system to create a connection to the Bluetooth LE device. The program detects this state change, creates a BluetoothLEDevice, we perform GATT service discovery and attach a handler to the ValueChanged event for the characteristic we're interested in notifications from (see the code).
The program then counts how many MIDI messages are received on each port and how many BLE notifications are received from the corresponding device.
The behaviour we notice is that data from the most recently connected device streams just fine, while the throughput for the others is severly limited. We are at quite a standstill regarding this issue, and are not sure where the problem may lie.
We are at quite a standstill here. I'd be more willing to accept it if all the devices would exhibit this behaviour, but that's not the case. Is there any reason that creating both a MidiInPort and an BluetoothLEDevice from the same peripheral should cause this issue?
A BLE radio can only receive or send at any given time. And therefore only communicate with one device at any given time. It uses a scheduler to allocate radio time for every device when you have many devices. That way a second connection can "interrupt" a connection event from another device, decreasing the throughput for that device. See https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/multilink_scheduling/central_connection_timing.html

is it possible to lock Sim Card Using Gammu

Please help, i need information how to lock my SIM card.
For security purpose i want to lock using new PIN Code.
I operate sim card using modem and access it with gammuservice. Is It possible lock simcard using gammu. if it is not, any bode can explain the alternative. I need lock it programmaticly
thanks for any advice
If you know PUK code, it should be possible using:
gammu entersecuritycode PUK currentpuk newpin
See documentation for more details: https://wammu.eu/docs/manual/gammu/index.html#cmdoption-gammu-arg-entersecuritycode

How to connect to beacon by android beacon library and change beacon's data fields

I use this sdk: http://altbeacon.github.io/android-beacon-library/samples.html
My app already detect all beacons (AprilBeacons), I can get all info from beacon. BUT I should change major\minor, etc. fields and I don't know How to connect to beacon and save new data.
I create new beacon builder like:
Beacon changedBeac = new Beacon.Builder()
.setId1("2f234454-cf6d-4a0f-adf2-f4911ba9ffa6")
.setId2("1")
.setId3("2")
.setManufacturer(0x0118)
.setTxPower(-59)
.setDataFields(Arrays.asList(new Long[]{0l}))
.build();
So How to send new beacon information to selected beacon?
Unfortunately, the library will not work to do this.
The problem is that there is no standard for configuring identifiers of hardware beacons, only for detecting beacons and transmitting beacons. Every hardware beacon manufacturer has a different way of configuring beacon identifiers. Some manufacturers have an app that configures identifiers, some have a proprietary SDK. Some manufacturers do not allow it at all.
If you wish to configure an April Beacon, check with the manufacturer for instructions.
The APIs you mention above are designed to make an Android 5+ device transmit as a beacon. They do not configure external hardware beacons.
If you are using CC2540 or CC2541 as beacon you can send AT commands to the device like
AT+MARJ0x1234 Set iBeacon Major number to 0x1234 (hexadecimal)
AT+MINO0xFA01 Set iBeacon Minor number to 0xFA01 (hexadecimal)
AT+ADVI5 Set advertising interval to 5 (546.25 milliseconds)
AT+NAMEYOURNAME Set HM-10 module name to YOURNAME. Make this unique.
AT+RESET Reboot over bluetooth from your phone in string format without any delimiter or line break i.e \n
and make sure the device is in connectable mode or else it won't work

How to monitor a device with SNMP

I've been given a task to write some code to notify administrators if the device sends a trap. Also I'd like to be able to check upon the device as well.
I'm not so sure where to begin. Is there a test server online where I can test if I setup the device correctly? (Whether it send traps according to the condition I set?)
If I were to write code to monitor this device, I think I should learn how the snmp and mib files work exactly. Is there good summary and reference for me?
Is there some simple example code for snmp?
download any trial based S/W to receive traps on your system like LoriotProV6 or SolarWids.
In windows based sys open run evntwin.exe n select ur preferred options to generate traps like SNMP.
Here you need to check for Trapping column if it says "Yes" then only select it..
or else it wont mean any thing.
then click add run ur SNMP services.
To rum SNMP services go to control panel-> Add/Remove -> Add/Remove Windows component -> check Management & Monitoring click on details n check SNMP & WMI options.
now go to control panel-> Administrator tools -> Services -> search SNMP services n& start it.
You can consider 2 basic ways to check whether the device of interest generating/sending out SNMP traps.
You can just run wireshark on the device (if possible) or on the target server (where the traps supposed to arrive). Then you can filter the traffic using default SNMP ports. For example it could be one of the following: 161, 162, 10161, 10162.
You can install a MIB browser on the target server and see if any traps arrive. There are number of available free applications on the web.

Resources