Raspberry Pi 3 can't connect to iOS' Personal Hotspot - ios

I'm currently working on an iOS app which needs to pair to a custom external device (smart camera relying on a Raspberry Pi 3) to work correctly. The pairing mechanism is currently based on WebSockets, so the app and the camera needs to be on the same network to be discovered and work correctly.
For now, when both the app and the smart camera are on the same WiFi network, the pairing works, and everything work as expected. Nonetheless, the app needs to work even if it is not connected to an external WiFi network. So we thought we could use the iOS' Personal Hotspot to connect the smart camera to, so as to enable the pairing (since it would then be on the same network).
But, we're currently encountering a problem, after enabling Personal Hotspot from iOS, the camera either :
does not "see" the WiFi Network, so it can't connect to it
when the network is visible, it does not connect to the Personal Hotspot : it
keeps trying to negotiate keys, and authenticating without success
When this problem occurs, we also tried to connect a Windows 7 laptop and a MacBookPro (running latest Sierra), but the WiFi connexion to iOS' Personal Hotspot could not been established either, with similar behaviors (wifi visibility, impossible to authenticate, connexion stabiliy...). So the problem does not seem to come with some network configuration on external devices, but more on the Personal Hotspot feature.
The logs on iOS are not very clear to me, so if someone could give a little insight it would be great:
par défaut 17:54:18.918592 +0200 sharingd Updated tethering support result = YES, wifiResult = YES, netRBResult = YES, firstUnlocked = YES
par défaut 17:54:18.918789 +0200 sharingd state = 1023, reason = 0
par défaut 17:54:18.918958 +0200 sharingd connected hosts = 1, only usb = NO, flipped switch on = NO, wifiClient = <WiFiManagerClient 0x101d2e630 [0x1b3994240]>, discovery state = YES, hostAPNetwork = YES, network timer = (null)
erreur 17:54:18.919786 +0200 locationd WifiMgr, error, bssid invalid, <private>, #CloneMe
erreur 17:54:18.920172 +0200 locationd WifiMgr, error, bssid invalid, <private>, #CloneMe
par défaut 17:54:18.920834 +0200 CommCenter #I Calling _CTGetCellularDataIsEnabled()
par défaut 17:54:18.929647 +0200 analyticsd [<private>] no observers; dropped.
par défaut 17:54:18.932031 +0200 symptomsd SCDynamicStore config_callback: k: com.apple.MobileInternetSharing
par défaut 17:54:18.932686 +0200 symptomsd SCDynamicStore key: com.apple.MobileInternetSharing, interfaces: {}
par défaut 17:54:18.947974 +0200 hostapd STA d4:7b:b0:8:37:a associated
par défaut 17:54:18.951673 +0200 hostapd STA d4:7b:b0:08:37:0a event 1 notification
par défaut 17:54:18.957204 +0200 hostapd STA d4:7b:b0:08:37:0a start authentication
par défaut 17:54:18.959079 +0200 hostapd STA d4:7b:b0:8:37:a DEAUTHORIZED.
par défaut 17:54:18.961158 +0200 hostapd STA d4:7b:b0:08:37:0a sending 1/4 msg of 4-Way Handshake
par défaut 17:54:19.044584 +0200 CommCenter QMI: Svc=0x03(NAS) Ind MsgId=0x0051 Bin=['01 2A 00 80 03 05 04 C9 39 51 00 1E 00 11 08 00 83 05 00 00 96 FF FF FF 14 06 00 BF EF 92 FF 9E FF A2 01 00 32 A4 03 00 01 32 00']
par défaut 17:54:19.242918 +0200 hostapd STA d4:7b:b0:08:37:0a received EAPOL-Key frame (2/4 Pairwise)
par défaut 17:54:19.245172 +0200 hostapd STA d4:7b:b0:08:37:0a MIC OK
par défaut 17:54:19.248415 +0200 hostapd STA d4:7b:b0:08:37:0a sending 3/4 msg of 4-Way Handshake
par défaut 17:54:19.799258 +0200 CommCenter QMI: Svc=0xe2(BSP) Req MsgId=0xe002 Bin=[<private>]
par défaut 17:54:19.840969 +0200 CommCenter QMI: Svc=0xe2(BSP) Resp MsgId=0xe002 Bin=[<private>]
par défaut 17:54:20.049299 +0200 CommCenter QMI: Svc=0x03(NAS) Ind MsgId=0x0051 Bin=['01 2A 00 80 03 05 04 CA 39 51 00 1E 00 11 08 00 83 05 00 00 96 FF FF FF 14 06 00 BB EE 94 FF 7C FF A2 01 00 32 A4 03 00 01 32 00']
par défaut 17:54:21.042898 +0200 CommCenter QMI: Svc=0x03(NAS) Ind MsgId=0x0051 Bin=['01 2A 00 80 03 05 04 CB 39 51 00 1E 00 11 08 00 83 05 00 00 96 FF FF FF 14 06 00 B8 EC 94 FF B6 FF A2 01 00 32 A4 03 00 01 32 00']
par défaut 17:54:21.806955 +0200 CommCenter QMI: Svc=0xe2(BSP) Req MsgId=0xe002 Bin=[<private>]
par défaut 17:54:21.847338 +0200 CommCenter QMI: Svc=0xe2(BSP) Resp MsgId=0xe002 Bin=[<private>]
par défaut 17:54:22.041651 +0200 CommCenter QMI: Svc=0x03(NAS) Ind MsgId=0x0051 Bin=['01 2A 00 80 03 05 04 CC 39 51 00 1E 00 11 08 00 83 05 00 00 96 FF FF FF 14 06 00 B7 EC 96 FF C0 FF A2 01 00 32 A4 03 00 01 32 00']
par défaut 17:54:23.048387 +0200 CommCenter QMI: Svc=0x03(NAS) Ind MsgId=0x0051 Bin=['01 2A 00 80 03 05 04 CD 39 51 00 1E 00 11 08 00 83 05 00 00 96 FF FF FF 14 06 00 B4 ED 94 FF DA FF A2 01 00 32 A4 03 00 01 32 00']
par défaut 17:54:23.816292 +0200 CommCenter QMI: Svc=0xe2(BSP) Req MsgId=0xe002 Bin=[<private>]
par défaut 17:54:23.867039 +0200 CommCenter QMI: Svc=0xe2(BSP) Resp MsgId=0xe002 Bin=[<private>]
par défaut 17:54:24.048262 +0200 CommCenter QMI: Svc=0x03(NAS) Ind MsgId=0x0051 Bin=['01 2A 00 80 03 05 04 CE 39 51 00 1E 00 11 08 00 83 05 00 00 96 FF FF FF 14 06 00 BC EF 93 FF 86 FF A2 01 00 32 A4 03 00 01 32 00']
par défaut 17:54:24.935783 +0200 CommCenter #I Data usage threshold reached for tethering, bytes consumed: 110254 total consumed:: 730740
par défaut 17:54:24.940706 +0200 CommCenter #I Cumulative bytes at threshold: 61045158, Previous value: 59016742, Delta: 2028416
par défaut 17:54:24.942240 +0200 CommCenter Threshold reached when entity: (uuid: <private> euuid: <private> pid: 4120 epid: 4120 process: <private> bundle id: <private>) consumed: (889770 bytes) on source: (identifier: 0x101f64630)
par défaut 17:54:24.942995 +0200 CommCenter #I Data usage threshold reached for internet context
We've tried to test the Personal Hotspot on several iOS devices (iPhones 5, 5S, 6, 6+, 6S, SE, 7, 7+ both running latest iOS 10 version), and with no explanation, it only worked when the iPhone SE shared its connexion (?!?)...
We're quite stuck on this, since iOS does not give much settings/information on Personal Hotspot, and it is a user-level feature, with no API to control it.
What we've come to with some WiFi tools, it seems that iOS uses WPA2 Personal algorithm for securing its Personal Hotspot, but any additional information might be useful for us...
For the moment, we have already tried :
Rename iPhone to remove any space and/or special characters
Use a very simple password with no spaces and/or special characters
Encode WiFi name in a base64 string on the Raspberry 3 /etc/wpa_supplicant/wpa_supplicant.conf conforming to this post but with no success
My wpa_supplicant.conf file looks currently like this :
network = {
ssid=aVBob25lNg0K
psk="passphrase"
key_mgmt=WPA-PSK
}
When pairing fails on a Raspberry Pi 3, the following logs can be observed :
Trying to associate with 76:8d:08:74:3c:33 (SSID='iphone6' freq=2412 MHz)
CTRL-EVENT-ASSOC-REJECT status_code=16
CTRL-EVENT-SCAN-STARTED
CTRL-EVENT-SCAN-RESULT
Do you have an idea of what could mean CTRL-EVENT-ASSOC-REJECT status_code=16
Any help or similar problem/experience from others people will be much appreciated, because this feature is critical for us, and a core to our business. For information, when the hotpot is hosted by an Android phone, everything works fine.
Thanks in advance for your help,

