Enroll MCCGQ12LM (Aqara Door & Window Sensor T1) - wireshark

Has anyone successfully enrolled a MCCGQ12LM into a custom coordiantor? I would love to look at some logs, or get some guidelines.
I'm trying to enroll my MCCGQ12LM into my CIE, and after writing the CIE address to the CIE Address attribute, i get the ZoneEnrollRequest which i reply with a ZoneEnrollReponse. Everything seems to look correct on wireshark:
[Zone Enroll Request][1]
[1]: https://i.stack.imgur.com/wUwwe.png
[Zone Enroll Response][2]
[2]: https://i.stack.imgur.com/jX5cR.png
But if i read the ZoneState attribute afterwards, it is still marked as Value: 0x00 [NotEnrolled].
The same process has been tested on a Samsung Multisensor, and works perfectly.
Thank you

I figured it out, you have to include a payload in the Zone Enroll Response, with the Enroll Response code, and the Zone ID.

Related

What is the format of the optionsFile for the IotFDevice class in Quarks?

The IotfDevice Class in Quarks has a constructor with an optionsFile. What is the format of this file and what are the necessary values?
The options file has five values: org, type, id, auth-method, auth-token. This is an example of mine with the values obfuscated.
[device]
org = 4pj4r4
type = rustQuark
id = rustIIa
auth-method = token
auth-token = 8jLWEY(P4SVJl5oi!V
When you register a device the set of values are issued, details and examples can be found here.
A little context.
Internet of Things Foundation (IoTf) is an infrastructure for application's to communicate with devices. IoTf requires that you register the application and all
devices that send data to the application.
Why would you use IoTf? Getting the communication setup between devices is
a pain: firewalls, retry, failover, QoS, debugging, monitoring. This is facility especially nice if you're doing a proof of concept.
For a better description of IoTf look here.

How to read magnetic card data?

I work with the magnetic card reader "MiniMag II" (ref. IDMB-334133B and datasheet here) on Windows 7. A driver has ben automatically installed, adding the card reader as a standard input device to Windows recognized devices.
When I swipe a card in the reader, card data is sent to the pc and written in the current window.
My problem concerns the card data format : I receive strings such as "méà(è&('&_é"(à&&à=àààààààààààààààààààà§", do you recognize a format here ?
I am not aware of the exact data format, but I know that the following numbers are included in their corresponding card data :
412835 : méà(è&'&é_"(à"&é-=&çà"'àçà(&àààààààààà§
418559 : méà(è&'&_((çà'&&-=&(&à'&'&à&àààààààààà§
2989449 : méà(è&éç_ç''çà&&à=àààààààààààààààààààà§
5418235 : méà(è&('&_é"(à&&à=àààààààààààààààààààà§
Do you have any lead to help me to understand how the received card data is built ?
Thank you
I found the solution, my system was in AZERTY mode and the reader input me QWERTY data... so when I changed the settings I have obtained the numbers I was looking for. Hope it can help someone.

Where does iTunes keep the "trackid" for files which reside on iCloud via match

Goal is to update audio metadata with iTunes store for files which only reside on the iCloud.
I found a handy Ruby script which would perform the task if the file was re-downloaded locally http://cl.ly/C3kK
The script enlightened me to the itunes store api, however, I still need the itunes store trackId which is not to be confused with the local/internal trackId or persistentId. The above script reads in the first MB of the physical audio file looking for a magic number and storing the subsequent integer. I peeked at the itunes music library.xml with no luck. Itunes is storing this information somewhere I would think. Or at least the another ID can be used to retrieve the metadata from the iCloud.
In the end I would simply update the itunes music library.xml with the results from the itunes store api.
I realize there are iCloud iTunes api calls, but before I delve into that subject I would rather post a question to the experts.
Any help on the subject would be amazing.
I know it's been a while since you posted this question, but I encountered the same issue you had and was able to figure it out. The iTunes store trackId is stored in the downloaded version of an iTunes matched file. If you grab the first 1024 bytes of data from the file, the track id is the first 4 bytes of data after the string 'song'. You'll need to convert it to a decimal from a signed 32-bit integer.
Example: No Cars Go (Arcade Fire)
file_string = File.open(path, 'r').read(1024)
index = file_string.index('song')
#iTunes_id = file_string[index+4,4].unpack('N')[0]
print "Song ID: #{#iTunes_id}"
Results in:
Song ID: 81607936
Now, you can take that ID and look up the track data from iTunes:
https://itunes.apple.com/lookup?id=81607936&country=US
Results in:
{
"resultCount":1,
"results": [
{"wrapperType":"track", "kind":"song", "artistId":23203991, "collectionId":81607965, "trackId":81607936, "artistName":"Arcade Fire", "collectionName":"Arcade Fire EP", "trackName":"No Cars Go", "collectionCensoredName":"Arcade Fire EP", "trackCensoredName":"No Cars Go", "artistViewUrl":"https://itunes.apple.com/us/artist/arcade-fire/id23203991?uo=4", "collectionViewUrl":"https://itunes.apple.com/us/album/no-cars-go/id81607965?i=81607936&uo=4", "trackViewUrl":"https://itunes.apple.com/us/album/no-cars-go/id81607965?i=81607936&uo=4", "previewUrl":"http://a644.phobos.apple.com/us/r1000/060/Music2/v4/ba/95/be/ba95be41-4a03-4dea-2965-57dd5f0b66c0/mzaf_6092501386391248238.m4a", "artworkUrl30":"http://a5.mzstatic.com/us/r30/Music/y2005/m10/d01/h10/mzi.yfrupnuj.30x30-50.jpg", "artworkUrl60":"http://a2.mzstatic.com/us/r30/Music/y2005/m10/d01/h10/mzi.yfrupnuj.60x60-50.jpg", "artworkUrl100":"http://a5.mzstatic.com/us/r30/Music/y2005/m10/d01/h10/mzi.yfrupnuj.100x100-75.jpg", "collectionPrice":6.93, "trackPrice":0.99, "releaseDate":"2005-01-10T08:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":7, "trackNumber":3, "trackTimeMillis":364071, "country":"USA", "currency":"USD", "primaryGenreName":"Alternative", "radioStationUrl":"https://itunes.apple.com/station/idra.81607936"}]
}
I hope this helps the OP or anyone else, I wasn't able to find this information anywhere else.
I know it's been a while since you posted this question, but I encountered the same issue you had and was able to figure it out. The iTunes store trackId is stored in the downloaded version of an iTunes matched file. If you grab the first 1024 bytes of data from the file, the track id is the first 4 bytes of data after the string 'song'. You'll need to convert it to a decimal from a signed 32-bit integer.

MonoTouch Way to get Own phone number and Sim Id(SSID)?

Im stuck to get own phone number and Sim ID (SSID) using Monotouch
I tryed:
var v = NSUserDefaults.StandardUserDefaults.ValueForKey((NSString)#"SBFormattedPhoneNumber");
var t = NSUserDefaults.StandardUserDefaults.ValueForKey((NSString)#"ICCID");
new UIAlertView("Ur phone Number",""+v.ToString(),null,"Ok",null).Show();
new UIAlertView("Ur ICCID",""+t.ToString(),null,"Ok",null).Show();
and all other ValueFor***
it always return null or " "
Tried on iphone 3g. Please help.
Apple does not want to to access this information as it can easily be misused. Any application doing so is likely to be rejected from the AppStore. See the comment (with more than 30 up votes) from this answer.
Also note that your code above does not read from the SIM - it reads from the iTunes registration data, which does not have to be set to any value (i.e. you can't trust it).

Does CTCarrier mobileNetworkCode change when roaming?

The documentation states for CTCarrier's carrierName "The value does not change if the user is roaming; it always represents the provider with whom the user has an account."
It does not say the same about mobileNetworkCode however. Does this change based on the current carrier or does it remain constant too?
I am trying find if the phone is roaming in a startMonitoringSignificantLocationChanges callback so would like to avoid geolocating.
I'm roaming right now - in Switzerland on an AT&T iPhone 4 on Swisscom. Just wrote a quick program to test. Here's what I got:
2011-04-29 09:01:55.657 test[2094:707] Carrier Name: AT&T
2011-04-29 09:01:55.665 test[2094:707] ISO Country Code: us
2011-04-29 09:01:55.669 test[2094:707] Mobile Country Code: 310
2011-04-29 09:01:55.678 test[2094:707] Mobile Network Code: 410
So, to answer your question, doesn't look like mobile network code changes (410 is AT&T as cited below)

Resources