Related

How to get to know TCP or UDP protocol from wireshark pcap hexadecimal view

A sample TCP hexadecimal Wireshark capture shown below,
0000 6c 6a 77 8d 48 cf 96 38 a7 7d 02 de 08 00 45 28
0010 00 34 56 92 40 00 28 06 fa e9 a2 7d 13 09 c0 a8
0020 8a f1 01 bb df 84 20 00 27 8e e3 6f a9 7f 80 10
0030 00 7c 25 f3 00 00 01 01 08 0a 54 48 f8 cc 61 38
0040 eb 22
How to get to know TCP or UDP protocol from Wireshark pcap hexadecimal view ?.
Save the hex data, as shown, into a text file and then run text2pcap file.txt file.pcap. You can then load the file.pcap file into Wireshark. Run text2pcap -h for more help or refer to the text2pcap man page for more details about that tool.
0000 6c 6a 77 8d 48 cf 96 38 a7 7d 02 de 08 00 45 28
0010 00 34 56 92 40 00 28 06 fa e9 a2 7d 13 09 c0 a8
8th Byte in the second line we have to check. In here it's 06. So protocol number 06 is TCP. Like wise we can get to know the protocol number from hexadecimal view.

Connect to Windows SQL Server 2008 R2 from Rails app

My Rails 4.2.1 app has to connect to a Microsoft SQL 2008 R2 database. I am using the tiny_tds gem version 1.0.4. FreeTDS v1.00.15 is installed on the production server running Ubuntu 14.04.
I run queries inside an each loop and I can't get the loop to complete, the process crashes before completion.
I tried playing with tiny_tds options without success.
Here's the code I am using to get the tiny_tds client (check tds_version and timeout options):
client = TinyTds::Client.new(username: db_conf['username'], password: db_conf['password'], host: db_conf['host'], port: db_conf['port'], database: db_conf['database'], tds_version: '7.3', timeout: 15000, appname: 'ERP')
Here's the FreeTDS log after such an error happens.
packet.c:741:Sending packet 0000 12 01 00 ce 00 00 00 00-16 03 01 00
86 10 00 00 |........ ........| 0010 82 00 80 6e d9 e2 dc 97-9d 77 59
9a 5b da e3 e2 |...n.... .wY.[...| 0020 8b aa 66 ed ec 5e e2 02-e5 6c
fd db e1 ef 47 1a |..f..^.. .l....G.| 0030 9d 63 03 ed 6d 3e 28 3b-b9
64 fd 92 71 34 ff ba |.c..m>(; .d..q4..| 0040 7d 3c 8d ee 7b 34 75
e9-d5 b7 c6 83 a9 7d e6 7f |}<..{4u. .....}..| 0050 71 7e 25 11 82 b8
76 b1-c6 ba 86 b4 c3 0a 47 f0 |q~%...v. ......G.| 0060 51 96 c7 e2 5f
ca 07 b2-95 53 b9 9e bb 2c e7 cb |Q..._... .S...,..| 0070 be 0a b5 eb
b0 f3 41 1d-cd 86 fc a6 53 08 5e 56 |......A. ....S.^V| 0080 29 85 79
14 dc 2b 74 7b-b2 43 2c e8 0e 87 60 e4 |).y..+t{ .C,....| 0090 10 ef
f8 14 03 01 00 01-01 16 03 01 00 30 c7 f0 |........ .....0..| 00a0 35
f5 2c 6e 79 8d 85 b9-bd 60 b7 09 8c 7e 29 18 |5.,ny... ....~).| 00b0
4a 56 ea c3 4e 13 bf e3-c5 8d f6 68 31 31 54 ee |JV..N... ...h11T.|
00c0 bf 2f 75 8d e9 9e c0 a9-d0 d2 9e 5b c9 92 |./u..... ...[..|
tls.c:105:in tds_pull_func_login query.c:3796:tds_disconnect()
util.c:165:Changed query state from IDLE to DEAD
util.c:322:tdserror(0x80b75e0, 0xa04ca80, 20017, 0)
dblib.c:7947:dbperror(0xae62780, 20017, 0) dblib.c:8015:dbperror:
Calling dblib_err_handler with msgno = 20017; msg->msgtext =
"Unexpected EOF from the server (192.168.32.105:1433)"
dblib.c:5777:dbgetuserdata(0xae62780) dblib.c:8037:dbperror:
dblib_err_handler for msgno = 20017; msg->msgtext = "Unexpected EOF
from the server (192.168.32.105:1433)" -- returns 2 (INT_CANCEL)
util.c:352:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:375:tdserror: returning TDS_INT_CANCEL(2) util.c:375:tdserror:
returning TDS_INT_CANCEL(2) tls.c:942:handshake failed
login.c:530:login packet rejected util.c:322:tdserror(0x80b75e0,
0xa04ca80, 20002, 0) dblib.c:7947:dbperror(0xae62780, 20002, 0)
dblib.c:8015:dbperror: Calling dblib_err_handler with msgno = 20002;
msg->msgtext = "Adaptive Server connection failed"
And here's the output of tsql -C:
~$ tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v1.00.15
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: auto
iODBC: no
unixodbc: no
SSPI "trusted" logins: no
Kerberos: no
OpenSSL: yes
GnuTLS: no
MARS: no
Any idea what I should do to fix those Unexpected EOF from the server errors?
In your FreeTDS configuration (often in /etc/freetds/freetds.conf as in your configuration), change the value of text size:
text size = 4294967295
That's the maximum value, IIRC. I believe with FreeTDS 0.91 that your default is probably 64512.
Looking at the SQL Profiler, I found out the Rails application was opening way too many connections on the MSSQL server. Upon reaching its max number of open connection, the MSSQL server refused opening any new connection, resulting in the Unexpected EOF from the server error.
To solve the issue, I had to reuse my open connection when sending queries instead of opening a new connection for each query. I guess this is the correct way to use the tiny_tds connector anyway.
Translated to code:
def self.get_pmi_client
if ##pmi_client.nil? or !##pmi_client.active?
db_conf = Rails.configuration.database_configuration["pmi_#{Rails.env}"]
##pmi_client = TinyTds::Client.new(username: db_conf['username'], password: db_conf['password'], host: db_conf['host'], port: db_conf['port'], database: db_conf['database'])
raise MSSQLConnectionError, t('erp.errors.pmi_connection_error') unless ##pmi_client.active?
end
return ##pmi_client
end

Apple push notification not working for distribution/ad hoc testing

I have been using sandbox push notification for a while, and it is working perfectly. After switching to distribution, push notification stopped working.
Things that I have checked:
Two separate push notification certificates are created, one for development (Sandbox) and one for distribution(production).
Device token is different for sandbox and production.
We use NotNoop APNS on server side. The certificate.p12 is created by exporting the private key under push notification certificate in Apple Keychain Access. Certificate itself is not in the p12 file.
Checked archived package for production with command
codesign -d --entitlements :- "Payload/YourApp.app"
And the code signing entitlement is distribution.
Followed Apple TN 2265 (https://developer.apple.com/library/ios/technotes/tn2265/_index.html). While using openssl to connect to APNS, the connection is closed right after handshake (for production). For sandbox, there is a pause after the handshake, and then more reads & writes.
My command:
> openssl pkcs12 -in Cert_prod.p12 -out Cert_prod.pem
> openssl s_client -connect gateway.push.apple.com:2195 -cert Cert_prod.pem -debug -showcerts -CAfile "Entrust.pem"
The output (for production):
...
Server certificate
subject=/C=US/ST=California/L=Cupertino/O=Apple Inc./CN=gateway.push.apple.com
issuer=/C=US/O=Entrust, Inc./OU=www.entrust.net/rpa is incorporated by reference/OU=(c) 2009 Entrust, Inc./CN=Entrust Certification Authority - L1C
---
Acceptable client certificate CA names
/C=US/O=Apple Inc./OU=Apple Certification Authority/CN=Apple Root CA
/C=US/O=Apple Inc./OU=Apple Worldwide Developer Relations/CN=Apple Worldwide Developer Relations Certification Authority
/C=US/O=Apple Inc./OU=Apple Certification Authority/CN=Apple Application Integration Certification Authority
---
SSL handshake has read 3144 bytes and written 2161 bytes
---
New, TLSv1/SSLv3, Cipher is AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : AES256-SHA
Session-ID:
Session-ID-ctx:
Master-Key: CCCE22D7487589D257E547F2693E8AEDF86B693E6EFE09DCAA7EE74C28812E45506A21B0DC0ED6CAAF4395EB2D2899ED
Key-Arg : None
Start Time: 1454828210
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
read from 0x7fa6d3a00060 [0x7fa6d4806600] (5 bytes => 5 (0x5))
0000 - 15 03 01 ...
0005 - <SPACES/NULS>
read from 0x7fa6d3a00060 [0x7fa6d4806605] (32 bytes => 32 (0x20))
0000 - 8f c6 74 25 a6 40 2b 58-29 bc a4 e0 a7 c9 43 a8 ..t%.#+X).....C.
0010 - a0 93 62 78 6a 73 ed aa-4f 61 0a a4 9e fe a7 9e ..bxjs..Oa......
closed
write to 0x7fa6d3a00060 [0x7fa6d480b000] (37 bytes => 37 (0x25))
0000 - 15 03 01 00 20 2c 70 db-af 76 7a 2c 01 70 da 0f .... ,p..vz,.p..
0010 - a9 03 da e2 fb 69 f8 09-63 5d 18 85 81 8c 31 63 .....i..c]....1c
0020 - 63 fb 73 cb 48 c.s.H
The output (for sandbox):
...
Server certificate
subject=/C=US/ST=California/L=Cupertino/O=Apple Inc./CN=gateway.sandbox.push.apple.com
issuer=/C=US/O=Entrust, Inc./OU=www.entrust.net/rpa is incorporated by reference/OU=(c) 2009 Entrust, Inc./CN=Entrust Certification Authority - L1C
---
Acceptable client certificate CA names
/C=US/O=Apple Inc./OU=Apple Certification Authority/CN=Apple Root CA
/C=US/O=Apple Inc./OU=Apple Worldwide Developer Relations/CN=Apple Worldwide Developer Relations Certification Authority
/C=US/O=Apple Inc./OU=Apple Certification Authority/CN=Apple Application Integration Certification Authority
---
SSL handshake has read 3160 bytes and written 2161 bytes
---
New, TLSv1/SSLv3, Cipher is AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : AES256-SHA
Session-ID:
Session-ID-ctx:
Master-Key: 011B90857BC02D4A9DCB7300F8C9F368905F90EA4BDDC0677CD2EA9AAB3550CF750F0B57C5AF0C72F5BCD991658AC4AC
Key-Arg : None
Start Time: 1454828396
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
write to 0x7f9b19c1aef0 [0x7f9b1a019000] (74 bytes => 74 (0x4A))
0000 - 17 03 01 00 20 d7 a1 a1-b2 9e be ce 49 18 26 0e .... .......I.&.
0010 - 46 73 f9 dc 7f b2 75 71-f6 bf 51 65 44 0e f1 60 Fs....uq..QeD..`
0020 - fe 80 2e e2 a6 17 03 01-00 20 f0 be dc 70 85 b0 ......... ...p..
0030 - 82 d0 44 1e 9a b8 fe 59-39 b1 14 be 0a 9d 7c 0e ..D....Y9.....|.
0040 - ce 09 9b c3 f2 1c dd 28-c7 24 .......(.$
write to 0x7f9b19c1aef0 [0x7f9b1a019000] (74 bytes => 74 (0x4A))
0000 - 17 03 01 00 20 4c 12 4f-f9 ba 0b e4 80 b3 66 bb .... L.O......f.
0010 - 93 a7 c9 47 9d 84 36 88-33 c0 80 79 a2 97 c6 95 ...G..6.3..y....
0020 - 2a 4b 42 c1 bc 17 03 01-00 20 a0 4d 06 fd 84 78 *KB...... .M...x
0030 - 3d b9 12 ad 65 75 b6 1a-01 91 28 86 40 c4 e9 c2 =...eu....(.#...
0040 - 38 91 47 42 c3 1d e3 c7-f9 41 8.GB.....A
write to 0x7f9b19c1aef0 [0x7f9b1a019000] (74 bytes => 74 (0x4A))
0000 - 17 03 01 00 20 35 77 28-ea b0 80 5a ad 9e 99 87 .... 5w(...Z....
0010 - 7d 07 13 14 ff ea a8 48-60 7c 46 f0 59 07 c8 53 }......H`|F.Y..S
0020 - 3f 96 55 fc ec 17 03 01-00 20 60 49 00 86 bf 41 ?.U...... `I...A
0030 - 70 70 5c d5 d7 f5 83 4c-8a b3 10 22 bb ad 4c f2 pp\....L..."..L.
0040 - 3e e0 54 db 5d e7 2e bc-cc 9c >.T.].....
write to 0x7f9b19c1aef0 [0x7f9b1a019000] (74 bytes => 74 (0x4A))
0000 - 17 03 01 00 20 25 d3 8a-20 a4 4c 3c b6 f7 fe 95 .... %.. .L<....
0010 - 60 e2 5b 9f fc fd 3d e7-4c 27 cc d0 8e 6c ef 30 `.[...=.L'...l.0
0020 - 56 4a 88 a9 f9 17 03 01-00 20 cc 32 2d d5 e6 ff VJ....... .2-...
0030 - 59 26 14 67 2d 3f 3d 88-d3 3b ea 53 5e 11 72 75 Y&.g-?=..;.S^.ru
0040 - a4 c6 0e d8 95 b4 21 e3-5d dd ......!.].
write to 0x7f9b19c1aef0 [0x7f9b1a019000] (74 bytes => 74 (0x4A))
0000 - 17 03 01 00 20 8a a0 b6-fd 72 7b f4 f6 ef de 65 .... ....r{....e
0010 - 76 40 6b 67 1d b8 83 c1-92 98 50 9e 0f ac d7 da v#kg......P.....
0020 - 66 39 9c 39 9f 17 03 01-00 20 70 a4 1d 63 f1 6e f9.9..... p..c.n
0030 - d6 5a b3 fd f9 7e de de-64 7d 42 0d da 94 59 09 .Z...~..d}B...Y.
0040 - 93 3f 33 e3 d7 d0 3e 2e-10 e7 .?3...>...
read from 0x7f9b19c1aef0 [0x7f9b1a014600] (5 bytes => 5 (0x5))
0000 - 15 03 01 ...
0005 - <SPACES/NULS>
read from 0x7f9b19c1aef0 [0x7f9b1a014605] (32 bytes => 32 (0x20))
0000 - 60 b6 57 1c 8a 8e e9 f0-59 b5 27 73 f5 ba de b1 `.W.....Y.'s....
0010 - 7a ef d7 ab 79 23 0a ea-b2 13 c9 ca 98 e5 c3 36 z...y#.........6
closed
write to 0x7f9b19c1aef0 [0x7f9b1a019000] (37 bytes => 37 (0x25))
0000 - 15 03 01 00 20 f2 6f d0-1b 8d 41 5e 44 df f5 49 .... .o...A^D..I
0010 - 3a 09 6a 11 2b 3b f3 47-1e 70 8d 8d a8 9d 42 45 :.j.+;.G.p....BE
0020 - e9 47 18 26 3e .G.&>
Therefore, it seems that the broken link is between my server and APNS. How can I know why the connection is closed?
I suspected that something is wrong on the certificate, but could not find anything. I took the same steps to create sandbox certificates, and they worked just fine. Did I miss anything for production?
Other related links that I checked:
apple push notification not working in production
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
Couldn't able to connect to APNS Sandbox server
The certificate.p12 in NotNoop APNS should be exported from the certificate only, without the private key. In Keychain Access, click the small arrow next to the push notification certificate to show the private key, select the certificate only (without the key), and export it to a .p12 file. Updating the file on server solved my problem. Openssl is a good tool for smoke test before archiving the app and running it in ad hoc mode.

is there any actionscript bytecode debugger?

is there any known tool for debugging action script bytecode
just like debugging x86 binary code with IDA or olly debugger??
I have no source code. and I want to debug the ABC bytecode line by line.
SWFWire does not support this, neither FireBug.
I want to debug such ActionScript bytecode.
push "a"
96 03 00 00 01 00
getVariable
1C
push 248
96 05 00 07 F8 00 00 00
equals
0E
not
12
if true goto #159
9D 02 00 1D 00
push "a"
96 03 00 00 01 00
push "a"
96 03 00 00 01 00
getVariable
1C
push 476
96 05 00 07 DC 01 00 00
add
0A
setVariable
1D
getVariable
1C
jump #20
99 02 00 E0 FD
I want to set a breakpoint somewhere I want and follow the execution path
line by line.
I've googled for a while and there is no software which supports this.
thank you in advance.

How can I execute commands in redis without getting any response at all?

I try to execute commands on redis but don't care for any response and don't even want any to minimize network traffic. One answer on stackoverflow said a Lua scripts that doesn't return anything could help to achieve that, but when I try it on the redis-cli and sniff my packages I still get the same number of packages transfered between client and server whether I have a script returning nothing or one that returns Integer 1.
The example Queries are:
EVAL "" 0
EVAL "return 1" 0
In both cases wireshark shows 4 packages exchanged. One [PSH, ACK] client to server, [ACK] from the server to the client, [PSH, ACK] from the server to the client and [ACK] back from the client to the server.
In the first case the [PSH, ACK] package that I expect to be the response from redis contains the following data:
0000 02 00 00 00 45 00 00 39 bc a8 40 00 40 06 00 00 ....E..9 ..#.#...
0010 7f 00 00 01 7f 00 00 01 18 eb e6 bb 03 4d 7c 9c ........ .....M|.
0020 e2 97 bf 53 80 18 23 df fe 2d 00 00 01 01 08 0a ...S..#. .-......
0030 11 cd c0 31 11 cd c0 31 24 2d 31 0d 0a ...1...1 $-1..
In the second case this package contains:
0000 02 00 00 00 45 00 00 38 fa 9f 40 00 40 06 00 00 ....E..8 ..#.#...
0010 7f 00 00 01 7f 00 00 01 18 eb e6 bb 03 4d 7c a1 ........ .....M|.
0020 e2 97 bf 76 80 18 23 dd fe 2c 00 00 01 01 08 0a ...v..#. .,......
0030 11 ce be 46 11 ce be 46 3a 31 0d 0a ...F...F :1..
For the second case the point is clear. :1 is the integer reply for 1. But for the first case I'm not sure. $ is the indicator for bulk reply and - the indicator for error. Does this mean that $-1 is the data for the (nil) that is shown in the redis-cli?
Or am I completely wrong there? And if I am right, is there a possibility to tell redis that I don't want any response at all (except the ACK for the command)? Or would I have to fork the redis code and implement this myself?
I really appreciate any hints on how to achieve getting no response at all without digging into the redis source code.
EVAL "" 0 returns $-1\r\n
EVAL "return 1" 0 returns :1\r\n
In the first case, $-1 is a specific bulk-reply to be used to represent the nil value (as described in the protocol specification)
AFAIK, there is no possibility to tell Redis it does not have to send a reply (even for an empty answer).
As explained by Marc Gravell, you can use Lua to bundle several operations and reduce the volume of the reply data. However, you will not avoid the minimal reply packet.
For instance you could run 100 operations in one Lua script and have one single minimal packet as a reply. However, this packet cannot be avoided IMO, except by altering Redis source code.

Resources